<?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 fill the null values in search results in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-fill-the-null-values-in-search-results/m-p/185737#M53522</link>
    <description>&lt;P&gt;Generally you just add this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | fillnull value=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But it is hard to say because your  question does not include your search and data examples.&lt;/P&gt;</description>
    <pubDate>Wed, 01 Jul 2015 14:23:45 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2015-07-01T14:23:45Z</dc:date>
    <item>
      <title>How to fill the null values in search results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-fill-the-null-values-in-search-results/m-p/185735#M53520</link>
      <description>&lt;P&gt;How can I fill null value in the following result with desired value, e.g. 0:&lt;/P&gt;

&lt;P&gt;mysearch | stats count by host&lt;/P&gt;

&lt;P&gt;I would like to have the following result format&lt;/P&gt;

&lt;P&gt;host1     xx&lt;BR /&gt;
host2     0    (which has the null result from the search)&lt;BR /&gt;
host3     yy&lt;BR /&gt;
host4     zz&lt;BR /&gt;
host5     0    (which has the null result from the search)&lt;/P&gt;

&lt;P&gt;Any suggestions? Please help.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2015 14:14:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-fill-the-null-values-in-search-results/m-p/185735#M53520</guid>
      <dc:creator>jgcsco</dc:creator>
      <dc:date>2015-07-01T14:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to fill the null values in search results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-fill-the-null-values-in-search-results/m-p/185736#M53521</link>
      <description>&lt;P&gt;Do you want to exclude the null results from your search or fill them with 0? If the former then try isnotnull()&lt;/P&gt;

&lt;P&gt;Provide your search and clarification and I can help you out &lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2015 14:22:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-fill-the-null-values-in-search-results/m-p/185736#M53521</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2015-07-01T14:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to fill the null values in search results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-fill-the-null-values-in-search-results/m-p/185737#M53522</link>
      <description>&lt;P&gt;Generally you just add this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | fillnull value=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But it is hard to say because your  question does not include your search and data examples.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2015 14:23:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-fill-the-null-values-in-search-results/m-p/185737#M53522</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-01T14:23:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to fill the null values in search results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-fill-the-null-values-in-search-results/m-p/185738#M53523</link>
      <description>&lt;P&gt;Thanks for your quick response, I would like to include the null results and fill then with 0. Following is the search string:&lt;/P&gt;

&lt;P&gt;host=* "Error" |stats count by host&lt;/P&gt;

&lt;P&gt;Basically, I am search the log file on all the hosts to find out error messages, for the host that does not have any error, I would like to set the value with "0".&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2015 14:27:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-fill-the-null-values-in-search-results/m-p/185738#M53523</guid>
      <dc:creator>jgcsco</dc:creator>
      <dc:date>2015-07-01T14:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to fill the null values in search results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-fill-the-null-values-in-search-results/m-p/185739#M53524</link>
      <description>&lt;P&gt;Based on your clarification, you need this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* OR index=_* | stats count(eval(like(lower(_raw), "%error%"))) AS Errors by host
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Jul 2015 14:38:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-fill-the-null-values-in-search-results/m-p/185739#M53524</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-01T14:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to fill the null values in search results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-fill-the-null-values-in-search-results/m-p/185740#M53525</link>
      <description>&lt;P&gt;Thanks woodcock. The only issue is that the log on each host is fairly large in terms of size, and the search here seem a bit inefficient, but it does provide the result I am looking for. &lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2015 14:58:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-fill-the-null-values-in-search-results/m-p/185740#M53525</guid>
      <dc:creator>jgcsco</dc:creator>
      <dc:date>2015-07-01T14:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to fill the null values in search results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-fill-the-null-values-in-search-results/m-p/185741#M53526</link>
      <description>&lt;P&gt;The most time spent is in the &lt;CODE&gt;lower&lt;/CODE&gt; command so this should be faster:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=* OR index=_* | stats count(eval(match(_raw, "[eE][rR][rR][oO][rR]"))) AS Errors by host
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Jul 2015 15:15:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-fill-the-null-values-in-search-results/m-p/185741#M53526</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-01T15:15:00Z</dc:date>
    </item>
  </channel>
</rss>

