In the below case, I only see the time when it went OFFLINE(_time), but the hostname , prev_time , prev_state are not populated with details.
And I forgot to mention, I am trying to check the status on the vendor host which is OFFLINE or ONLINE and more than 5mins on qa1 host.
index=qa host="q1*" "*Configured vendor host to OFFLINE *" | rex "^\S+\s+(?\S+)\s+is\s+(?\S+)" | sort 0 hostname _time | streamstats current=f window=1 values(_time) as prev_time values(state) as prev_state by hostname | eval Duration=_time-prev_time| table _time prev_time hostname state prev_state
Splunk log -
8:04:39.633 AM Configured vendor host1 status to OFFLINE
8:05:09.714 AM Configured vendor host1 status back to ONLINE
Thank you once again for the details.
... View more