<?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 Query on stats value = 0 or null in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Query-on-stats-value-0-or-null/m-p/395259#M114776</link>
    <description>&lt;P&gt;Hi Guys, &lt;/P&gt;

&lt;P&gt;I have a question here. &lt;BR /&gt;
Example i have a query statement that check for event logs captured by all my servers(Say total i have 30) during the last 10 mins.&lt;/P&gt;

&lt;P&gt;if i run the following query :&lt;BR /&gt;
&lt;CODE&gt;index=ind_audit_log (sourcetype=linux_secure OR sourcetype=linux_audit)  | stats count by host&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;It only returns me 25 servers which has event logs being pipe to splunk. The rest of the servers(5 in total) that does not have event logs pipe to splunk was not being reflected in the above query.&lt;/P&gt;

&lt;P&gt;How can i craft and run a query to sieve out those servers that does not have any event logs being pipe to my splunk so that i can create an alert to notify me to check on the servers.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jul 2019 09:46:55 GMT</pubDate>
    <dc:creator>christay</dc:creator>
    <dc:date>2019-07-23T09:46:55Z</dc:date>
    <item>
      <title>Query on stats value = 0 or null</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-on-stats-value-0-or-null/m-p/395259#M114776</link>
      <description>&lt;P&gt;Hi Guys, &lt;/P&gt;

&lt;P&gt;I have a question here. &lt;BR /&gt;
Example i have a query statement that check for event logs captured by all my servers(Say total i have 30) during the last 10 mins.&lt;/P&gt;

&lt;P&gt;if i run the following query :&lt;BR /&gt;
&lt;CODE&gt;index=ind_audit_log (sourcetype=linux_secure OR sourcetype=linux_audit)  | stats count by host&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;It only returns me 25 servers which has event logs being pipe to splunk. The rest of the servers(5 in total) that does not have event logs pipe to splunk was not being reflected in the above query.&lt;/P&gt;

&lt;P&gt;How can i craft and run a query to sieve out those servers that does not have any event logs being pipe to my splunk so that i can create an alert to notify me to check on the servers.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 09:46:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-on-stats-value-0-or-null/m-p/395259#M114776</guid>
      <dc:creator>christay</dc:creator>
      <dc:date>2019-07-23T09:46:55Z</dc:date>
    </item>
    <item>
      <title>Re: Query on stats value = 0 or null</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-on-stats-value-0-or-null/m-p/395260#M114777</link>
      <description>&lt;P&gt;I think that using LOOKUP FILE is a staple, but there are also such search sentences.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|tstats count  
      WHERE index=ind_audit_log AND (sourcetype=linux_secure OR sourcetype=linux_audit) 
      by host 
| append [| metadata type=hosts index=ind_audit_log |eval count=0|table host,count]
| stats sum(count) as count by host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Unnecessary hosts should be excluded by WHERE clause etc.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 15:14:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-on-stats-value-0-or-null/m-p/395260#M114777</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2019-07-23T15:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Query on stats value = 0 or null</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-on-stats-value-0-or-null/m-p/395261#M114778</link>
      <description>&lt;P&gt;Hi Hiroshi, &lt;/P&gt;

&lt;P&gt;Thanks for the query, it works as intended.&lt;/P&gt;

&lt;P&gt;Cheers.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2019 03:22:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-on-stats-value-0-or-null/m-p/395261#M114778</guid>
      <dc:creator>christay</dc:creator>
      <dc:date>2019-07-24T03:22:09Z</dc:date>
    </item>
  </channel>
</rss>

