-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat. request: granular silence for <rule>.<value of query_key> #2777
Comments
When you have a query_key in the rule silencing can be done based on the values of this query_key. For example if you have the query_key |
Thanks @JasperJuergensen! With regards to this, I realized our logger does emit a field
I will then confirm that I can granularly silence alert depending on the value of their |
How does one add a document manually? |
To add a document manually you can use the Index API from elasticsearch (https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started-index.html). The document should have to following format: {
"exponent": 0,
"rule_name": "<rule_name>.<query_key_value>",
"@timestamp": "<current datetime>",
"until": "<silence until timestamp>",
} I think it would be a good feature to add the possibility to enter a query_key_value to the --silence option. |
This enables the user to silence a rule only for a specific query_key value and not only the whole rule. See elastalert Issue: Yelp#2777
Thanks @JasperJuergensen. I see that you are already working on qk based silences! 🚀 |
Oops accidentally closed, will reopen in case this is used for tracking silence qk feature. |
Re: silence qk feature,
Would this UX be feasible?
|
match_body
field?
Yes
I think this would make it a bit more complicated because internally the |
Sounds good, thanks for explaining. If you have multiple rules in your yaml file, and want to silence only a subset (or even just one) of these rules for a given qk, but leave the other rules unsilenced for a given qk, would this be possible? |
I don't think you can have multiple rules in one yaml file. At least not with the current |
Thanks @JasperJuergensen my impression that rules were bunched into the same yaml was wrong and due to my lack of knowledge of elastalert internals, just confirmed (I set up 2 rules):
Thanks. Looking forward to qk silence feature! 🚀 |
This enables the user to silence a rule only for a specific query_key value and not only the whole rule. See Issue Yelp#2777
Hello,
we have been very happily using ElastAlert in our production kubernetes environment for almost two years.
We've been very basic with our approach, and have a catch all rule to alert whenever there is a structured log emitted with the
level: error
key value.Recently an issue where noise emitted by a certain workload has led us to look into silencing alerts.
As per https://elastalert.readthedocs.io/en/latest/elastalert_status.html#silence it does not appear that
match_body.x.y.z
can be used as a parameter to target silences.Could this please be confirmed? Would the approach then be to break up our catch all
level: error
alert into many granular alerts based on other fields of the emitted structured logs?For reference our catch all error, which requires granular silencing (via
match_body
fields) is:An example of how an alert could (ideally, if possible) be targetted for silence:
The text was updated successfully, but these errors were encountered: