Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[alerting] investigate ability to handle some "NO DATA" conditions via a normal query #71503

Open
pmuellr opened this issue Jul 13, 2020 · 4 comments
Labels
estimate:needs-research Estimated as too large and requires research to break down into workable issues Feature:Alerting/RulesFramework Issues related to the Alerting Rules Framework Feature:Alerting insight Issues related to user insight into platform operations and resilience Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@pmuellr
Copy link
Member

pmuellr commented Jul 13, 2020

A customer described a scenario they wanted to alert on with the index threshold. They wanted to do a grouped query, and then identify instances that have NOT reported any data.

I don't think that's possible without knowing all the possible instances ahead of time - eg, via an alert parameter (an array of instance ids to look for). My thinking is that we're doing aggregations on the group term, and "missing instances" won't show up in any bucket, since they aren't there.

In conversation, it was mentioned that using min_doc_count: 0 could perhaps help with this, but I don't think it will given the previous paragraph. However, a non-grouped query using the count aggregation could use this to return 0 instead of not returning anything.

It's even possible it's doing this today, not real sure without doing a test on it. But seems like something worth investigating. Also not clear if we'd enable this as some kind of option, or just always arrange to return 0 for those. One of the problems with always returning 0 in that case is that it's different than the other aggregations which do not operate this way (and can't - they need actual values from the documents - count is only counting documents returned and doesn't need a value out of the index documents).

@pmuellr pmuellr added Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels Jul 13, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-alerting-services (Team:Alerting Services)

@pmuellr
Copy link
Member Author

pmuellr commented Jul 13, 2020

@dgieselaar noted the following in a side conversation:

Just to clarify (maybe you got this and I’m misunderstanding your issue), if you add min_doc_count: 0 to a terms aggregation, it will return buckets with a doc_count of 0 for all terms recorded in the index, including for non-matching documents. Contrived example: if I have two documents in an index, one with service.name:opbeans-java, and one with service.name:opbeans-node, if I search for documents matching service.name:opbeans-node, and add a terms aggregation on service.name with min_doc_count: 0, I get two buckets, one for opbeans-node and one for opbeans-java . Screenshot to illustrate:

image

@gmmorris gmmorris added the Feature:Alerting/RulesFramework Issues related to the Alerting Rules Framework label Jul 1, 2021
@gmmorris gmmorris added the loe:needs-research This issue requires some research before it can be worked on or estimated label Jul 14, 2021
@gmmorris gmmorris added insight Issues related to user insight into platform operations and resilience estimate:needs-research Estimated as too large and requires research to break down into workable issues labels Aug 13, 2021
@gmmorris gmmorris removed the loe:needs-research This issue requires some research before it can be worked on or estimated label Sep 2, 2021
@ymao1
Copy link
Contributor

ymao1 commented Nov 19, 2021

@pmuellr Is this issue to investigate No Data conditions for the stack rules (es query, index threshold) or to investigate a framework level No Data detection?

@pmuellr
Copy link
Member Author

pmuellr commented Nov 29, 2021

From the context, I think this was just for the stack rules. I believe the most general issue we have open for "NO DATA" right now is #67296 - it's not clear if NO DATA should be an action group, a status, a ???. And there's some history, as some metrics rules can detect no data conditions and provide that indication in the alerts (somehow, can't remember the exact mechanism, I think it's a "no data" sort of action group though).

@kobelb kobelb added the needs-team Issues missing a team label label Jan 31, 2022
@botelastic botelastic bot removed the needs-team Issues missing a team label label Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
estimate:needs-research Estimated as too large and requires research to break down into workable issues Feature:Alerting/RulesFramework Issues related to the Alerting Rules Framework Feature:Alerting insight Issues related to user insight into platform operations and resilience Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
No open projects
Development

No branches or pull requests

5 participants