<?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: Send Alert if one event doesn't occur in 10 min in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Send-Alert-if-one-event-doesn-t-occur-in-10-min/m-p/311909#M93448</link>
    <description>&lt;P&gt;sourcetype=xyz ciscoLwappApIfDownNotify OR ciscoLwappApIfUpNotify OR bsnDot11StationAssociate | rex "CISCO-LWAPP-AP-MIB::cLApName.0&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;= STRING: (?&amp;lt;apname&amp;gt;\S+)" | rex "AIRESPACE-WIRELESS-MIB::bsnAPName.0 = STRING: \"(?&amp;lt;apname&amp;gt;\S+)?\"" | rex "CISCO-LWAPP-AP-MIB

::cLApDot11IfSlotId.0 = Gauge32: (?&amp;lt;radioslot&amp;gt;\S+)" | rex "AIRESPACE-WIRELESS-MIB::bsnStationAPIfSlotId.0 = INTEGER: (?&amp;lt;radioslot

&amp;gt;\S+)"| stats earliest(_time) as _time latest(_time) as time latest(snmpTrapOID_0) as action values(radioslot) as radioslot

values(cLApIfUpDownCause_0) as Cause values(cLApIfUpDownFailureCode_0) as failurecode values(cLApIfUpDownFailureType_0) as

failuretype values(cLApSysMacAddress_0) as apmac values(cLApAdminStatus_0) as adminstatus by apname | eval age=now()-time | where

age&amp;gt;300 AND action="OID: CISCO-LWAPP-AP-MIB::ciscoLwappApIfDownNotify"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I run this every 30 min for past 5 hrs, currently 2 results are shown but I don't receive as an alert&lt;/P&gt;</description>
    <pubDate>Sun, 26 Nov 2017 15:07:01 GMT</pubDate>
    <dc:creator>syjayaraj</dc:creator>
    <dc:date>2017-11-26T15:07:01Z</dc:date>
    <item>
      <title>Send Alert if one event doesn't occur in 10 min</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Send-Alert-if-one-event-doesn-t-occur-in-10-min/m-p/311905#M93444</link>
      <description>&lt;P&gt;I have used transaction and non transaction method.&lt;BR /&gt;
Non transaction method yields result but the results are not being sent as an alert.&lt;BR /&gt;
Could some one help how to achieve without using stats earliest latest commands, probably using if condition.&lt;BR /&gt;
Example:&lt;/P&gt;

&lt;P&gt;Event1:  hostname slot 1 down&lt;BR /&gt;
Event2:  hostname slot 1 up&lt;/P&gt;

&lt;P&gt;If event 2 doesn't arive in 10 min , I need to get an alert ,&lt;BR /&gt;
Give examples if event 2 also be in different source type&lt;/P&gt;</description>
      <pubDate>Sun, 26 Nov 2017 10:03:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Send-Alert-if-one-event-doesn-t-occur-in-10-min/m-p/311905#M93444</guid>
      <dc:creator>syjayaraj</dc:creator>
      <dc:date>2017-11-26T10:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: Send Alert if one event doesn't occur in 10 min</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Send-Alert-if-one-event-doesn-t-occur-in-10-min/m-p/311906#M93445</link>
      <description>&lt;P&gt;Why is there the arbitrary constraint on not being able to use the stats earliest or latest commands?  (It's not necessarily an issue in finding a solution, but I think many people who read this would like to know - have you had issues out of those before?  Do you have a earliest/latest solution but someone's double-dared you to do it without?)&lt;/P&gt;</description>
      <pubDate>Sun, 26 Nov 2017 12:48:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Send-Alert-if-one-event-doesn-t-occur-in-10-min/m-p/311906#M93445</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2017-11-26T12:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: Send Alert if one event doesn't occur in 10 min</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Send-Alert-if-one-event-doesn-t-occur-in-10-min/m-p/311907#M93446</link>
      <description>&lt;P&gt;“hostname slot 1 down” OR “hostname slot 1 up” _index_earliest=-15m@m _index_latest=-5m@m&lt;/P&gt;

&lt;P&gt;Trigger condition is if number of results are less than 2, corn schedule is &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; 0,10,20,30,40,50 * * * *
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Assumes you only get one “down” event and don’t have any fields extracted.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:56:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Send-Alert-if-one-event-doesn-t-occur-in-10-min/m-p/311907#M93446</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-09-29T16:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: Send Alert if one event doesn't occur in 10 min</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Send-Alert-if-one-event-doesn-t-occur-in-10-min/m-p/311908#M93447</link>
      <description>&lt;P&gt;Dear Rich, &lt;BR /&gt;
I have spent considerable amount of time to get an alert, till now no luck,&lt;BR /&gt;
When run manually it shows the results but not as alert email(email never comes)&lt;/P&gt;

&lt;P&gt;Transaction never works at all&lt;/P&gt;

&lt;P&gt;Something splunk doesn't like,&lt;BR /&gt;
I'll post exact search string&lt;/P&gt;</description>
      <pubDate>Sun, 26 Nov 2017 14:37:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Send-Alert-if-one-event-doesn-t-occur-in-10-min/m-p/311908#M93447</guid>
      <dc:creator>syjayaraj</dc:creator>
      <dc:date>2017-11-26T14:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Send Alert if one event doesn't occur in 10 min</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Send-Alert-if-one-event-doesn-t-occur-in-10-min/m-p/311909#M93448</link>
      <description>&lt;P&gt;sourcetype=xyz ciscoLwappApIfDownNotify OR ciscoLwappApIfUpNotify OR bsnDot11StationAssociate | rex "CISCO-LWAPP-AP-MIB::cLApName.0&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;= STRING: (?&amp;lt;apname&amp;gt;\S+)" | rex "AIRESPACE-WIRELESS-MIB::bsnAPName.0 = STRING: \"(?&amp;lt;apname&amp;gt;\S+)?\"" | rex "CISCO-LWAPP-AP-MIB

::cLApDot11IfSlotId.0 = Gauge32: (?&amp;lt;radioslot&amp;gt;\S+)" | rex "AIRESPACE-WIRELESS-MIB::bsnStationAPIfSlotId.0 = INTEGER: (?&amp;lt;radioslot

&amp;gt;\S+)"| stats earliest(_time) as _time latest(_time) as time latest(snmpTrapOID_0) as action values(radioslot) as radioslot

values(cLApIfUpDownCause_0) as Cause values(cLApIfUpDownFailureCode_0) as failurecode values(cLApIfUpDownFailureType_0) as

failuretype values(cLApSysMacAddress_0) as apmac values(cLApAdminStatus_0) as adminstatus by apname | eval age=now()-time | where

age&amp;gt;300 AND action="OID: CISCO-LWAPP-AP-MIB::ciscoLwappApIfDownNotify"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I run this every 30 min for past 5 hrs, currently 2 results are shown but I don't receive as an alert&lt;/P&gt;</description>
      <pubDate>Sun, 26 Nov 2017 15:07:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Send-Alert-if-one-event-doesn-t-occur-in-10-min/m-p/311909#M93448</guid>
      <dc:creator>syjayaraj</dc:creator>
      <dc:date>2017-11-26T15:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: Send Alert if one event doesn't occur in 10 min</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Send-Alert-if-one-event-doesn-t-occur-in-10-min/m-p/311910#M93449</link>
      <description>&lt;P&gt;Index earliest I tried I believe;&lt;BR /&gt;
Still I have to use stats earliest and latest right?&lt;/P&gt;</description>
      <pubDate>Sun, 26 Nov 2017 15:09:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Send-Alert-if-one-event-doesn-t-occur-in-10-min/m-p/311910#M93449</guid>
      <dc:creator>syjayaraj</dc:creator>
      <dc:date>2017-11-26T15:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: Send Alert if one event doesn't occur in 10 min</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Send-Alert-if-one-event-doesn-t-occur-in-10-min/m-p/311911#M93450</link>
      <description>&lt;P&gt;Not really. At least in most cases I can think of the only time you might really need stats latest or earliest would be to do “more work” on the results afterwards. The use case you presented seems like it has simpler solutions, like the one that jkat54 provided. &lt;/P&gt;

&lt;P&gt;I would use a cron of &lt;CODE&gt;*/10 * * * *&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Nov 2017 15:38:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Send-Alert-if-one-event-doesn-t-occur-in-10-min/m-p/311911#M93450</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2017-11-26T15:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: Send Alert if one event doesn't occur in 10 min</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Send-Alert-if-one-event-doesn-t-occur-in-10-min/m-p/311912#M93451</link>
      <description>&lt;P&gt;No, this search is going to run every 10 minutes and account for indexing latency of up to 5 minutes.  If there are less than two events found, then it will trigger the alert.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2017 00:19:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Send-Alert-if-one-event-doesn-t-occur-in-10-min/m-p/311912#M93451</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-11-27T00:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: Send Alert if one event doesn't occur in 10 min</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Send-Alert-if-one-event-doesn-t-occur-in-10-min/m-p/311913#M93452</link>
      <description>&lt;P&gt;Not working in my case&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2017 17:21:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Send-Alert-if-one-event-doesn-t-occur-in-10-min/m-p/311913#M93452</guid>
      <dc:creator>syjayaraj</dc:creator>
      <dc:date>2017-11-27T17:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: Send Alert if one event doesn't occur in 10 min</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Send-Alert-if-one-event-doesn-t-occur-in-10-min/m-p/311914#M93453</link>
      <description>&lt;P&gt;If you run the search it's based on as a regular search, does that return results?  Would any of those returned results indicate the alert &lt;EM&gt;should&lt;/EM&gt; have fired? &lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2017 17:23:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Send-Alert-if-one-event-doesn-t-occur-in-10-min/m-p/311914#M93453</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2017-11-27T17:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Send Alert if one event doesn't occur in 10 min</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Send-Alert-if-one-event-doesn-t-occur-in-10-min/m-p/311915#M93454</link>
      <description>&lt;P&gt;Run this every minute for the last 11 minutes:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | stats count count(eval(status="up")) AS ups max(_time) AS _time BY host slot
| where ups=0 and count&amp;gt;1 AND (now() - _time) &amp;gt; (10 * 60))
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Dec 2017 03:00:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Send-Alert-if-one-event-doesn-t-occur-in-10-min/m-p/311915#M93454</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-12-04T03:00:00Z</dc:date>
    </item>
  </channel>
</rss>

