<?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 add host value in Panel title or in the caption  for single value visualization in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-add-host-value-in-Panel-title-or-in-the-caption-for/m-p/460838#M30242</link>
    <description>&lt;P&gt;@kranthimutyala , try the following run anywhere example based on Splunk's _internal index which runs an independent search query to get the Top Host count and sets the two tokens one for host and other for count.&lt;/P&gt;

&lt;P&gt;The count token is used in run anywhere search based on makeresults command. And title is displayed using host token. Please try out and confirm!&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;Single Value with Panel Title&amp;lt;/label&amp;gt;
  &amp;lt;!-- Independent search for Single Value Panel and Title of Top Host count --&amp;gt;
  &amp;lt;search&amp;gt;
    &amp;lt;query&amp;gt;index=_internal
| top 1 host  showperc=false
| table host count&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;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
    &amp;lt;progress&amp;gt;
      &amp;lt;condition match="$job.resultCount$==0"&amp;gt;
        &amp;lt;set token="tokHost"&amp;gt;Unavailable&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokCount"&amp;gt;0&amp;lt;/set&amp;gt;
      &amp;lt;/condition&amp;gt;
      &amp;lt;condition&amp;gt;
        &amp;lt;set token="tokHost"&amp;gt;$result.host$&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokCount"&amp;gt;$result.count$&amp;lt;/set&amp;gt;        
      &amp;lt;/condition&amp;gt;
    &amp;lt;/progress&amp;gt;
  &amp;lt;/search&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Host $tokHost$ value&amp;lt;/title&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| makeresults
| fields - _time
| eval count="$tokCount$"
          &amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="colorBy"&amp;gt;value&amp;lt;/option&amp;gt;
        &amp;lt;option name="colorMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="numberPrecision"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="rangeColors"&amp;gt;["0x53a051", "0x0877a6", "0xf8be34", "0xf1813f", "0xdc4e41"]&amp;lt;/option&amp;gt;
        &amp;lt;option name="rangeValues"&amp;gt;[0,30,70,100]&amp;lt;/option&amp;gt;
        &amp;lt;option name="showSparkline"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="showTrendIndicator"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="trellis.enabled"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="trellis.scales.shared"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="trellis.size"&amp;gt;medium&amp;lt;/option&amp;gt;
        &amp;lt;option name="trendColorInterpretation"&amp;gt;standard&amp;lt;/option&amp;gt;
        &amp;lt;option name="trendDisplayMode"&amp;gt;absolute&amp;lt;/option&amp;gt;
        &amp;lt;option name="unitPosition"&amp;gt;after&amp;lt;/option&amp;gt;
        &amp;lt;option name="useColors"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="useThousandSeparators"&amp;gt;1&amp;lt;/option&amp;gt;
      &amp;lt;/single&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 12 Dec 2019 09:28:11 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2019-12-12T09:28:11Z</dc:date>
    <item>
      <title>how to add host value in Panel title or in the caption  for single value visualization</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-add-host-value-in-Panel-title-or-in-the-caption-for/m-p/460837#M30241</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;

&lt;P&gt;I'm working on a dashboard where i need to show up the count of top 1 host in the single value visualization.&lt;BR /&gt;
 Below is the code i'm using &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=abc
|top limit=1 host
| table count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I need the host value to be displayed in the panel title or in the single value caption.&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2019 09:10:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-add-host-value-in-Panel-title-or-in-the-caption-for/m-p/460837#M30241</guid>
      <dc:creator>kranthimutyala</dc:creator>
      <dc:date>2019-12-12T09:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: how to add host value in Panel title or in the caption  for single value visualization</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-add-host-value-in-Panel-title-or-in-the-caption-for/m-p/460838#M30242</link>
      <description>&lt;P&gt;@kranthimutyala , try the following run anywhere example based on Splunk's _internal index which runs an independent search query to get the Top Host count and sets the two tokens one for host and other for count.&lt;/P&gt;

&lt;P&gt;The count token is used in run anywhere search based on makeresults command. And title is displayed using host token. Please try out and confirm!&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;Single Value with Panel Title&amp;lt;/label&amp;gt;
  &amp;lt;!-- Independent search for Single Value Panel and Title of Top Host count --&amp;gt;
  &amp;lt;search&amp;gt;
    &amp;lt;query&amp;gt;index=_internal
| top 1 host  showperc=false
| table host count&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;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
    &amp;lt;progress&amp;gt;
      &amp;lt;condition match="$job.resultCount$==0"&amp;gt;
        &amp;lt;set token="tokHost"&amp;gt;Unavailable&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokCount"&amp;gt;0&amp;lt;/set&amp;gt;
      &amp;lt;/condition&amp;gt;
      &amp;lt;condition&amp;gt;
        &amp;lt;set token="tokHost"&amp;gt;$result.host$&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokCount"&amp;gt;$result.count$&amp;lt;/set&amp;gt;        
      &amp;lt;/condition&amp;gt;
    &amp;lt;/progress&amp;gt;
  &amp;lt;/search&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Host $tokHost$ value&amp;lt;/title&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| makeresults
| fields - _time
| eval count="$tokCount$"
          &amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="colorBy"&amp;gt;value&amp;lt;/option&amp;gt;
        &amp;lt;option name="colorMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="numberPrecision"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="rangeColors"&amp;gt;["0x53a051", "0x0877a6", "0xf8be34", "0xf1813f", "0xdc4e41"]&amp;lt;/option&amp;gt;
        &amp;lt;option name="rangeValues"&amp;gt;[0,30,70,100]&amp;lt;/option&amp;gt;
        &amp;lt;option name="showSparkline"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="showTrendIndicator"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="trellis.enabled"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="trellis.scales.shared"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="trellis.size"&amp;gt;medium&amp;lt;/option&amp;gt;
        &amp;lt;option name="trendColorInterpretation"&amp;gt;standard&amp;lt;/option&amp;gt;
        &amp;lt;option name="trendDisplayMode"&amp;gt;absolute&amp;lt;/option&amp;gt;
        &amp;lt;option name="unitPosition"&amp;gt;after&amp;lt;/option&amp;gt;
        &amp;lt;option name="useColors"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="useThousandSeparators"&amp;gt;1&amp;lt;/option&amp;gt;
      &amp;lt;/single&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Dec 2019 09:28:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-add-host-value-in-Panel-title-or-in-the-caption-for/m-p/460838#M30242</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-12-12T09:28:11Z</dc:date>
    </item>
  </channel>
</rss>

