@somesoni2 @saurabhtcs when i used the query, if i shutdown the host, nothing comes up when i ran the query. It only shows result for last 24hrs. I started/stopped the host and ran this query but it didnt give desired result. The desire result which i want is, if the host is shutdown, the query has been setup as alert and should be able to inform user that host is shutdown or not responding with the updated timestamp
| tstats count latest(_time) where index=* host="abssvm" by host | rename earliest(_time) as earliest_time, latest(_time) as latest_time | eval status= if(latest_time > relative_time(now(),"-5min"),"Active","Inactive") | convert ctime(latest_time) | search status="Inactive" | fields - count
... View more