How to get an output containing all host details of all time along with their last update times?
Below search is taking huge time, how to get this optimized for faster search -
index=*| fields host, _time
| stats max(_time) as last_update_time by host
| eval t=now()
| eval days_since_last_update=tonumber(strftime((t-last_update_time),"%d"))-1
| where days_since_last_update>30
| eval last_update_time=strftime(last_update_time, "%Y-%m-%d %H:%M:%S")
| table last_update_time host days_since_last_update
... View more