-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Description
The watcher index threshold alert which the new Kibana alerting index threshold alert is based on, has an option to limit the number of "groups" returned (when using groupField). The Kibana alert supports this, but the watcher one labels it as "Top n of ...", implying that the groups are somehow sorted before limiting, presumably showing you the most relevant groups.
It's not quite clear how this works, given all the aggregation functions. I think for count, average max and sum, you'd basically want to pick the groups that the highest values being processed. For min, you'd want the lowest. For between? And I added a "notBetween" to the Kibana alert. I think maybe we just don't sort for those. note: between is a comparator, not an aggregation
We'll need to figure out how to work this into our query DSL that we are sending. I could see some sorting done with the size limiter, not quite sure if that's still applicable given we're doing a different query than watcher did, but seems like a start.