Hi @parthiban, ok, you could use this approach: create an alert that doesn't send an email running this search: index= "XXXXX" "Genesys system is available"
| spath input=_raw output=new_field pat...
See more...
Hi @parthiban, ok, you could use this approach: create an alert that doesn't send an email running this search: index= "XXXXX" "Genesys system is available"
| spath input=_raw output=new_field path=response_details.response_payload.entities{}
| mvexpand new_field
| fields new_field
| spath input=new_field output=serialNumber path=serialNumber
| spath input=new_field output=onlineStatus path=onlineStatus
| where serialNumber!=""
| lookup Genesys_Monitoring.csv serialNumber
| where Country="Bangladesh"
| stats
count(eval(onlineStatus="offline")) AS offline_count
count(eval(onlineStatus="online")) AS online_count
earliest(eval(if(onlineStatus="offline",_time,""))) AS offline_time
earliest(eval(if(onlineStatus="online",_time,""))) AS online_time
| fillnull value=0 offline_count
| fillnull value=0 online_count
| eval condition=case(
offline_count=0 AND online_count>0,"Online",
offline_count>0 AND online_count=0,"Offline",
offline_count>0 AND online_count>0 AND online>offline, "Offline but newly online",
offline_count>0 AND online_count>0 AND offline>online, "Offline",
offline_count=0 AND online_count=0, "No data"),
search="Device went offline and recovery status"
| search condition="Offline" OR condition="Online" OR condition="Offline but newly online"
| table search condition
| collect index=summary then you can run a search like the following: index=summary search="Device went offline and recovery status"
| stats
dc(condition) AS condition_count
last(condition) AS condition_last
values(condition) AS condition
| search
(condition_last="Offline" condition_count=1) OR
(condition_last="Online" condition_count>1) with an email action to informa yo that there's a new offline or there's an online adter te offline. Please check the conditions because I cannot do, but they should be correct. Ciao. Giuseppe