<?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 One choice, multiple values in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/One-choice-multiple-values/m-p/170949#M34524</link>
    <description>&lt;P&gt;Hi!&lt;BR /&gt;
I'm trying to build a dashboard that searches two different indexes/sourcetypes using values from a dropdown.&lt;/P&gt;

&lt;P&gt;Let's say I have a drop down with sites that sells different products:&lt;/P&gt;

&lt;P&gt;Dropdown:&lt;BR /&gt;
Apples&lt;BR /&gt;
Pears&lt;BR /&gt;
Oranges&lt;/P&gt;

&lt;P&gt;When choosing "apples" and submitting I want the dashboard to show IIS logs from the apples web sites in one panel, and also firewall traffic to the apples site in another panel.&lt;/P&gt;

&lt;P&gt;Since they're in different indexes and sourcetypes with different kind of distinguishers I was wondering if there was a way of storing multiple values in one choice (warning for crappy code), ie:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="dropdown" token="producttype"&amp;gt;
      &amp;lt;label&amp;gt;Brand:&amp;lt;/label&amp;gt;
      &amp;lt;choice value1="Apples" value2="tcp_port=5000"&amp;gt;Apples&amp;lt;/choice&amp;gt;
      &amp;lt;choice value1="Pears" value2="tcp_port=6000"&amp;gt;Pears&amp;lt;/choice&amp;gt;
      &amp;lt;choice value1="Oranges" value2="tcp_port=7000"&amp;gt;Oranges&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;Choose a brand&amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope that was somewhat clear?&lt;/P&gt;

&lt;P&gt;Kind regards,&lt;BR /&gt;
Patrik&lt;/P&gt;</description>
    <pubDate>Tue, 30 Dec 2014 15:38:54 GMT</pubDate>
    <dc:creator>epacke</dc:creator>
    <dc:date>2014-12-30T15:38:54Z</dc:date>
    <item>
      <title>One choice, multiple values</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/One-choice-multiple-values/m-p/170949#M34524</link>
      <description>&lt;P&gt;Hi!&lt;BR /&gt;
I'm trying to build a dashboard that searches two different indexes/sourcetypes using values from a dropdown.&lt;/P&gt;

&lt;P&gt;Let's say I have a drop down with sites that sells different products:&lt;/P&gt;

&lt;P&gt;Dropdown:&lt;BR /&gt;
Apples&lt;BR /&gt;
Pears&lt;BR /&gt;
Oranges&lt;/P&gt;

&lt;P&gt;When choosing "apples" and submitting I want the dashboard to show IIS logs from the apples web sites in one panel, and also firewall traffic to the apples site in another panel.&lt;/P&gt;

&lt;P&gt;Since they're in different indexes and sourcetypes with different kind of distinguishers I was wondering if there was a way of storing multiple values in one choice (warning for crappy code), ie:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="dropdown" token="producttype"&amp;gt;
      &amp;lt;label&amp;gt;Brand:&amp;lt;/label&amp;gt;
      &amp;lt;choice value1="Apples" value2="tcp_port=5000"&amp;gt;Apples&amp;lt;/choice&amp;gt;
      &amp;lt;choice value1="Pears" value2="tcp_port=6000"&amp;gt;Pears&amp;lt;/choice&amp;gt;
      &amp;lt;choice value1="Oranges" value2="tcp_port=7000"&amp;gt;Oranges&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;Choose a brand&amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope that was somewhat clear?&lt;/P&gt;

&lt;P&gt;Kind regards,&lt;BR /&gt;
Patrik&lt;/P&gt;</description>
      <pubDate>Tue, 30 Dec 2014 15:38:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/One-choice-multiple-values/m-p/170949#M34524</guid>
      <dc:creator>epacke</dc:creator>
      <dc:date>2014-12-30T15:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: One choice, multiple values</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/One-choice-multiple-values/m-p/170950#M34525</link>
      <description>&lt;P&gt;Instead of trying to specify multiple values in your form (which may need updating as you start adding panels (say next they want database performance logs for each)). I would actually take the approach of returning a single value (apple,pear,orange). &lt;/P&gt;

&lt;P&gt;That single value instead of specifying the exact values to look for instead you use as a (partial) selector for &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.1/Knowledge/Abouttagsandaliases"&gt;Tags&lt;/A&gt; or &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.1/Knowledge/Abouteventtypes"&gt;Eventtypes&lt;/A&gt; that you have build to contain the properties needed to select the data you want in each.&lt;/P&gt;

&lt;P&gt;In your example above (and obviously I'm making up some additional information around the scenario for lack of knowledge of your exact scenario), lets say that you build event types:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;apple_iis: sourcetype=iis Apples
pear_iis: sourcetype=iis Pears
orange_iis: sourcetype=iis Oranges
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And the following tags: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;apple: tcp_port=5000
pear:  tcp_port=6000
orange: tcp_port=7000
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then your panel for IIS logs could search for:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=iis eventtype=$producttype$_iis
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and your panel for firewall logs could search for example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=fw tag::tcp_port=$producttype$
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Dec 2014 06:10:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/One-choice-multiple-values/m-p/170950#M34525</guid>
      <dc:creator>acharlieh</dc:creator>
      <dc:date>2014-12-31T06:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: One choice, multiple values</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/One-choice-multiple-values/m-p/170951#M34526</link>
      <description>&lt;P&gt;I get what you mean. Need to read more about tags, but that should do it. Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jan 2015 08:13:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/One-choice-multiple-values/m-p/170951#M34526</guid>
      <dc:creator>epacke</dc:creator>
      <dc:date>2015-01-02T08:13:22Z</dc:date>
    </item>
  </channel>
</rss>

