Hi,
I am struggling with an SPL. I am trying to create a report which lists the Online status of specific Site/location pending if there is a message received from it.
I need the Online (or Offl...
See more...
Hi,
I am struggling with an SPL. I am trying to create a report which lists the Online status of specific Site/location pending if there is a message received from it.
I need the Online (or Offline) status to be group in a daily format which I have achieved so far with the below SPL. However, the challenge for me is, when a Site/location goes "Offline", I would like to know the exact hour:min that Last communication was logged. Currently, the Last_Communication Column is showing me the Date but time is 00:00:00 which I know is not true, I need the exact hour/min the last event got logged for that specific day if it was "Online".
Current SPL:
| from datamodel:"mydatamodel"
| bin _time span=1d
| search field1="comm_message"
| eval Online_Status=if(like(Location_field,"xyz"),1,0)
| stats sum(Online_Status) AS Message_Counts by _time
| eval Online_Status=if(Message_Counts=0,"OFFLINE", "ONLINE")
| eval Last_Communication=if(Online_Status="ONLINE",(_time), "OFFLINE")
| convert ctime(Last_Communication)
Any help would be greatly appreciated.
Thanks