<?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: Creating alert for if device went offline and recovery status. in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671712#M15613</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="parthiban_0-1702467457052.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/28483iE23C7FECFE8D14DC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="parthiban_0-1702467457052.png" alt="parthiban_0-1702467457052.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I've shared an example Splunk payload. In that, we have the 'onlinestatus' field under 'response details,' 'response payload,' and 'entities.' First, we need to extract the 'onlinestatus' and serial number (for identifying the device) before applying the condition for the alert right?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Dec 2023 12:31:16 GMT</pubDate>
    <dc:creator>parthiban</dc:creator>
    <dc:date>2023-12-13T12:31:16Z</dc:date>
    <item>
      <title>Creating alert for if device went offline and recovery status.</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671503#M15588</link>
      <description>&lt;P&gt;Hi everyone&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We have an on-premise edge device in the remote location, and it is added to the cloud. I would like to monitor and set an alert for both device offline and recovery statuses.&lt;BR /&gt;&lt;BR /&gt;While I can set an alert for the offline status, I'm a bit confused about including the recovery status. Can you please assist me in configuring the alert for both scenarios?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 03:36:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671503#M15588</guid>
      <dc:creator>parthiban</dc:creator>
      <dc:date>2023-12-12T03:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Creating alert for if device went offline and recovery status.</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671511#M15589</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/261434"&gt;@parthiban&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;let me understand, you have logs from this remote device.&lt;/P&gt;&lt;P&gt;in these logs there's a status fields, in which there can be the "recovery" value; then you want to monitor if the device is up and running sending logs, is it correct?&lt;/P&gt;&lt;P&gt;If this is your requirement, please try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index device=your_device
| stats count BY status
| append [ | makeresults | eval device=your_device, count=0 | fields device count ]
| stats sum(count) AS total BY status
| eval status=if(total=0,"down",status)
| search status="recovery" OR status="down"
| table status&lt;/LI-CODE&gt;&lt;P&gt;if you have more devices to monitor you can put them in a lookup (called e.g. perimeter.csv), containing at least one column (device) and run something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index 
| stats count BY device status
| append [ | inputlookup perimeter.csv | eval count=0 | fields device count ]
| stats sum(count) AS total BY device status
| eval status=if(total=0,"down",status)
| search status="recovery" OR status="down"
| table device status&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 07:12:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671511#M15589</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-12-12T07:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: Creating alert for if device went offline and recovery status.</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671518#M15590</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the log, we receive the payload model below. In the 'entities' section, I've only specified one device status, but in reality, there are 11 device statuses in a single log message. I want to create an alert: if a device goes offline, it will trigger one alert, and when it comes online, it will trigger a clear alarm alert. I specify having only one alert because we receive logs every 2 minutes from AWS, and to avoid multiple alerts for the same device going offline and online.&lt;/SPAN&gt;.&amp;nbsp; &lt;SPAN&gt;Hope it is clear what my requirement is.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;response_details:&lt;BR /&gt;▼{&lt;/P&gt;&lt;P&gt;response_payload:▼&lt;BR /&gt;{&lt;BR /&gt;entities:&lt;BR /&gt;&lt;BR /&gt;▼{&lt;BR /&gt;id:"YYYYYYY",&lt;BR /&gt;name:"ABC",&lt;BR /&gt;onlineStatus:"ONLINE",&lt;BR /&gt;serialNumber:"XXXXXXX",&lt;/P&gt;&lt;P&gt;},&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 08:04:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671518#M15590</guid>
      <dc:creator>parthiban</dc:creator>
      <dc:date>2023-12-12T08:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Creating alert for if device went offline and recovery status.</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671520#M15591</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/261434"&gt;@parthiban&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please confirm:&amp;nbsp;you want an alert if&amp;nbsp;&lt;SPAN&gt;onlineStatus="recovery" or if, for a defined period, you don't receive logs from a device is is correct?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In this case, you can use my second search creating a list of devices to monitor in a lookup.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ciao.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Giuseppe&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 08:10:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671520#M15591</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-12-12T08:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: Creating alert for if device went offline and recovery status.</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671522#M15592</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Yes want alert for online status="OFFLINE" and online status="Online"&amp;nbsp; for the same device&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 08:26:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671522#M15592</guid>
      <dc:creator>parthiban</dc:creator>
      <dc:date>2023-12-12T08:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: Creating alert for if device went offline and recovery status.</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671524#M15593</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/261434"&gt;@parthiban&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;ok, but how can the device send a status if it's offline?&lt;/P&gt;&lt;P&gt;if it continue to send logs even if it's offline, you can add this condition to the search, but, as I suppose, it doesnt sends logs when offline, you can use my search.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 08:37:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671524#M15593</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-12-12T08:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Creating alert for if device went offline and recovery status.</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671528#M15594</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is on premises device and managed by cloud. If device went offline cloud will send log.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which condition I need to add ?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 09:44:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671528#M15594</guid>
      <dc:creator>parthiban</dc:creator>
      <dc:date>2023-12-12T09:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Creating alert for if device went offline and recovery status.</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671529#M15595</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/261434"&gt;@parthiban&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;status = "OFFLINE"&lt;/P&gt;&lt;P&gt;please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index 
| stats count BY device status
| append [ | inputlookup perimeter.csv | eval count=0 | fields device count ]
| stats sum(count) AS total BY device status
| eval status=if(total=0,"down",status)
| search status="recovery" OR status="offline" OR status="down"
| table device status&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 09:49:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671529#M15595</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-12-12T09:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: Creating alert for if device went offline and recovery status.</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671532#M15596</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;| rename "response_details.response_payload.entities{}.onlineStatus" as status&lt;BR /&gt;| stats count BY status&lt;BR /&gt;| append [ | makeresults | eval name=xxxx, count=0 | fields name ]&lt;BR /&gt;| stats sum(count) AS total BY status&lt;BR /&gt;| eval status=if(total=0,"OFFLINE",status)&lt;BR /&gt;| search status="ONLINE" OR status="OFFLINE"&lt;BR /&gt;| table status&lt;BR /&gt;&lt;BR /&gt;I getting result is "ONLINE"&lt;BR /&gt;&lt;BR /&gt;How it will works on the alert ?&amp;nbsp; How can I set in the alert? Can you please guide me&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 10:23:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671532#M15596</guid>
      <dc:creator>parthiban</dc:creator>
      <dc:date>2023-12-12T10:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: Creating alert for if device went offline and recovery status.</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671573#M15597</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/261434"&gt;@parthiban&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;probably there's a misundertanding one the condition to check:&lt;/P&gt;&lt;P&gt;I understood that you want to check if status="recovery" or status=down, and I check for these statuses, but what's your requirement?&lt;/P&gt;&lt;P&gt;with your search you check status=down and status=online, is this the requirement?&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 13:34:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671573#M15597</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-12-12T13:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: Creating alert for if device went offline and recovery status.</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671582#M15598</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Let me clarify,&lt;BR /&gt;We receive device status logs every 2 minutes from AWS Cloud. These logs indicate both online and offline statuses. If a device goes offline, we continuously receive offline logs until it comes back online, at which point we receive online logs for that specific device.&lt;/P&gt;&lt;P&gt;My requirement is to trigger a critical alert for the end user when a particular device goes offline. Subsequently, I will notify the end user when the device comes back online. Based I need to create alert. Is this possible?&amp;nbsp; also I have already shared example logs in this conversation.&lt;BR /&gt;&lt;BR /&gt;Moreover we have this type of alert is working other observability application, now we are migrating to Splunk.&lt;/P&gt;&lt;P&gt;I hope this clarifies my requirement. Please let me know anything required.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 14:11:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671582#M15598</guid>
      <dc:creator>parthiban</dc:creator>
      <dc:date>2023-12-12T14:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Creating alert for if device went offline and recovery status.</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671587#M15599</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/261434"&gt;@parthiban&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;it isn't a problem notification when status is offline but, after the first offline, do you want that the alert continues to fire "offline", or do you want a message when it comes back on line?&lt;/P&gt;&lt;P&gt;&amp;nbsp;if you want a message every time you have offline and the following online, you could try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| stats 
   count(eval(status="offline")) AS offline_count
   count(eval(status="online")) AS online_count
   earliest(eval(if(status="offline",_time,""))) AS offline
   earliest(eval(if(status="online",_time,""))) AS online
| fillnull value=0 offline_count
| fillnull value=0 online_count
| eval condition=case(
   offline_count=0 AND online_count&amp;gt;0,"Online",
   offline_count&amp;gt;0 AND online_count=0,"Offline",
   offline_count&amp;gt;0 AND online_count&amp;gt;0 AND online&amp;gt;offline, "Offline but newly online"),   
   offline_count&amp;gt;0 AND online_count&amp;gt;0 AND online&amp;gt;offline, "Offline"),   
   offline_count=0 AND online_count=0, "No data")
| table condition&lt;/LI-CODE&gt;&lt;P&gt;in this way you can choose the conditions to trigger the alert.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 14:51:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671587#M15599</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-12-12T14:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: Creating alert for if device went offline and recovery status.</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671589#M15600</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No, don't want cont alert for offline... I want to trigger first offline and first online message. Thanks for understanding.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 15:10:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671589#M15600</guid>
      <dc:creator>parthiban</dc:creator>
      <dc:date>2023-12-12T15:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: Creating alert for if device went offline and recovery status.</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671600#M15601</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/261434"&gt;@parthiban&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;you have only to setup the conditions for the alert:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| stats 
   count(eval(status="offline")) AS offline_count
   count(eval(status="online")) AS online_count
   earliest(eval(if(status="offline",_time,""))) AS offline
   earliest(eval(if(status="online",_time,""))) AS online
| fillnull value=0 offline_count
| fillnull value=0 online_count
| eval condition=case(
   offline_count=0 AND online_count&amp;gt;0,"Online",
   offline_count&amp;gt;0 AND online_count=0,"Offline",
   offline_count&amp;gt;0 AND online_count&amp;gt;0 AND online&amp;gt;offline, "Offline but newly online"),   
   offline_count&amp;gt;0 AND online_count&amp;gt;0 AND online&amp;gt;offline, "Offline"),   
   offline_count=0 AND online_count=0, "No data")
| search condition="Offline" OR condition="Offline but newly online"
| table condition&lt;/LI-CODE&gt;&lt;P&gt;in this way your alert will trigger the two conditions.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 15:39:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671600#M15601</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-12-12T15:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: Creating alert for if device went offline and recovery status.</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671625#M15602</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried which you given code, it is not working throwing some error.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Error in 'EvalCommand': Type checking failed. 'AND' only takes boolean arguments"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;index="XXXX"&amp;nbsp;&lt;BR /&gt;| rename "response_details.response_payload.entities{}" as status&lt;BR /&gt;| where name="YYYY"&lt;BR /&gt;| stats&lt;BR /&gt;count(eval(status="offline")) AS offline_count&lt;BR /&gt;count(eval(status="online")) AS online_count&lt;BR /&gt;earliest(eval(if(status="offline",_time,""))) AS offline&lt;BR /&gt;earliest(eval(if(status="online",_time,""))) AS online&lt;BR /&gt;| fillnull value=0 offline_count&lt;BR /&gt;| fillnull value=0 online_count&lt;BR /&gt;| eval condition=case(&lt;BR /&gt;offline_count=0 AND online_count&amp;gt;0,"Online",&lt;BR /&gt;offline_count&amp;gt;0 AND online_count=0,"Offline",&lt;BR /&gt;offline_count&amp;gt;0 AND online_count&amp;gt;0 AND online&amp;gt;offline, "Offline but newly online"),&lt;BR /&gt;offline_count&amp;gt;0 AND online_count&amp;gt;0 AND online&amp;gt;offline, "Offline"),&lt;BR /&gt;offline_count=0 AND online_count=0, "No data")&lt;BR /&gt;| search condition="Offline" OR condition="Offline but newly online"&lt;BR /&gt;| table condition&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 17:27:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671625#M15602</guid>
      <dc:creator>parthiban</dc:creator>
      <dc:date>2023-12-12T17:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: Creating alert for if device went offline and recovery status.</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671627#M15603</link>
      <description>&lt;P&gt;Hi, sorry, please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="XXXX" 
| rename "response_details.response_payload.entities{}" as status
| where name="YYYY"
| stats
count(eval(status="offline")) AS offline_count
count(eval(status="online")) AS online_count
earliest(eval(if(status="offline",_time,""))) AS offline
earliest(eval(if(status="online",_time,""))) AS online
| fillnull value=0 offline_count
| fillnull value=0 online_count
| eval condition=case(
   offline_count=0 AND online_count&amp;gt;0,"Online",
   offline_count&amp;gt;0 AND online_count=0,"Offline",
   offline_count&amp;gt;0 AND online_count&amp;gt;0 AND online&amp;gt;offline, "Offline but newly 
online",
   offline_count&amp;gt;0 AND online_count&amp;gt;0 AND online&amp;gt;offline, "Offline",
   offline_count=0 AND online_count=0, "No data")
| search condition="Offline" OR condition="Offline but newly online"
| table condition&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 17:30:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671627#M15603</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-12-12T17:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: Creating alert for if device went offline and recovery status.</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671660#M15604</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This time its runs without error, but no result found.&lt;/P&gt;&lt;P&gt;index="XXXX" "Genesys system is available"&lt;BR /&gt;| rename "response_details.response_payload.entities{}.onlineStatus" as status&lt;BR /&gt;| where name="YYYY"&lt;BR /&gt;| stats&lt;BR /&gt;count(eval(status="offline")) AS offline_count&lt;BR /&gt;count(eval(status="online")) AS online_count&lt;BR /&gt;earliest(eval(if(status="offline",_time,""))) AS offline&lt;BR /&gt;earliest(eval(if(status="online",_time,""))) AS online&lt;BR /&gt;| fillnull value=0 offline_count&lt;BR /&gt;| fillnull value=0 online_count&lt;BR /&gt;| eval condition=case(&lt;BR /&gt;offline_count=0 AND online_count&amp;gt;0,"Online",&lt;BR /&gt;offline_count&amp;gt;0 AND online_count=0,"Offline",&lt;BR /&gt;offline_count&amp;gt;0 AND online_count&amp;gt;0 AND online&amp;gt;offline, "Offline but newly&lt;BR /&gt;online",&lt;BR /&gt;offline_count&amp;gt;0 AND online_count&amp;gt;0 AND online&amp;gt;offline, "Offline",&lt;BR /&gt;offline_count=0 AND online_count=0, "No data")&lt;BR /&gt;| search condition="Offline" OR condition="Offline but newly online"&lt;BR /&gt;| table condition&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 04:01:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671660#M15604</guid>
      <dc:creator>parthiban</dc:creator>
      <dc:date>2023-12-13T04:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: Creating alert for if device went offline and recovery status.</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671670#M15605</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/261434"&gt;@parthiban&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I found an error in the eval definition, but it shouldn't be the issue:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="XXXX" "Genesys system is available"
| rename "response_details.response_payload.entities{}.onlineStatus" as status
| where name="YYYY"
| stats
count(eval(status="offline")) AS offline_count
count(eval(status="online")) AS online_count
earliest(eval(if(status="offline",_time,""))) AS offline
earliest(eval(if(status="online",_time,""))) AS online
| fillnull value=0 offline_count
| fillnull value=0 online_count
| eval condition=case(
offline_count=0 AND online_count&amp;gt;0,"Online",
offline_count&amp;gt;0 AND online_count=0,"Offline",
offline_count&amp;gt;0 AND online_count&amp;gt;0 AND online&amp;gt;offline, "Offline but newly
online",
offline_count&amp;gt;0 AND online_count&amp;gt;0 AND offline&amp;gt;online, "Offline",
offline_count=0 AND online_count=0, "No data")
| search condition="Offline" OR condition="Offline but newly online"
| table condition&lt;/LI-CODE&gt;&lt;P&gt;Debug the search, to understand if the search conditions are verified or not: remove the search statement and see which values you have.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 08:08:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671670#M15605</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-12-13T08:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Creating alert for if device went offline and recovery status.</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671673#M15606</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;If I remove the below search condition I get this result.&lt;/P&gt;&lt;PRE&gt;| search condition="Offline" OR condition="Offline but newly online"
| table condition&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="parthiban_0-1702457118544.png" style="width: 771px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/28475i92CFE93735DB1158/image-dimensions/771x74?v=v2" width="771" height="74" role="button" title="parthiban_0-1702457118544.png" alt="parthiban_0-1702457118544.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 08:47:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671673#M15606</guid>
      <dc:creator>parthiban</dc:creator>
      <dc:date>2023-12-13T08:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: Creating alert for if device went offline and recovery status.</title>
      <link>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671674#M15607</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/261434"&gt;@parthiban&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;use the correct field for "status" and check if the conditions in the stats command are the correct ones.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 08:54:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Creating-alert-for-if-device-went-offline-and-recovery-status/m-p/671674#M15607</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-12-13T08:54:03Z</dc:date>
    </item>
  </channel>
</rss>

