Open christophercutajar opened 3 years ago
Pinging @elastic/kibana-alerting-services (Team:Alerting Services)
We have another use case for Vulnerability Management where we want to notify the different teams. We would need to have aggregations to notify based on the severity.
The moustache template allows us to access document through context.hits
. We would be interested to be able to use aggregations in the Actions section.
@mikeh-elastic recently ran into this issue as well. He wanted to do a "group by", which was impossible using the Elasticsearch Query rule.
Since this issue has some recent activity I'm going to mention an issue I've had open for a while to support derivative aggregation.
There are a couple examples in the linked issue. Adding general aggs
support looks like it would close mine also.
If we can basically get the logs ui alert but allow us to put an index to search of our own, that would solve this. I too would like to be able to supply the dsl of the aggs since I can do some very powerful things with buckets and pipeline aggregations which is still only capable in watcher to alert and vega to visualize today.
Can confirm that @mikeh-elastic's approach would solve this issue for us as well. We were actually able to implement one alert in Logs UI for a very specific use case, but for general use, it would be handy to have this option in the basic elasticsearch query alert type.
We're wanting to be able to alert on things like:
I can accomplish something like this with Watcher, although Watcher seems unable to make use of Rules and Connectors connectors in Observability, and needs to have separate alerting methods defined in elasticsearch.yml
🤦
I've made extensive use of things like this in other vis & alerting tools like Grafana in the past, so I was surprised that something like this would be so difficult after paying for Elastic Cloud Enterprise.
In 8.7 we will be adding support to the Elasticsearch Query rule to select a field to "group by". This will make the rule measure the aggregation per group and create an alert per grouped value (https://github.com/elastic/kibana/pull/144689). Are there use cases where this wouldn't work?
Will the solution in 8.7 be able to handle multiple levels of aggregations or will it be limited to aggregation on a single field? The use case I've seen for aggregations would not be covered by #144689 if it is limited to aggregations on a single field.
Will the solution in 8.7 be able to handle multiple levels of aggregations or will it be limited to aggregation on a single field? The use case I've seen for aggregations would not be covered by https://github.com/elastic/kibana/pull/144689 if it is limited to aggregations on a single field.
It will be a limited to aggregate on a single field as of 8.7. Thanks for confirming your use case 🙏
Another use case that I don't think will be solved with the suggested approach:
I'm monitoring a system where a document is created per metric. I want an alert to trigger if the most recent state of 2 specific metrics have a specific value. Therefore I cannot simply use doc counts but have to use aggregations and then some custom logic to parse the agg response.
Pseudo code for when an alert should trigger:
const triggerAlert = resp.metricA === 0 && resp.metricB === 1
Thanks @sqren! We'll keep this issue open to track requests beyond the terms aggregation that is releasing in 8.7 👍
cc @shanisagiv1
@mikecote can you share any related issue link to that?
@mikecote can you share any related issue link to that?
@TomonoriSoejima you can find the basic capability here: https://github.com/elastic/kibana/pull/144689
Right, I was reading it now!!
has this feature been released and what is the version? We want to put in place aggregations (groupby and count) as part of the Query Alerts in Kibana.
Describe the feature:
With 7.12.0, the alerting engine now supports creating an alert based on a query using the
Elasticsearch query
alert type. It would be super useful if such alert type would support aggregations and the contents of the aggregation can then be added to the action.Describe a specific use case for the feature:
This is a very simple watcher that we have deployed which basically monitors k8s cronjobs metricbeat data and alerts the team with the cronjob name and how many times it failed during the past X minutes. If a cronjob failed for example 10 times during the past 10 minutes, we don't want to return a list containing with the same name but a single nice message saying
This is a much more complex than the previous use-case. In a nutshell, we're ingesting third-party data into Elasticsearch for vulnerability management of Elastic's infrastructure. Using this data, we have a watcher in place that is checking this third-party data ingested into ES whether all assets in our asset inventory has a particular agent deployed. For those assets that doesn't have an agent installed, will trigger an action that will include the results from the below aggregation and send a message to the respective team: