Dashboards & Visualizations

A distinct field input for each panel in Simple XML

xbbj3nj
Path Finder

I'm trying to create 2 panels and each of them should have a separate field input. is it possible to have 2 different input for 2 different panel in a dashboard ?

Tags (2)
0 Karma
1 Solution

MuS
Legend

Hi xbbj3nj,

yes, this is possible. Take this run everywhere example for index=_internal on Splunk 6.1.1 :

<form>
  <label>index _internal Fu</label>
  <description/>
  <fieldset submitButton="false">
    <input type="dropdown" token="v_series" searchWhenChanged="true">
      <label>series</label>
      <choice value="*">all</choice>
      <populatingSearch fieldForLabel="series" fieldForValue="series">index=_internal | table series</populatingSearch>
      <default>*</default>
    </input>
    <input type="dropdown" token="v_sourcetype" searchWhenChanged="true">
      <label>sourcetypes</label>
      <choice value="*">all</choice>
      <populatingSearch fieldForLabel="sourcetype" fieldForValue="sourcetype">index=_internal | table sourcetype</populatingSearch>
      <default>*</default>
    </input>
  </fieldset>
  <row>
    <panel>
      <chart>
        <title>All series</title>
        <searchString>index=_internal series=$v_series$ | timechart count</searchString>
        <earliestTime>0</earliestTime>
        <latestTime/>
        <selection>
          <set token="selection.earliest">$start$</set>
          <set token="selection.latest">$end$</set>
          <set token="start.count">$start.count$</set>
          <set token="end.count">$end.count$</set>
        </selection>
      </chart>
    </panel>
  </row>
  <row>
    <panel>
      <chart>
        <title>All sourcetypes</title>
        <searchString>index=_internal sourcetype=$v_sourcetype$ | timechart count</searchString>
        <earliestTime>$selection.earliest$</earliestTime>
        <latestTime>$selection.latest$</latestTime>
        <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
        <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
        <option name="charting.axisTitleX.visibility">visible</option>
        <option name="charting.axisTitleY.visibility">visible</option>
        <option name="charting.axisTitleY2.visibility">visible</option>
        <option name="charting.axisX.scale">linear</option>
        <option name="charting.axisY.scale">linear</option>
        <option name="charting.axisY2.enabled">false</option>
        <option name="charting.axisY2.scale">inherit</option>
        <option name="charting.chart">bar</option>
        <option name="charting.chart.nullValueMode">gaps</option>
        <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
        <option name="charting.chart.stackMode">default</option>
        <option name="charting.chart.style">shiny</option>
        <option name="charting.drilldown">all</option>
        <option name="charting.layout.splitSeries">0</option>
        <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
        <option name="charting.legend.placement">right</option>
      </chart>
    </panel>
  </row>
</form>

the first dropdown will be used only in the first panel and the second drop down will be used only in the second panel.

hope this helps ...

cheers, MuS

View solution in original post

MuS
Legend

Hi xbbj3nj,

yes, this is possible. Take this run everywhere example for index=_internal on Splunk 6.1.1 :

<form>
  <label>index _internal Fu</label>
  <description/>
  <fieldset submitButton="false">
    <input type="dropdown" token="v_series" searchWhenChanged="true">
      <label>series</label>
      <choice value="*">all</choice>
      <populatingSearch fieldForLabel="series" fieldForValue="series">index=_internal | table series</populatingSearch>
      <default>*</default>
    </input>
    <input type="dropdown" token="v_sourcetype" searchWhenChanged="true">
      <label>sourcetypes</label>
      <choice value="*">all</choice>
      <populatingSearch fieldForLabel="sourcetype" fieldForValue="sourcetype">index=_internal | table sourcetype</populatingSearch>
      <default>*</default>
    </input>
  </fieldset>
  <row>
    <panel>
      <chart>
        <title>All series</title>
        <searchString>index=_internal series=$v_series$ | timechart count</searchString>
        <earliestTime>0</earliestTime>
        <latestTime/>
        <selection>
          <set token="selection.earliest">$start$</set>
          <set token="selection.latest">$end$</set>
          <set token="start.count">$start.count$</set>
          <set token="end.count">$end.count$</set>
        </selection>
      </chart>
    </panel>
  </row>
  <row>
    <panel>
      <chart>
        <title>All sourcetypes</title>
        <searchString>index=_internal sourcetype=$v_sourcetype$ | timechart count</searchString>
        <earliestTime>$selection.earliest$</earliestTime>
        <latestTime>$selection.latest$</latestTime>
        <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
        <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
        <option name="charting.axisTitleX.visibility">visible</option>
        <option name="charting.axisTitleY.visibility">visible</option>
        <option name="charting.axisTitleY2.visibility">visible</option>
        <option name="charting.axisX.scale">linear</option>
        <option name="charting.axisY.scale">linear</option>
        <option name="charting.axisY2.enabled">false</option>
        <option name="charting.axisY2.scale">inherit</option>
        <option name="charting.chart">bar</option>
        <option name="charting.chart.nullValueMode">gaps</option>
        <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
        <option name="charting.chart.stackMode">default</option>
        <option name="charting.chart.style">shiny</option>
        <option name="charting.drilldown">all</option>
        <option name="charting.layout.splitSeries">0</option>
        <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
        <option name="charting.legend.placement">right</option>
      </chart>
    </panel>
  </row>
</form>

the first dropdown will be used only in the first panel and the second drop down will be used only in the second panel.

hope this helps ...

cheers, MuS

MuS
Legend

Just try it, it will do no harm. I truly cannot tell you if it will work, because I don't have any 6.0.3 available - sorry

xbbj3nj
Path Finder

Hi, Thanks for your response, Im using 6.0.3 by the way, will this work in 6.0.3 too ?

0 Karma
Get Updates on the Splunk Community!

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...