<?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 accelerate a report and use fillnull or usenull with stats? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-accelerate-a-report-and-use-fillnull-or-usenull-with/m-p/179908#M51791</link>
    <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myapp | iplocation dip | eval sip_host=coalesce(sip_host, "-") | eval Country=coalesce(Country, "-") | stats sum(eval(c2s_bytes+s2c_bytes)) AS "total_bytes" count by app, sip, sip_host, dip, Country
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 28 Jun 2015 02:27:30 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2015-06-28T02:27:30Z</dc:date>
    <item>
      <title>How to accelerate a report and use fillnull or usenull with stats?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-accelerate-a-report-and-use-fillnull-or-usenull-with/m-p/179907#M51790</link>
      <description>&lt;P&gt;Splunk 6.2.2 ... I want to build an accelerated daily report. The search I want to power this daily report is...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myapp | iplocation dip | fillnull value=- | stats sum(eval(c2s_bytes+s2c_bytes)) AS "total_bytes" count by app, sip, sip_host, dip, Country
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;sip_host is a populated by an automatic lookup that links "sip" (source IP) to a host name. Country is populated by the iplocation lookup provided by Splunk.&lt;/P&gt;

&lt;P&gt;Sometimes one or both of these fields will be blank, so by default, I need a way for stats to do its thing even when a field is blank/null. I've traced the reason to why Splunk says I can't accelerate this report to the fillnull command. Googling for stats info says there is a usenull flag for stats, but I couldn't find it in the documentation or get it to work.&lt;/P&gt;

&lt;P&gt;How can I make stats use null/blank fields and/or make Splunk accelerate reports that use the fillnull command?&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jun 2015 02:11:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-accelerate-a-report-and-use-fillnull-or-usenull-with/m-p/179907#M51790</guid>
      <dc:creator>yacht_rock</dc:creator>
      <dc:date>2015-06-28T02:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to accelerate a report and use fillnull or usenull with stats?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-accelerate-a-report-and-use-fillnull-or-usenull-with/m-p/179908#M51791</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myapp | iplocation dip | eval sip_host=coalesce(sip_host, "-") | eval Country=coalesce(Country, "-") | stats sum(eval(c2s_bytes+s2c_bytes)) AS "total_bytes" count by app, sip, sip_host, dip, Country
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 28 Jun 2015 02:27:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-accelerate-a-report-and-use-fillnull-or-usenull-with/m-p/179908#M51791</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-06-28T02:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to accelerate a report and use fillnull or usenull with stats?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-accelerate-a-report-and-use-fillnull-or-usenull-with/m-p/179909#M51792</link>
      <description>&lt;P&gt;This worked perfectly - the results are identical to my query, and it's accelerating like I wanted. Thank you!&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jun 2015 02:40:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-accelerate-a-report-and-use-fillnull-or-usenull-with/m-p/179909#M51792</guid>
      <dc:creator>yacht_rock</dc:creator>
      <dc:date>2015-06-28T02:40:56Z</dc:date>
    </item>
  </channel>
</rss>

