<?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 Splunk Alert in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Splunk-Alert/m-p/399697#M11781</link>
    <description>&lt;P&gt;Hello Splunkers,&lt;/P&gt;

&lt;P&gt;I'm having an alert with last 3 days as the time range and that alert is triggered everyday at a particular time showing the last 3 days data.. Now the thing I need is, the alert should be triggered when it is having data for the current day and it should not  trigger if it is having data for the previous days.. in addition to this condition, when the alert is having data for the current day then I must get the previous days data too no matter what..&lt;/P&gt;

&lt;P&gt;Note: My search time range must be last 3 days.. is that possible?&lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Mon, 18 Feb 2019 09:31:01 GMT</pubDate>
    <dc:creator>sarahnazzar</dc:creator>
    <dc:date>2019-02-18T09:31:01Z</dc:date>
    <item>
      <title>Splunk Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Splunk-Alert/m-p/399697#M11781</link>
      <description>&lt;P&gt;Hello Splunkers,&lt;/P&gt;

&lt;P&gt;I'm having an alert with last 3 days as the time range and that alert is triggered everyday at a particular time showing the last 3 days data.. Now the thing I need is, the alert should be triggered when it is having data for the current day and it should not  trigger if it is having data for the previous days.. in addition to this condition, when the alert is having data for the current day then I must get the previous days data too no matter what..&lt;/P&gt;

&lt;P&gt;Note: My search time range must be last 3 days.. is that possible?&lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Mon, 18 Feb 2019 09:31:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Splunk-Alert/m-p/399697#M11781</guid>
      <dc:creator>sarahnazzar</dc:creator>
      <dc:date>2019-02-18T09:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Splunk-Alert/m-p/399698#M11782</link>
      <description>&lt;P&gt;@sarahnazzar ,&lt;/P&gt;

&lt;P&gt;Try this and see if it fits your requirement.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"your current search"
|eval date=strftime(_time,"%Y-%m-%d")
|eventstats dc(date) as noOfDays,max(_time) as latest_date
|eval latest_date=strftime(latest_date,"%Y-%m-%d")|eval current_date=strftime(now(),"%Y-%m-%d")
|where latest_date==current_date AND noOfDays&amp;gt;=3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This would give you results if latest date in the result is current date and if you have atleast 3 days of data in your results.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Feb 2019 12:06:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Splunk-Alert/m-p/399698#M11782</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-02-18T12:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Splunk-Alert/m-p/399699#M11783</link>
      <description>&lt;P&gt;Thanks for the help! It's working fine..&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 05:59:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Splunk-Alert/m-p/399699#M11783</guid>
      <dc:creator>sarahnazzar</dc:creator>
      <dc:date>2019-02-19T05:59:08Z</dc:date>
    </item>
  </channel>
</rss>

