I'm trying to set up a alert If I don't see a log message with in 15 minutes span of time.
I extracted a filed from the log message but I'm not sure how to check for the field in real time .
The query i tired is
index= "metering" host="vm10190" sourcetype="ping" | rex "Ping response: (?
Any help would be greatly appreciated .
For alerting, you need to setup a save search and schedule it. Then, you can alert based on the results of the saved search. Is the search above your saved search?
Create a search that finds your log messages. Then schedule that search and have it send an alert if the event count = 0.
I am not sure how to create a search query to return the results for just last 15 minutes
Include 'earliest=-15m' in your search query.
index= "metering" sourcetype="ping" | rex "Ping response: (?
this query returns me the results where the ping is ok
but when I add the time it doesn't return any results
Are you sure there were results in the last 15 minutes?
Did you specify the time as 'index= "metering" sourcetype="ping" earliest=-15m | rex "Ping response: (?
I do get the results now can you please let me know how to use the eventcount in this case
Go to the 'Searches and Reports' manager page and click the New button. Enter your search query in the Search box, start time of '-15m' and end time of 'now'. Check the 'Schedule this search' box. Choose "15 minutes" from the 'Run every' box. Under Condition, choose 'if number of events' and 'is equal to' from the respective drop-downs.
Choose the alert action and save the search.