<?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 Why is dashboard not populating all hosts when ALL selected in the host dropdown? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-dashboard-not-populating-all-hosts-when-ALL-selected-in/m-p/494508#M32380</link>
    <description>&lt;P&gt;I am having an issue with a dashboard not populating all hosts when I select ALL in the host dropdown.&lt;/P&gt;

&lt;P&gt;For reference, I have a token $env$ which populates inside the host before $host$ is set. The issue I am having is when I select the dropdown to display ALL hosts in the table below, it shows no results. &lt;/P&gt;

&lt;P&gt;Here is where I believe it is failing.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;eval token="host"&amp;gt;if($host$ == "All", "xxx$env$-$service$*", $host$)&amp;lt;/eval&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When I select ALL from the Hosts drop down I want the graphs to display all hosts from the previously selected dropdowns &lt;STRONG&gt;env&lt;/STRONG&gt; and &lt;STRONG&gt;service&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Is this possible?&lt;/P&gt;</description>
    <pubDate>Wed, 06 May 2020 17:34:15 GMT</pubDate>
    <dc:creator>aldrichb</dc:creator>
    <dc:date>2020-05-06T17:34:15Z</dc:date>
    <item>
      <title>Why is dashboard not populating all hosts when ALL selected in the host dropdown?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-dashboard-not-populating-all-hosts-when-ALL-selected-in/m-p/494508#M32380</link>
      <description>&lt;P&gt;I am having an issue with a dashboard not populating all hosts when I select ALL in the host dropdown.&lt;/P&gt;

&lt;P&gt;For reference, I have a token $env$ which populates inside the host before $host$ is set. The issue I am having is when I select the dropdown to display ALL hosts in the table below, it shows no results. &lt;/P&gt;

&lt;P&gt;Here is where I believe it is failing.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;eval token="host"&amp;gt;if($host$ == "All", "xxx$env$-$service$*", $host$)&amp;lt;/eval&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When I select ALL from the Hosts drop down I want the graphs to display all hosts from the previously selected dropdowns &lt;STRONG&gt;env&lt;/STRONG&gt; and &lt;STRONG&gt;service&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Is this possible?&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2020 17:34:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-dashboard-not-populating-all-hosts-when-ALL-selected-in/m-p/494508#M32380</guid>
      <dc:creator>aldrichb</dc:creator>
      <dc:date>2020-05-06T17:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: Why is dashboard not populating all hosts when ALL selected in the host dropdown?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-dashboard-not-populating-all-hosts-when-ALL-selected-in/m-p/494509#M32381</link>
      <description>&lt;P&gt;yes, it is. you can do it.&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2020 21:22:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-dashboard-not-populating-all-hosts-when-ALL-selected-in/m-p/494509#M32381</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-06T21:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: Why is dashboard not populating all hosts when ALL selected in the host dropdown?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-dashboard-not-populating-all-hosts-when-ALL-selected-in/m-p/494510#M32382</link>
      <description>&lt;P&gt;@aldrichb will you be able to share host dropdown code? Do you set the label as &lt;CODE&gt;All&lt;/CODE&gt; or even the value is &lt;CODE&gt;All&lt;/CODE&gt;? Most of the time for Dropdown label All the value is actually &lt;CODE&gt;*&lt;/CODE&gt;. You can also print the &lt;CODE&gt;$host$&lt;/CODE&gt; token value in any of the panel to ensure the value is getting set as expected.&lt;/P&gt;

&lt;P&gt;If you want your logic to be based on dropdown label &lt;CODE&gt;All&lt;/CODE&gt; and not the dropdown value which may be different, you can try the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;change&amp;gt;
        &amp;lt;set token="tokHost"&amp;gt;$label$&amp;lt;/set&amp;gt;
  &amp;lt;/change&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The use token &lt;CODE&gt;$tokHost$&lt;/CODE&gt; in your dashboard instead of &lt;CODE&gt;$host$&lt;/CODE&gt;.&lt;BR /&gt;
PS: If the Label and Value for host for values other than All changes then above approach might not work, for which you may need to provide your host dropdown code and some dummy sample values/labels if it is created dynamically through SPL.&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 07:05:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-dashboard-not-populating-all-hosts-when-ALL-selected-in/m-p/494510#M32382</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2020-05-07T07:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: Why is dashboard not populating all hosts when ALL selected in the host dropdown?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-dashboard-not-populating-all-hosts-when-ALL-selected-in/m-p/494511#M32383</link>
      <description>&lt;P&gt;Here is the code up to the point where I believe it errors&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;input type="time" searchWhenChanged="true" token="global_time_tok"&amp;gt;
      &amp;lt;label&amp;gt;Time Range&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;
        &amp;lt;earliest&amp;gt;-1h&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"&amp;gt;
      &amp;lt;label&amp;gt;Time Span&amp;lt;/label&amp;gt;
      &amp;lt;choice value="auto"&amp;gt;auto&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="5s"&amp;gt;5s&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="10s"&amp;gt;10s&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="30s"&amp;gt;30s&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="1m"&amp;gt;1m&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="5m"&amp;gt;5m&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="10m"&amp;gt;10m&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="30m"&amp;gt;30m&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="1h"&amp;gt;1h&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;auto&amp;lt;/default&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;eval token="timechart_span"&amp;gt;if($value$ == "auto", "", "span=".$value$)&amp;lt;/eval&amp;gt;
        &amp;lt;eval token="mstats_span"&amp;gt;"span=".$value$&amp;lt;/eval&amp;gt;
      &amp;lt;/change&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="dropdown" token="env" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Environment&amp;lt;/label&amp;gt;
      &amp;lt;choice value="n"&amp;gt;UAT&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="p"&amp;gt;PRD&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;p&amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="dropdown" token="service"&amp;gt;
      &amp;lt;label&amp;gt;Service&amp;lt;/label&amp;gt;
      &amp;lt;choice value="ap"&amp;gt;Application&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="hc"&amp;gt;Hazelcast&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="db"&amp;gt;Database&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="mw"&amp;gt;Middleware&amp;lt;/choice&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="dropdown" token="host" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Host&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;All&amp;lt;/default&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;hostfield&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;host&amp;lt;/fieldForValue&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;index="xxx-*-wineventlog" host=xx$env$01xx-$service$* | stats count by host&amp;lt;/query&amp;gt;
        &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;eval token="host"&amp;gt;if($host$ == "All", "xx$env$01xx-$service$*", $host$)&amp;lt;/eval&amp;gt;
      &amp;lt;/change&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Above the graphs I have a panel with text which host is selected. And below that are various infrastructure monitoring graphs for that host. When I select ALL from the host drop down, I want all hosts in that specific Environment and Service that I previously selected in the drop downs before it. Currently when I select all the panel with the hostname changes to &lt;STRONG&gt;xx$env$01xx-$service$&lt;/STRONG&gt;*&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 11:44:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-dashboard-not-populating-all-hosts-when-ALL-selected-in/m-p/494511#M32383</guid>
      <dc:creator>aldrichb</dc:creator>
      <dc:date>2020-05-07T11:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: Why is dashboard not populating all hosts when ALL selected in the host dropdown?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-dashboard-not-populating-all-hosts-when-ALL-selected-in/m-p/494512#M32384</link>
      <description>&lt;P&gt;@aldrichb Seems like the value of host will be &lt;CODE&gt;All&lt;/CODE&gt; by default and this is your change event handler so you should try this &lt;CODE&gt;"$value$"&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   &amp;lt;change&amp;gt;
     &amp;lt;eval token="host"&amp;gt;if("$value$" == "All", "xx$env$01xx-$service$*", $value$)&amp;lt;/eval&amp;gt;
   &amp;lt;/change&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Refer to Splunk Documentation for accessing default input tokens in the input's &lt;CODE&gt;&amp;lt;change&amp;gt;&lt;/CODE&gt; event handler: &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Viz/tokens#Predefined_tokens_for_accessing_labels_and_values_of_form_inputs"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Viz/tokens#Predefined_tokens_for_accessing_labels_and_values_of_form_inputs&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 15:49:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-dashboard-not-populating-all-hosts-when-ALL-selected-in/m-p/494512#M32384</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2020-05-07T15:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: Why is dashboard not populating all hosts when ALL selected in the host dropdown?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-dashboard-not-populating-all-hosts-when-ALL-selected-in/m-p/494513#M32385</link>
      <description>&lt;P&gt;@aldrichb were you able to try the above? Is your issue resolved?&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 08:29:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-dashboard-not-populating-all-hosts-when-ALL-selected-in/m-p/494513#M32385</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2020-05-11T08:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: Why is dashboard not populating all hosts when ALL selected in the host dropdown?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-dashboard-not-populating-all-hosts-when-ALL-selected-in/m-p/494514#M32386</link>
      <description>&lt;P&gt;Sorry for the late response, I just noticed your response. I added that to my Source and when I change to all  I still have No Results Found in the panels where I would like to see all hosts stats. Ideally every host would be represented in the graphs. &lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 17:08:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-dashboard-not-populating-all-hosts-when-ALL-selected-in/m-p/494514#M32386</guid>
      <dc:creator>aldrichb</dc:creator>
      <dc:date>2020-05-11T17:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: Why is dashboard not populating all hosts when ALL selected in the host dropdown?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-dashboard-not-populating-all-hosts-when-ALL-selected-in/m-p/494515#M32387</link>
      <description>&lt;P&gt;Upon looking at documention I found a solution to this issue.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;eval token="host"&amp;gt;if($host$ == "All", "xx".$env$."01xx-".$service$."*", $host$)&amp;lt;/eval&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;After modifying this line, when I select All I now see all hosts represented on the panels.&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 17:38:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-dashboard-not-populating-all-hosts-when-ALL-selected-in/m-p/494515#M32387</guid>
      <dc:creator>aldrichb</dc:creator>
      <dc:date>2020-05-11T17:38:44Z</dc:date>
    </item>
  </channel>
</rss>

