<?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 How to set up an alert to trigger only if a second search does not return results within 30 seconds of the previous search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-an-alert-to-trigger-only-if-a-second-search-does/m-p/240983#M71638</link>
    <description>&lt;P&gt;I have a current alert that is working as expected to capture a log event that states a service is down.  We have started to receive many false positives on this because the service automatically recovers in a matter of seconds.  I would like to change the alert so that instead of immediately sending a notification, it will pause for 30 seconds and search for a recovery event and only send the notification if that recovery is not found.  &lt;/P&gt;

&lt;P&gt;edit:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=networklogs host=foo10* OR host=foo11* AND ("member" AND "monitor status down") 
   |rex "monitor status\s+(?&amp;lt;State&amp;gt;\w+)"
   |rex "member /Common/(?&amp;lt;trpHost&amp;gt;[^:]+):53"
  |eval Identifier=trpHost + "dropped out of the VIP pool"
  |eval Summary="Critical Infrastructure - Server dropped out of the VIP pool.  Pool member is " + State + "."
  |eval ProcessID="foo"
  |eval Severity=if(
          State=="down",
            5,
            1
        )
  | eval Type=if(State=="down",
                     1,
                     2
            )
  |eval OwnerGID=1000 
  |eval ForceUpdateFields="Severity,Type,Summary"
  |eval Submitter="foo"
  |eval LOB="IP"
  |eval AlertGroup="VIP Member Dropped out"
  |eval Agent="rdns"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 17 Nov 2016 14:52:27 GMT</pubDate>
    <dc:creator>dnsGuy314</dc:creator>
    <dc:date>2016-11-17T14:52:27Z</dc:date>
    <item>
      <title>How to set up an alert to trigger only if a second search does not return results within 30 seconds of the previous search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-an-alert-to-trigger-only-if-a-second-search-does/m-p/240983#M71638</link>
      <description>&lt;P&gt;I have a current alert that is working as expected to capture a log event that states a service is down.  We have started to receive many false positives on this because the service automatically recovers in a matter of seconds.  I would like to change the alert so that instead of immediately sending a notification, it will pause for 30 seconds and search for a recovery event and only send the notification if that recovery is not found.  &lt;/P&gt;

&lt;P&gt;edit:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=networklogs host=foo10* OR host=foo11* AND ("member" AND "monitor status down") 
   |rex "monitor status\s+(?&amp;lt;State&amp;gt;\w+)"
   |rex "member /Common/(?&amp;lt;trpHost&amp;gt;[^:]+):53"
  |eval Identifier=trpHost + "dropped out of the VIP pool"
  |eval Summary="Critical Infrastructure - Server dropped out of the VIP pool.  Pool member is " + State + "."
  |eval ProcessID="foo"
  |eval Severity=if(
          State=="down",
            5,
            1
        )
  | eval Type=if(State=="down",
                     1,
                     2
            )
  |eval OwnerGID=1000 
  |eval ForceUpdateFields="Severity,Type,Summary"
  |eval Submitter="foo"
  |eval LOB="IP"
  |eval AlertGroup="VIP Member Dropped out"
  |eval Agent="rdns"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Nov 2016 14:52:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-an-alert-to-trigger-only-if-a-second-search-does/m-p/240983#M71638</guid>
      <dc:creator>dnsGuy314</dc:creator>
      <dc:date>2016-11-17T14:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up an alert to trigger only if a second search does not return results within 30 seconds of the previous search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-an-alert-to-trigger-only-if-a-second-search-does/m-p/240984#M71639</link>
      <description>&lt;P&gt;Can you share your query?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2016 15:55:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-an-alert-to-trigger-only-if-a-second-search-does/m-p/240984#M71639</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-11-17T15:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up an alert to trigger only if a second search does not return results within 30 seconds of the previous search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-an-alert-to-trigger-only-if-a-second-search-does/m-p/240985#M71640</link>
      <description>&lt;P&gt;I cannot edit the original post or submit any further replies so,  here is the second search that should generate the alert if no results are found:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  index=networklogs host=foo10* OR host=foo11* AND ("member" AND "monitor status up")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Nov 2016 17:16:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-an-alert-to-trigger-only-if-a-second-search-does/m-p/240985#M71640</guid>
      <dc:creator>dnsGuy314</dc:creator>
      <dc:date>2016-11-17T17:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up an alert to trigger only if a second search does not return results within 30 seconds of the previous search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-an-alert-to-trigger-only-if-a-second-search-does/m-p/240986#M71641</link>
      <description>&lt;P&gt;Try this &lt;/P&gt;

&lt;P&gt;*&lt;STRONG&gt;&lt;EM&gt;UPDATED&lt;/EM&gt;&lt;/STRONG&gt;*&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=networklogs host=foo10* OR host=foo11* AND "member" AND ("monitor status up" OR "monitor status down") | rex "monitor status\s+(?&amp;lt;state&amp;gt;up|down)" | transaction host startswith="monitor status down" endswith="monitor status up" maxspan=30s maxevents=2 keepevicted=t | where closed_txn=0 AND state="down"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Nov 2016 21:27:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-an-alert-to-trigger-only-if-a-second-search-does/m-p/240986#M71641</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-11-17T21:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up an alert to trigger only if a second search does not return results within 30 seconds of the previous search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-an-alert-to-trigger-only-if-a-second-search-does/m-p/240987#M71642</link>
      <description>&lt;P&gt;How can I test this?  &lt;/P&gt;

&lt;P&gt;I tried changing the maxspan to 1s and set the timeframe to where we had false positives of 6s downtime but I still didn't get a result.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2016 14:11:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-an-alert-to-trigger-only-if-a-second-search-does/m-p/240987#M71642</guid>
      <dc:creator>dnsGuy314</dc:creator>
      <dc:date>2016-11-18T14:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up an alert to trigger only if a second search does not return results within 30 seconds of the previous search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-an-alert-to-trigger-only-if-a-second-search-does/m-p/240988#M71643</link>
      <description>&lt;P&gt;My bad, try updated query&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2016 14:18:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-an-alert-to-trigger-only-if-a-second-search-does/m-p/240988#M71643</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-11-18T14:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up an alert to trigger only if a second search does not return results within 30 seconds of the previous search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-an-alert-to-trigger-only-if-a-second-search-does/m-p/240989#M71644</link>
      <description>&lt;P&gt;would my test scenario be correct then?  adjust the maxspan?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2016 14:21:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-an-alert-to-trigger-only-if-a-second-search-does/m-p/240989#M71644</guid>
      <dc:creator>dnsGuy314</dc:creator>
      <dc:date>2016-11-18T14:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up an alert to trigger only if a second search does not return results within 30 seconds of the previous search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-an-alert-to-trigger-only-if-a-second-search-does/m-p/240990#M71645</link>
      <description>&lt;P&gt;you could play around with maxspan, yes&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2016 14:43:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-an-alert-to-trigger-only-if-a-second-search-does/m-p/240990#M71645</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-11-18T14:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up an alert to trigger only if a second search does not return results within 30 seconds of the previous search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-an-alert-to-trigger-only-if-a-second-search-does/m-p/240991#M71646</link>
      <description>&lt;P&gt;I'm not having success with this.  Can you breakdown what you suggested into what it is doing?  I don't understand the field closed_txn=0&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2016 16:30:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-an-alert-to-trigger-only-if-a-second-search-does/m-p/240991#M71646</guid>
      <dc:creator>dnsGuy314</dc:creator>
      <dc:date>2016-11-18T16:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up an alert to trigger only if a second search does not return results within 30 seconds of the previous search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-an-alert-to-trigger-only-if-a-second-search-does/m-p/240992#M71647</link>
      <description>&lt;P&gt;&lt;CODE&gt;closed_txn=0&lt;/CODE&gt; will show transactions that don't have 2 events (start and end). &lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2016 03:08:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-an-alert-to-trigger-only-if-a-second-search-does/m-p/240992#M71647</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-12-07T03:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up an alert to trigger only if a second search does not return results within 30 seconds of the previous</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-an-alert-to-trigger-only-if-a-second-search-does/m-p/537828#M152057</link>
      <description>&lt;P&gt;Is it resolved, I am also trying for same kind of query , when a state changes from CLOSED to OPEN , i am logging these message like (state changes from closed to open, state changes from open to close). Now I want trigger an alert &lt;EM&gt;when after changing the state from closed to open&amp;nbsp; if it does not change back to closed in 10 minute.&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 11:01:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-an-alert-to-trigger-only-if-a-second-search-does/m-p/537828#M152057</guid>
      <dc:creator>Anupriya_Kumawa</dc:creator>
      <dc:date>2021-01-29T11:01:10Z</dc:date>
    </item>
  </channel>
</rss>

