<?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 not send out empty report file when there is no data in the report file? in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/How-to-not-send-out-empty-report-file-when-there-is-no-data-in/m-p/14940#M197</link>
    <description>&lt;P&gt;You could try using &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.1/SearchReference/Fillnull"&gt;fillnull&lt;/A&gt; to populate the blank report with some default data like referenced above.&lt;/P&gt;

&lt;P&gt;Or maybe take a look at &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.1/SearchReference/Filldown"&gt;filldown&lt;/A&gt; which will fill null values with the last value in the index.&lt;/P&gt;</description>
    <pubDate>Thu, 01 Jan 2015 02:59:12 GMT</pubDate>
    <dc:creator>dolivasoh</dc:creator>
    <dc:date>2015-01-01T02:59:12Z</dc:date>
    <item>
      <title>How to not send out empty report file when there is no data in the report file?</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-not-send-out-empty-report-file-when-there-is-no-data-in/m-p/14939#M196</link>
      <description>&lt;P&gt;Needs to send out reports every hour to an
external entity and try to figure out how to have some default
values set when there is no data for that time range instead of sending
an empty report. The query is below:&lt;/P&gt;

&lt;P&gt;eventtypes=TIC-FW-NETSCREEN earliest="-1h@h" latest=@h | stats
max(deviceclass) as DeviceClass count(_raw) AS Count last(_time) AS
FirstRecord first(_time) as LastRecord | convert ctime(FirstRecord) |
convert ctime(LastRecord) | outputcsv filename.csv&lt;/P&gt;

&lt;P&gt;Desired Output when there are no records for the search:&lt;/P&gt;

&lt;P&gt;DeviceClass,Count,FirstRecord,LastRecord
FIREWALL,0,"01/01/1970 00:00:00","01/01/1970 00:00:00"&lt;/P&gt;</description>
      <pubDate>Sat, 05 Jun 2010 04:33:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-not-send-out-empty-report-file-when-there-is-no-data-in/m-p/14939#M196</guid>
      <dc:creator>zliu</dc:creator>
      <dc:date>2010-06-05T04:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to not send out empty report file when there is no data in the report file?</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-not-send-out-empty-report-file-when-there-is-no-data-in/m-p/14940#M197</link>
      <description>&lt;P&gt;You could try using &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.1/SearchReference/Fillnull"&gt;fillnull&lt;/A&gt; to populate the blank report with some default data like referenced above.&lt;/P&gt;

&lt;P&gt;Or maybe take a look at &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.1/SearchReference/Filldown"&gt;filldown&lt;/A&gt; which will fill null values with the last value in the index.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jan 2015 02:59:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-not-send-out-empty-report-file-when-there-is-no-data-in/m-p/14940#M197</guid>
      <dc:creator>dolivasoh</dc:creator>
      <dc:date>2015-01-01T02:59:12Z</dc:date>
    </item>
  </channel>
</rss>

