Dashboards & Visualizations

tokens in advanced xml?

New Member

Hi, I tried this week to look into simple\advanced xml in splunk.
simple xml is "simple" enough to understand but I can't get the hang of the advanced one through the tutorials.
for example a simple form to create a chart with a token and a "time input":

  <label>New form</label>
  source="mysource" eventD=$eventD$  
    | stats sum(concurrentUsers) as concurrentbb by _time | timechart span=10m max(concurrentbb)
<input type="text" token="eventD">
<input type="time" />

      <option name="charting.chart">column</option>
      <option name="charting.primaryAxisTitle.text">User</option>
      <option name="charting.secondaryAxisTitle.text">ConcurrentUsers</option>
      <option name="charting.legend.placement">none</option>


*** now I want to put this form inside a dashboard.
I managed to build a chart in it but I want to enable my users to insert values into tokens just like in the forms.

<view template="dashboard.html">
  <label>My Dashboard</label>

  <!-- top nav chrome -->
  <module name="AccountBar" layoutPanel="appHeader"/>
  <module name="AppBar" layoutPanel="navigationHeader"/>

  <!-- Renders the search box -->
  <module name="SearchBar" layoutPanel="mainSearchControls">

    <!-- Renders the resulting events from your search -->
    <module name="EventsViewer"/>

  </module><!-- close SearchBar module -->

  <module name="HiddenSearch" layoutPanel="panel_row1_col1" group="Messages per minute last hour" autoRun="True">
    <param name="search">source="analyticsreport" eventDescription=$eventD$ 
    | stats sum(concurrentUsers) as concurrentbb by _time | timechart span=10m max(concurrentbb)


  <module name="ResultsHeader">
      <param name="entityName">scanned</param>
      <param name="entityLabel">Events</param>

      <module name="FlashChart">
        <param name="height">180px</param>
        <param name="width">100%</param>

Tags (2)
0 Karma

Ultra Champion

I would recommend installing the UI Examples app , it has plenty of examples of various Advanced XML Views that you can reference to create the functionality you want

Similarly, the Sideview Utils app , also has many examples of using the custom Sideview UI modules.

0 Karma