<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Dropdown creation and configuration  for a dashbaord in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Dropdown-creation-and-configuration-for-a-dashbaord/m-p/323494#M96553</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I wrote one simple query &lt;/P&gt;

&lt;P&gt;index=nmon host=*  type=DISKXFER | timechart avg(value) by host&lt;/P&gt;

&lt;P&gt;and created a dashbaord with time filter  option also.&lt;/P&gt;

&lt;P&gt;Now  i want to add  a dropdown ,but  no where i am finding  explanation for the fields represented in dropdown edit section and also  i am not sure how to connect the drop down with the dashboard panel  so that once  time range and drop down value is selected ,.....data should populate in the dashboard .&lt;/P&gt;

&lt;P&gt;I want to implement  this logic with multiple panels ..so that once  i select a  set of server suppose  "search server" from drop down..it should populate the values for those servers.&lt;/P&gt;</description>
    <pubDate>Thu, 23 Feb 2017 09:15:17 GMT</pubDate>
    <dc:creator>shabdadev</dc:creator>
    <dc:date>2017-02-23T09:15:17Z</dc:date>
    <item>
      <title>Dropdown creation and configuration  for a dashbaord</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dropdown-creation-and-configuration-for-a-dashbaord/m-p/323494#M96553</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I wrote one simple query &lt;/P&gt;

&lt;P&gt;index=nmon host=*  type=DISKXFER | timechart avg(value) by host&lt;/P&gt;

&lt;P&gt;and created a dashbaord with time filter  option also.&lt;/P&gt;

&lt;P&gt;Now  i want to add  a dropdown ,but  no where i am finding  explanation for the fields represented in dropdown edit section and also  i am not sure how to connect the drop down with the dashboard panel  so that once  time range and drop down value is selected ,.....data should populate in the dashboard .&lt;/P&gt;

&lt;P&gt;I want to implement  this logic with multiple panels ..so that once  i select a  set of server suppose  "search server" from drop down..it should populate the values for those servers.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 09:15:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dropdown-creation-and-configuration-for-a-dashbaord/m-p/323494#M96553</guid>
      <dc:creator>shabdadev</dc:creator>
      <dc:date>2017-02-23T09:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown creation and configuration  for a dashbaord</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dropdown-creation-and-configuration-for-a-dashbaord/m-p/323495#M96554</link>
      <description>&lt;P&gt;Hi shabdadev,&lt;BR /&gt;
This doc can get you started: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.2/Viz/Buildandeditforms"&gt;http://docs.splunk.com/Documentation/Splunk/6.5.2/Viz/Buildandeditforms&lt;/A&gt;&lt;BR /&gt;
It has good code examples. Also, teh dashboard examples app is very useful, you can download it here:&lt;BR /&gt;
&lt;A href="https://splunkbase.splunk.com/app/1603/"&gt;https://splunkbase.splunk.com/app/1603/&lt;/A&gt;&lt;BR /&gt;
Hope it helps&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2017 14:39:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dropdown-creation-and-configuration-for-a-dashbaord/m-p/323495#M96554</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2017-03-06T14:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown creation and configuration  for a dashbaord</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dropdown-creation-and-configuration-for-a-dashbaord/m-p/323496#M96555</link>
      <description>&lt;P&gt;Here is an example based off Splunk's internal index.&lt;BR /&gt;
It created Dropdown for Sourcetypes to be used across dashboard. It also has a Time control to allow specifying earliest and latest time for dropdown and the panels. I have added Time Control the example just to show that timerange for a Dynamic Query in dropdown can be specified only in the inline search using command like this&lt;CODE&gt;earliest=$tok_time.earliest$ latest=$tok_time.latest$&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Splunk Answers 505259&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="time" token="tok_time" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Global Time Selector&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;
        &amp;lt;earliest&amp;gt;@d&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
      &amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="dropdown" token="tok_sourcertype" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Select Sourcetype&amp;lt;/label&amp;gt;
      &amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;
      &amp;lt;prefix&amp;gt;sourcetype="&amp;lt;/prefix&amp;gt;
      &amp;lt;suffix&amp;gt;"&amp;lt;/suffix&amp;gt;
      &amp;lt;initialValue&amp;gt;*&amp;lt;/initialValue&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;sourcetype&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;sourcetype&amp;lt;/fieldForValue&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;index=_internal sourcetype=*
earliest=$tok_time.earliest$ latest=$tok_time.latest$
| dedup sourcetype
| sort sourcetype
| table sourcetype&amp;lt;/query&amp;gt;
        &amp;lt;earliest&amp;gt;0&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;&amp;lt;/latest&amp;gt;
      &amp;lt;/search&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Panel 1&amp;lt;/title&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal $tok_sourcertype$
| stats count by log_level&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$tok_time.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$tok_time.latest$&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;pie&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Panel 2&amp;lt;/title&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal $tok_sourcertype$
| stats count by log_level&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$tok_time.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$tok_time.latest$&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;20&amp;lt;/option&amp;gt;
        &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;cell&amp;lt;/option&amp;gt;
        &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Besides basic form input elements you should also consider reading &lt;BR /&gt;
&lt;STRONG&gt;Input Event Handlers:&lt;/STRONG&gt; &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Viz/EventHandlerReference"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Viz/EventHandlerReference&lt;/A&gt;&lt;BR /&gt;
and also &lt;STRONG&gt;Token Usage in Dashboards&lt;/STRONG&gt; which also covers Search Event Handlers: &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Viz/tokens"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Viz/tokens&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Ideally, the scenario for example used here is suitable for &lt;STRONG&gt;post processing&lt;/STRONG&gt; as same stats query is used in two places. So the underlying query to pull stats will run only once. However, post processing should be applied as per use case as it has its limitations and guidelines as well. (&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Viz/Savedsearches#Post-process_searches"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Viz/Savedsearches#Post-process_searches&lt;/A&gt;)&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2017 20:32:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dropdown-creation-and-configuration-for-a-dashbaord/m-p/323496#M96555</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-03-06T20:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown creation and configuration  for a dashbaord</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dropdown-creation-and-configuration-for-a-dashbaord/m-p/323497#M96556</link>
      <description>&lt;P&gt;@shabdadev were you able to try out the example? Is your issue resolved?&lt;/P&gt;</description>
      <pubDate>Sat, 11 Mar 2017 07:43:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dropdown-creation-and-configuration-for-a-dashbaord/m-p/323497#M96556</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-03-11T07:43:28Z</dc:date>
    </item>
  </channel>
</rss>

