<?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 Re: How to retrieve the correct populating for different choice values in dropdown box in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-retrieve-the-correct-populating-for-different-choice/m-p/271807#M17207</link>
    <description>&lt;P&gt;Try something like this&lt;/P&gt;

&lt;P&gt;Assuming the value is to be used with field hostname (&lt;CODE&gt;hostname=$sourceHost$&lt;/CODE&gt;)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;fieldset submitButton="true" autoRun="true"&amp;gt;
     &amp;lt;input type="dropdown" token="sourceHost"&amp;gt;
       &amp;lt;label&amp;gt;Data Center&amp;lt;/label&amp;gt;
       &amp;lt;choice value="NOT hostname=*C*"&amp;gt;UK&amp;lt;/choice&amp;gt;
       &amp;lt;choice value="hostname=*C*"&amp;gt;US&amp;lt;/choice&amp;gt;
       &amp;lt;choice value="hostname=*"&amp;gt;ALL&amp;lt;/choice&amp;gt;
       &amp;lt;default&amp;gt;ALL&amp;lt;/default&amp;gt;
       &amp;lt;populatingSearch fieldForLabel="sourceHostVal" fieldForValue="sourceHost"&amp;gt;index=_internal source=*metrics.log group=tcpin_connections   | eval sourceHost=if(isnull(hostname), sourceHost,hostname)   | stats count by sourceHost | table sourceHost | eval sourceHostVal="hostname=".sourceHost &amp;lt;/populatingSearch&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 01 Apr 2016 16:23:51 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2016-04-01T16:23:51Z</dc:date>
    <item>
      <title>How to retrieve the correct populating for different choice values in dropdown box</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-retrieve-the-correct-populating-for-different-choice/m-p/271806#M17206</link>
      <description>&lt;P&gt;We have 2 Data Centers: US and UK&lt;BR /&gt;
Let's say we have 10 servers per Data Center&lt;/P&gt;

&lt;P&gt;Now when I use the 'setup' below, I am able to retrieve &lt;STRONG&gt;all&lt;/STRONG&gt; the servers and &lt;STRONG&gt;all&lt;/STRONG&gt; the US servers as the US servers have the letter 'C' in their hostname. Unfortunately the servers in the US don't have a letter or something else that clearly differentiates them from the UK servers.&lt;/P&gt;

&lt;P&gt;The only logical way would be to sort them on bases of the IP address (as US and UK have different IP ranges). Unfortunately I didn't succeed with that and I am bit stucked.  (although the populating query gives me, however, the hostnames &lt;STRONG&gt;and&lt;/STRONG&gt; IP addresses)&lt;/P&gt;

&lt;P&gt;Is there a way to have the choice values, using IP Addresses and/or using some search per choice value?&lt;/P&gt;

&lt;HR /&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;fieldset submitButton="true" autoRun="true"&amp;gt;
    &amp;lt;input type="dropdown" token="sourceHost"&amp;gt;
      &amp;lt;label&amp;gt;Data Center&amp;lt;/label&amp;gt;
      &amp;lt;choice value="*?*"&amp;gt;UK&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="*C*"&amp;gt;US&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="*"&amp;gt;ALL&amp;lt;/choice&amp;gt;
      &amp;lt;populatingSearch fieldForLabel="ALL" fieldForValue="*"&amp;gt;index=_internal source=*metrics.log group=tcpin_connections   | eval sourceHost=if(isnull(hostname), sourceHost,hostname)   | fields sourceIp sourceHost | table sourceHost sourceIp&amp;lt;/populatingSearch&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;HR /&gt;

&lt;P&gt;Thanks in advance for any help with this!&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2016 12:21:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-retrieve-the-correct-populating-for-different-choice/m-p/271806#M17206</guid>
      <dc:creator>edwinmae</dc:creator>
      <dc:date>2016-04-01T12:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve the correct populating for different choice values in dropdown box</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-retrieve-the-correct-populating-for-different-choice/m-p/271807#M17207</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;

&lt;P&gt;Assuming the value is to be used with field hostname (&lt;CODE&gt;hostname=$sourceHost$&lt;/CODE&gt;)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;fieldset submitButton="true" autoRun="true"&amp;gt;
     &amp;lt;input type="dropdown" token="sourceHost"&amp;gt;
       &amp;lt;label&amp;gt;Data Center&amp;lt;/label&amp;gt;
       &amp;lt;choice value="NOT hostname=*C*"&amp;gt;UK&amp;lt;/choice&amp;gt;
       &amp;lt;choice value="hostname=*C*"&amp;gt;US&amp;lt;/choice&amp;gt;
       &amp;lt;choice value="hostname=*"&amp;gt;ALL&amp;lt;/choice&amp;gt;
       &amp;lt;default&amp;gt;ALL&amp;lt;/default&amp;gt;
       &amp;lt;populatingSearch fieldForLabel="sourceHostVal" fieldForValue="sourceHost"&amp;gt;index=_internal source=*metrics.log group=tcpin_connections   | eval sourceHost=if(isnull(hostname), sourceHost,hostname)   | stats count by sourceHost | table sourceHost | eval sourceHostVal="hostname=".sourceHost &amp;lt;/populatingSearch&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Apr 2016 16:23:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-retrieve-the-correct-populating-for-different-choice/m-p/271807#M17207</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-04-01T16:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve the correct populating for different choice values in dropdown box</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-retrieve-the-correct-populating-for-different-choice/m-p/271808#M17208</link>
      <description>&lt;P&gt;-- It sounded too good to be true  --&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;1&lt;/EM&gt;&lt;BR /&gt;
I have one dashboard where I retrieve all the servers &lt;STRONG&gt;separately&lt;/STRONG&gt;  -- that works fine&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; Populating search:   index="perfmon" | dedup host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;EM&gt;2&lt;/EM&gt; &lt;BR /&gt;
For the second dashboard I want to have 3 groups:&lt;BR /&gt;
1) all servers for the UK&lt;BR /&gt;
2) all servers for the US&lt;BR /&gt;
3) all the servers for the UK and the US. &lt;/P&gt;

&lt;P&gt;This means that I &lt;STRONG&gt;only&lt;/STRONG&gt; want to see UK, US and ALL in the drop-down box and &lt;STRONG&gt;not&lt;/STRONG&gt; the individual servers. My current setup works for 3) ALL and 2) the US, but &lt;STRONG&gt;not&lt;/STRONG&gt; for the UK as explained in my first mail. &lt;/P&gt;

&lt;P&gt;In your setup I get the individual servers listed in the drop-down box (as well) and neither the UK, US and ALL works (anymore). Also the individual servers don't work&lt;/P&gt;

&lt;P&gt;Error in 'search' command: Unable to parse the search: Comparator '=' has an invalid term on the left hand side. &lt;/P&gt;

&lt;P&gt;I tried different combinations but in the end the US and ALL throw the above 'Error' and UK says No results found.&lt;/P&gt;

&lt;P&gt;I like the idea of listing all servers that don't have a the letter 'C' in the hostname as it should probably be the easiest way, assuming it's possible somehow to use NOT or !=&lt;/P&gt;

&lt;P&gt;Please advise&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2016 06:54:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-retrieve-the-correct-populating-for-different-choice/m-p/271808#M17208</guid>
      <dc:creator>edwinmae</dc:creator>
      <dc:date>2016-04-04T06:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve the correct populating for different choice values in dropdown box</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-retrieve-the-correct-populating-for-different-choice/m-p/271809#M17209</link>
      <description>&lt;P&gt;I am version using 6.1&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2016 10:57:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-retrieve-the-correct-populating-for-different-choice/m-p/271809#M17209</guid>
      <dc:creator>edwinmae</dc:creator>
      <dc:date>2016-04-04T10:57:27Z</dc:date>
    </item>
  </channel>
</rss>

