<?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: generate daily report on date field in data in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/generate-daily-report-on-date-field-in-data/m-p/365887#M107910</link>
    <description>&lt;P&gt;Try this!&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;event_name="update.event"  [search |noop|stats count as event_data.day
|eval event_data.day=strftime(now(),"%Y-%m-%d")+" "+strftime(relative_time(now(),"+1d@d"),"%Y-%m-%d")
|makemv event_data.day
|mvexpand event_data.day]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 13 Feb 2018 12:38:27 GMT</pubDate>
    <dc:creator>HiroshiSatoh</dc:creator>
    <dc:date>2018-02-13T12:38:27Z</dc:date>
    <item>
      <title>generate daily report on date field in data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/generate-daily-report-on-date-field-in-data/m-p/365886#M107909</link>
      <description>&lt;P&gt;Hi there, &lt;/P&gt;

&lt;P&gt;I have some data like this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;activity_id:     1131c134-d771-41e7-918d-d42772fc1316   
     date_time:  2018-02-13T08:21:40.682844+00:00   
     env:    prod   
     event_data:    {   [-] 
         channel:    1124   
         day:    2018-02-18 
         eventId:    97356218   
         streamEndDateTime:  1518974100000  
         streamStartDateTime:    1518965640000  
    }   
     event_name:     update.event
     timestamp:  1518510100682  
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And I would like Splunk to generate a report each day at midnight based on the next 2 days from the 'event_data.day' value.  For example if today is 2018-02-17, the report would check&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;event_name="update.event"  event_data.day="2018-02-17" OR event_data.day="2018-02-18"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The next day the report would check for &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;event_name="update.event"  event_data.day="2018-02-18" OR event_data.day="2018-02-19"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;etc. &lt;/P&gt;

&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 09:01:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/generate-daily-report-on-date-field-in-data/m-p/365886#M107909</guid>
      <dc:creator>alexm2a</dc:creator>
      <dc:date>2018-02-13T09:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: generate daily report on date field in data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/generate-daily-report-on-date-field-in-data/m-p/365887#M107910</link>
      <description>&lt;P&gt;Try this!&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;event_name="update.event"  [search |noop|stats count as event_data.day
|eval event_data.day=strftime(now(),"%Y-%m-%d")+" "+strftime(relative_time(now(),"+1d@d"),"%Y-%m-%d")
|makemv event_data.day
|mvexpand event_data.day]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Feb 2018 12:38:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/generate-daily-report-on-date-field-in-data/m-p/365887#M107910</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2018-02-13T12:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: generate daily report on date field in data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/generate-daily-report-on-date-field-in-data/m-p/365888#M107911</link>
      <description>&lt;P&gt;Brilliant!  Thank you! &lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 12:49:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/generate-daily-report-on-date-field-in-data/m-p/365888#M107911</guid>
      <dc:creator>alexm2a</dc:creator>
      <dc:date>2018-02-13T12:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: generate daily report on date field in data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/generate-daily-report-on-date-field-in-data/m-p/365889#M107912</link>
      <description>&lt;P&gt;hey @hiroshiSatoh&lt;/P&gt;

&lt;P&gt;I was just wondering why you have used &lt;CODE&gt;|noop|stats count as event_data.day&lt;/CODE&gt;?&lt;BR /&gt;
If you do not use that then you will not get an answer? Just trying to understand your query.&lt;BR /&gt;
 Also &lt;CODE&gt;event_data.day=strftime(now(),"%Y-%m-%d")+" "+strftime(relative_time(now(),"+1d@d"),"%Y-%m-%d"&lt;/CODE&gt; will give you today and tomorrow date right?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 13:16:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/generate-daily-report-on-date-field-in-data/m-p/365889#M107912</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-02-13T13:16:58Z</dc:date>
    </item>
  </channel>
</rss>

