<?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: search : no result / single in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/search-no-result-single/m-p/72952#M18264</link>
    <description>&lt;P&gt;I would try this:&lt;BR /&gt;
Instead of stats, use timechart.  That will retain the buckets with no results, which is the root of your problem.  Then you can apply the rangemap, eval date_hour, and apply your final eval.&lt;/P&gt;

&lt;P&gt;Like the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="tcp:5543" Requester="uka*" hostname="L05236" earliest=@h latest=now | timechart span=1h count | rangemap field=count severe=0-0 elevated=1-50 default=low  | eval date_hour=strftime(_time, "%H") | eval range=if(date_hour &amp;gt; 00 AND date_hour &amp;lt; 13 AND count &amp;gt; 11, "low",if(date_hour &amp;gt;= 14 AND date_hour &amp;lt; 24 AND count &amp;gt; 11, "severe", range))
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 12 Jun 2012 16:27:49 GMT</pubDate>
    <dc:creator>emiller42</dc:creator>
    <dc:date>2012-06-12T16:27:49Z</dc:date>
    <item>
      <title>search : no result / single</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-no-result-single/m-p/72951#M18263</link>
      <description>&lt;P&gt;hello,&lt;/P&gt;

&lt;P&gt;This is my search concerned by the problem :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="tcp:5543" Requester="uka*" hostname="L05236" earliest=@h latest=now|eval date_hour=strftime(_time, "%H") |stats count by date_hour |rangemap field=count severe=0-0 elevated=1-50 default=low  | eval range=if(date_hour&amp;gt;00 AND date_hour&amp;lt;13 AND count&amp;gt;11, "low",if(date_hour &amp;gt;= 14 AND date_hour &amp;lt; 24 AND count &amp;gt; 11, "severe", range))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My question is : when my search returns no result,  the range isn't severe because Splunk no consider that count is 0. So I don't know how can my search takes account when the search returns no result.&lt;/P&gt;

&lt;P&gt;Thx by advance,&lt;/P&gt;

&lt;P&gt;Laura&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2012 13:28:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-no-result-single/m-p/72951#M18263</guid>
      <dc:creator>LauraBre</dc:creator>
      <dc:date>2012-06-12T13:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: search : no result / single</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-no-result-single/m-p/72952#M18264</link>
      <description>&lt;P&gt;I would try this:&lt;BR /&gt;
Instead of stats, use timechart.  That will retain the buckets with no results, which is the root of your problem.  Then you can apply the rangemap, eval date_hour, and apply your final eval.&lt;/P&gt;

&lt;P&gt;Like the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="tcp:5543" Requester="uka*" hostname="L05236" earliest=@h latest=now | timechart span=1h count | rangemap field=count severe=0-0 elevated=1-50 default=low  | eval date_hour=strftime(_time, "%H") | eval range=if(date_hour &amp;gt; 00 AND date_hour &amp;lt; 13 AND count &amp;gt; 11, "low",if(date_hour &amp;gt;= 14 AND date_hour &amp;lt; 24 AND count &amp;gt; 11, "severe", range))
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Jun 2012 16:27:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-no-result-single/m-p/72952#M18264</guid>
      <dc:creator>emiller42</dc:creator>
      <dc:date>2012-06-12T16:27:49Z</dc:date>
    </item>
  </channel>
</rss>

