<?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 Attempting to show host in column chart even when host didn't produce logs? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Attempting-to-show-host-in-column-chart-even-when-host-didn-t/m-p/313751#M4302</link>
    <description>&lt;P&gt;I am monitoring firewall and everything works fine when all host are producing logs. If a host happens to go offline and doesn't produce logs for an entire day it disappears from my column chart and I would like to have it still show the host but maybe without "bar graph". &lt;/P&gt;

&lt;P&gt;Search string: index=name  sourcetype="dell:firewall" earliest=-1d@d latest=@d | chart count(eval(pri=1)) AS Emergency, count(eval(pri=2)) AS Alert, count(eval(pri=3)) AS Critical, count(eval(pri=4)) AS Error, count(eval(pri=5)) AS Warning, count(eval(pri=6)) AS Notification, count(eval(pri=7)) AS Informational, count(eval(pri=8)) AS Debugging, by host&lt;/P&gt;

&lt;P&gt;I've tried adding fillnull value=0 as well as a few other options but none seem to keep the host listed as a "by host" field when no logs are produced. I tried to attached two screenshots to this ticket not sure if they posted correctly.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/2515i1C16B378A13114BE/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Feb 2017 02:56:04 GMT</pubDate>
    <dc:creator>Feedy</dc:creator>
    <dc:date>2017-02-22T02:56:04Z</dc:date>
    <item>
      <title>Attempting to show host in column chart even when host didn't produce logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Attempting-to-show-host-in-column-chart-even-when-host-didn-t/m-p/313751#M4302</link>
      <description>&lt;P&gt;I am monitoring firewall and everything works fine when all host are producing logs. If a host happens to go offline and doesn't produce logs for an entire day it disappears from my column chart and I would like to have it still show the host but maybe without "bar graph". &lt;/P&gt;

&lt;P&gt;Search string: index=name  sourcetype="dell:firewall" earliest=-1d@d latest=@d | chart count(eval(pri=1)) AS Emergency, count(eval(pri=2)) AS Alert, count(eval(pri=3)) AS Critical, count(eval(pri=4)) AS Error, count(eval(pri=5)) AS Warning, count(eval(pri=6)) AS Notification, count(eval(pri=7)) AS Informational, count(eval(pri=8)) AS Debugging, by host&lt;/P&gt;

&lt;P&gt;I've tried adding fillnull value=0 as well as a few other options but none seem to keep the host listed as a "by host" field when no logs are produced. I tried to attached two screenshots to this ticket not sure if they posted correctly.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/2515i1C16B378A13114BE/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 02:56:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Attempting-to-show-host-in-column-chart-even-when-host-didn-t/m-p/313751#M4302</guid>
      <dc:creator>Feedy</dc:creator>
      <dc:date>2017-02-22T02:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: Attempting to show host in column chart even when host didn't produce logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Attempting-to-show-host-in-column-chart-even-when-host-didn-t/m-p/313752#M4303</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Option 1&lt;/STRONG&gt;&lt;BR /&gt;
If you have access to execute REST API in Splunk search you can add a filter in base search to get all your hosts (or deployment clients) by adding a filter to base search like the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=name sourcetype="dell:firewall" [| rest /services/deployment/server/clients| search hostname="192.168.*" | fields hostname | fields - _* | rename hostname as host] earliest=-1d@d latest=@d | &amp;lt;Your Stats Command&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In the base search you can add filter for your hosts using OR or a pattern using wildcard/s ( I have taken 192.168.* ) as an example.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Option 2&lt;/STRONG&gt;&lt;BR /&gt;
Alternatively you can create lookup table with your host names and instead of &lt;STRONG&gt;rest&lt;/STRONG&gt; use &lt;STRONG&gt;inputlookup&lt;/STRONG&gt; to get list of all hosts.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Option 3&lt;/STRONG&gt;&lt;BR /&gt;
You can do a stats preferably (distinct_count() ) on a field you know that definitely exists on all your hosts and then use eval to  replace the stats on the field with 0.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 05:11:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Attempting-to-show-host-in-column-chart-even-when-host-didn-t/m-p/313752#M4303</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-02-22T05:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: Attempting to show host in column chart even when host didn't produce logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Attempting-to-show-host-in-column-chart-even-when-host-didn-t/m-p/313753#M4304</link>
      <description>&lt;P&gt;@Feedy Were you able to test this solution?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2017 16:54:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Attempting-to-show-host-in-column-chart-even-when-host-didn-t/m-p/313753#M4304</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-02-24T16:54:10Z</dc:date>
    </item>
  </channel>
</rss>

