<?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 Setup alert for two thresholds in Other Usage</title>
    <link>https://community.splunk.com/t5/Other-Usage/Setup-alert-for-two-thresholds/m-p/707505#M1884</link>
    <description>&lt;P&gt;I want to set up splunk alert that can have two threshold&amp;nbsp;&lt;BR /&gt;1. if the time is between 8 AM to 5PM - alert if AvgDuration is greater than 1000ms&lt;/P&gt;
&lt;P&gt;2. If time is between 5pm to next day 8AM - alert if avgduration is greater than 500ms&lt;/P&gt;
&lt;P&gt;How do i implement this&lt;BR /&gt;&lt;BR /&gt;Query am working on&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;mySearch&amp;gt;| bin _time span=1m|
stats avg(msg.DurationMs) AS AvgDuration by _time, msg.Service | where AvgDuration &amp;gt; 1000&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 23 Dec 2024 21:55:31 GMT</pubDate>
    <dc:creator>sivaranjani</dc:creator>
    <dc:date>2024-12-23T21:55:31Z</dc:date>
    <item>
      <title>Setup alert for two thresholds</title>
      <link>https://community.splunk.com/t5/Other-Usage/Setup-alert-for-two-thresholds/m-p/707505#M1884</link>
      <description>&lt;P&gt;I want to set up splunk alert that can have two threshold&amp;nbsp;&lt;BR /&gt;1. if the time is between 8 AM to 5PM - alert if AvgDuration is greater than 1000ms&lt;/P&gt;
&lt;P&gt;2. If time is between 5pm to next day 8AM - alert if avgduration is greater than 500ms&lt;/P&gt;
&lt;P&gt;How do i implement this&lt;BR /&gt;&lt;BR /&gt;Query am working on&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;mySearch&amp;gt;| bin _time span=1m|
stats avg(msg.DurationMs) AS AvgDuration by _time, msg.Service | where AvgDuration &amp;gt; 1000&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 23 Dec 2024 21:55:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Other-Usage/Setup-alert-for-two-thresholds/m-p/707505#M1884</guid>
      <dc:creator>sivaranjani</dc:creator>
      <dc:date>2024-12-23T21:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: Setup alert for two thresholds</title>
      <link>https://community.splunk.com/t5/Other-Usage/Setup-alert-for-two-thresholds/m-p/707506#M1885</link>
      <description>&lt;P&gt;You could calculate the current hour of the alert execution, then adjust the threshold at the end.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;mySearch&amp;gt;
| bin _time span=1m
| stats avg(msg.DurationMs) AS AvgDuration by _time, msg.Service
| eval hour = strftime(now(),"%H")
| where (AvgDuration &amp;gt; 1000 and hour &amp;gt;= 8 and hour &amp;lt; 17) or (AvgDuration &amp;gt; 500 AND (hour &amp;lt; 8 OR hour &amp;gt;= 17))&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 23 Dec 2024 19:49:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Other-Usage/Setup-alert-for-two-thresholds/m-p/707506#M1885</guid>
      <dc:creator>marnall</dc:creator>
      <dc:date>2024-12-23T19:49:20Z</dc:date>
    </item>
  </channel>
</rss>

