<?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 show zero in count for stats command in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/show-zero-in-count-for-stats-command/m-p/571811#M199261</link>
    <description>&lt;P&gt;i want to show the count from host as zero if the process is not found however not able to find 0 count the host disappears if process is not found&lt;/P&gt;&lt;P&gt;index=oslogs sourcetype=ps COMMAND="process1"&lt;BR /&gt;|stats count by host,COMMAND&lt;/P&gt;&lt;P&gt;result :-&lt;/P&gt;&lt;P&gt;host1&amp;nbsp; java 12&lt;BR /&gt;host2&amp;nbsp; java 3&lt;BR /&gt;host4&amp;nbsp; java 4&lt;/P&gt;&lt;P&gt;Expected result&lt;BR /&gt;host1 12&lt;BR /&gt;host2 3&lt;BR /&gt;host3 0&lt;BR /&gt;host4 4&lt;/P&gt;</description>
    <pubDate>Thu, 21 Oct 2021 12:57:43 GMT</pubDate>
    <dc:creator>venky1544</dc:creator>
    <dc:date>2021-10-21T12:57:43Z</dc:date>
    <item>
      <title>show zero in count for stats command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/show-zero-in-count-for-stats-command/m-p/571811#M199261</link>
      <description>&lt;P&gt;i want to show the count from host as zero if the process is not found however not able to find 0 count the host disappears if process is not found&lt;/P&gt;&lt;P&gt;index=oslogs sourcetype=ps COMMAND="process1"&lt;BR /&gt;|stats count by host,COMMAND&lt;/P&gt;&lt;P&gt;result :-&lt;/P&gt;&lt;P&gt;host1&amp;nbsp; java 12&lt;BR /&gt;host2&amp;nbsp; java 3&lt;BR /&gt;host4&amp;nbsp; java 4&lt;/P&gt;&lt;P&gt;Expected result&lt;BR /&gt;host1 12&lt;BR /&gt;host2 3&lt;BR /&gt;host3 0&lt;BR /&gt;host4 4&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 12:57:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/show-zero-in-count-for-stats-command/m-p/571811#M199261</guid>
      <dc:creator>venky1544</dc:creator>
      <dc:date>2021-10-21T12:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: show zero in count for stats command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/show-zero-in-count-for-stats-command/m-p/571823#M199268</link>
      <description>&lt;P&gt;The &lt;FONT face="courier new,courier"&gt;stats&lt;/FONT&gt; command cannot count what isn't there.&amp;nbsp; It can't fill in missing values because the set of possible missing values is infinite.&amp;nbsp;&amp;nbsp;You have to have a list of possible host names and use that to insert zeroes for missing hosts.&amp;nbsp; See this blog entry for a good write-up on it.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.duanewaddle.com/proving-a-negative/" target="_blank"&gt;https://www.duanewaddle.com/proving-a-negative/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 13:49:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/show-zero-in-count-for-stats-command/m-p/571823#M199268</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-10-21T13:49:19Z</dc:date>
    </item>
  </channel>
</rss>

