Guys,
I need to see which forwarders do not send events in a period of 3 hours.
For example: if a forwarder does not send logs, or does not connect with an indexer, in the last 3 hours, I need to create an alert.
I'm using the following searches, but I am not able to generate a search to compare the time.
| metadata type=sourcetypes index=XXX| rename totalCount as Count firstTime as "First Event" lastTime as "Last Event" recentTime as "Last Update" | fieldformat Count=tostring(Count, "commas") | fieldformat "First Event"=strftime('First Event', "%c") | fieldformat "Last Event"=strftime('Last Event', "%c") | fieldformat "Last Update"=strftime('Last Update', "%c")
|where "Last Time" > ???
| metadata type=hosts index=XXX | eval diff=now()-lastTime | where diff > 3600*24 | convert ctime(lastTime) as last_connected | eval not_reported_since=strftime(diff,"%T") | table host last_connected not_reported_since
| where last_connected > ????
Can you help me?
... View more