<?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 display 0 when there is No Records Found or Nothing returned in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-when-there-is-No-Records-Found-or-Nothing/m-p/480444#M192999</link>
    <description>&lt;P&gt;@to4kawa&lt;/P&gt;

&lt;P&gt;thanks but still I get nothing on the timechart for "total" or "filter" when there is no matched event return for "total" or "filter", &lt;/P&gt;</description>
    <pubDate>Mon, 20 Apr 2020 01:11:03 GMT</pubDate>
    <dc:creator>splunkbeginner</dc:creator>
    <dc:date>2020-04-20T01:11:03Z</dc:date>
    <item>
      <title>How to display 0 when there is No Records Found or Nothing returned</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-when-there-is-No-Records-Found-or-Nothing/m-p/480440#M192995</link>
      <description>&lt;P&gt;the search (thanks for who provided this) is:&lt;/P&gt;

&lt;P&gt;| tstats count where host=linux01 sourcetype="linux:audit" by _time span=1d prestats=t&lt;BR /&gt;
 | timechart span=1d count as total&lt;BR /&gt;
 | appendcols [ search  host=linux01 sourcetype="linux:audit" key="linux01_change" NOT comm IN (vi, rm, ls)&lt;BR /&gt;
 | timechart span=1d count as filter]&lt;/P&gt;

&lt;P&gt;If there is no matched event to return for "total" and "filter", I get "Not Results Found". If there is no matched event return for "total" or "filter", I get nothing on the timechart for "total" or "filter"&lt;/P&gt;

&lt;P&gt;I would instead like a 0 displayed. Any idea will be much appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:06:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-when-there-is-No-Records-Found-or-Nothing/m-p/480440#M192995</guid>
      <dc:creator>splunkbeginner</dc:creator>
      <dc:date>2020-09-30T05:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to display 0 when there is No Records Found or Nothing returned</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-when-there-is-No-Records-Found-or-Nothing/m-p/480441#M192996</link>
      <description>&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/733553/how-do-i-append-a-specific-field-with-specific-val.html"&gt;https://answers.splunk.com/answers/733553/how-do-i-append-a-specific-field-with-specific-val.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Apr 2020 02:47:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-when-there-is-No-Records-Found-or-Nothing/m-p/480441#M192996</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-18T02:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to display 0 when there is No Records Found or Nothing returned</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-when-there-is-No-Records-Found-or-Nothing/m-p/480442#M192997</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/184221"&gt;@to4kawa&lt;/a&gt; &lt;/P&gt;

&lt;P&gt;Thanks for the link. Any idea how i can tune the appendage to yield correct events? Thanks&lt;/P&gt;

&lt;P&gt;| tstats count where host=linux01 sourcetype="linux:audit" by _time span=1d prestats=t&lt;BR /&gt;
| timechart span=1d count as total&lt;BR /&gt;
| appendcols [ search host=linux01 sourcetype="linux:audit" key="linux01_change" NOT comm IN (vi, rm, ls)&lt;BR /&gt;
| timechart span=1d count as filter]&lt;BR /&gt;
 | appendpipe &lt;BR /&gt;
     [| timechart count &lt;BR /&gt;
     | where count=0 &lt;BR /&gt;
     | eval ???,count=0 &lt;BR /&gt;
     | appendpipe &lt;BR /&gt;
         [| eval ???,count=0]]&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:02:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-when-there-is-No-Records-Found-or-Nothing/m-p/480442#M192997</guid>
      <dc:creator>splunkbeginner</dc:creator>
      <dc:date>2020-09-30T05:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to display 0 when there is No Records Found or Nothing returned</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-when-there-is-No-Records-Found-or-Nothing/m-p/480443#M192998</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;....
| appendpipe [| stats count as total
| where total=0
| eval total=0]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 18 Apr 2020 05:23:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-when-there-is-No-Records-Found-or-Nothing/m-p/480443#M192998</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-18T05:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to display 0 when there is No Records Found or Nothing returned</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-when-there-is-No-Records-Found-or-Nothing/m-p/480444#M192999</link>
      <description>&lt;P&gt;@to4kawa&lt;/P&gt;

&lt;P&gt;thanks but still I get nothing on the timechart for "total" or "filter" when there is no matched event return for "total" or "filter", &lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 01:11:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-when-there-is-No-Records-Found-or-Nothing/m-p/480444#M192999</guid>
      <dc:creator>splunkbeginner</dc:creator>
      <dc:date>2020-04-20T01:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to display 0 when there is No Records Found or Nothing returned</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-when-there-is-No-Records-Found-or-Nothing/m-p/480445#M193000</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=_internal "nothing counts"
| stats count as total by sourcetype
| appendpipe [ stats count as total
| where total=0
| eval total=0]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Apr 2020 02:08:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-when-there-is-No-Records-Found-or-Nothing/m-p/480445#M193000</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-20T02:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to display 0 when there is No Records Found or Nothing returned</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-when-there-is-No-Records-Found-or-Nothing/m-p/480446#M193001</link>
      <description>&lt;P&gt;@to4kawa&lt;/P&gt;

&lt;P&gt;thanks again. maybe i don't know how to fit your suggestion to my search... but thanks anyway.&lt;/P&gt;

&lt;P&gt;nevertheless i tried a query from another splunk answer and its working fine.&lt;BR /&gt;
  | appendpipe [ stats count | eval "NoResults"="0"  | where count=0 |table "NoResults"]&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 03:41:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-when-there-is-No-Records-Found-or-Nothing/m-p/480446#M193001</guid>
      <dc:creator>splunkbeginner</dc:creator>
      <dc:date>2020-04-20T03:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to display 0 when there is No Records Found or Nothing returned</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-when-there-is-No-Records-Found-or-Nothing/m-p/480447#M193002</link>
      <description>&lt;P&gt;@splunkbeginner &lt;/P&gt;

&lt;P&gt;try like this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count where host=linux01 sourcetype="linux:audit" by _time span=1d prestats=t
| timechart span=1d count as total
| appendcols [ search host=linux01 sourcetype="linux:audit" key="linux01_change" NOT comm IN (vi, rm, ls)
| timechart span=1d count as filter]
| stats count as total by sourcetype
 | appendpipe [ stats count as total
 | where total=0
 | eval total=0,filter=0]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Apr 2020 06:38:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-when-there-is-No-Records-Found-or-Nothing/m-p/480447#M193002</guid>
      <dc:creator>harishalipaka</dc:creator>
      <dc:date>2020-04-20T06:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to display 0 when there is No Records Found or Nothing returned</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-when-there-is-No-Records-Found-or-Nothing/m-p/480448#M193003</link>
      <description>&lt;P&gt;@harishalipaka&lt;/P&gt;

&lt;P&gt;thanks but it somehow doesn't work for me.&lt;/P&gt;

&lt;P&gt;nevertheless i tried a query from another splunk answer and its working fine.&lt;BR /&gt;
| appendpipe [ stats count | eval "NoResults"="0" | where count=0 |table "NoResults"]&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2020 01:18:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-0-when-there-is-No-Records-Found-or-Nothing/m-p/480448#M193003</guid>
      <dc:creator>splunkbeginner</dc:creator>
      <dc:date>2020-04-21T01:18:09Z</dc:date>
    </item>
  </channel>
</rss>

