How do I setup an alert based on the value returned from a search?
I havea simple search: index=core ....| stats max(kpi) as kpi
This gives a value of 30,000
Now I want to set up an alert that when this goes below 10,000 to trigger an alert. I will use an email initially for testing.
How do I do this? Once I have the search ready I click Save as -> Alert and these options are presented
my specific query is around the Trigger Alert when. The options are:
1. Number of Results
2. Number of Hosts
3. Number of Sources
None of these seem to be what I want. I was expecting a value of search as an option in that when then value is <10,000 Alert me. What am I missing here? The custom option does not appear to offer anything.
Just to confirm:
1/ when kpi is 9,000, then kpi< 10,000 is TRUE and a value will be returned from the search (e.g.9000), And the alert will alert.
2/ when kpi is 11,000, then kpi< 10,000 is FALSE and a value will NOT be returned from the search (e.g.No results found). No alert.
is the number of events is not zero relate to the value of 9,000 returned or No results found?