<?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 do you send an alert when the number of records goes below 20% of the daily avg? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-send-an-alert-when-the-number-of-records-goes-below/m-p/428637#M122623</link>
    <description>&lt;P&gt;Check out this Q&amp;amp;A!!!!!&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/511894/how-to-use-the-timewrap-command-and-set-an-alert-f.html"&gt;https://answers.splunk.com/answers/511894/how-to-use-the-timewrap-command-and-set-an-alert-f.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Jan 2019 19:05:55 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2019-01-25T19:05:55Z</dc:date>
    <item>
      <title>How do you send an alert when the number of records goes below 20% of the daily avg?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-send-an-alert-when-the-number-of-records-goes-below/m-p/428634#M122620</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;

&lt;P&gt;I am using the below query to get an average count . But how do I write a query to send an alert when the number of records goes below 20% of the daily average?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index= abc platform=xyz | stats avg(count) by _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 Jan 2019 14:27:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-send-an-alert-when-the-number-of-records-goes-below/m-p/428634#M122620</guid>
      <dc:creator>navd</dc:creator>
      <dc:date>2019-01-25T14:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do you send an alert when the number of records goes below 20% of the daily avg?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-send-an-alert-when-the-number-of-records-goes-below/m-p/428635#M122621</link>
      <description>&lt;P&gt;Assuming you're running the alert daily to compare yesterday's (full day) count to check if it was less than daily average count over last 7 day (or 7 days prior to yesterday),  try something like this (timerange selected to include data for past 8 days, excluding today):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=abc platform=xyz earliest=-8d@d latest=@d | timechart span=1d count
| eval yesterday=if(_time=relative_time(now(),"-1d@d"), count, null())
| eval lastweek=if(_time&amp;lt;relative_time(now(),"-1d@d"), count, null())
| stats values(yesterday) as yesterday avg(lastweek) as dailyavg
| where yesterday&amp;lt;=0.8*dailyavg
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 Jan 2019 15:34:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-send-an-alert-when-the-number-of-records-goes-below/m-p/428635#M122621</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-01-25T15:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do you send an alert when the number of records goes below 20% of the daily avg?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-send-an-alert-when-the-number-of-records-goes-below/m-p/428636#M122622</link>
      <description>&lt;P&gt;@somesoni2&lt;BR /&gt;
I tried using the above query , but It don't see any results .&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2019 17:28:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-send-an-alert-when-the-number-of-records-goes-below/m-p/428636#M122622</guid>
      <dc:creator>navd</dc:creator>
      <dc:date>2019-01-25T17:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do you send an alert when the number of records goes below 20% of the daily avg?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-send-an-alert-when-the-number-of-records-goes-below/m-p/428637#M122623</link>
      <description>&lt;P&gt;Check out this Q&amp;amp;A!!!!!&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/511894/how-to-use-the-timewrap-command-and-set-an-alert-f.html"&gt;https://answers.splunk.com/answers/511894/how-to-use-the-timewrap-command-and-set-an-alert-f.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2019 19:05:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-send-an-alert-when-the-number-of-records-goes-below/m-p/428637#M122623</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-01-25T19:05:55Z</dc:date>
    </item>
  </channel>
</rss>

