-
Notifications
You must be signed in to change notification settings - Fork 11
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(alerting): detect flapping alerts #148
base: main
Are you sure you want to change the base?
Conversation
- name: AlertRules | ||
rules: | ||
- alert: AlertRulesFlapping | ||
expr: changes(ALERTS_FOR_STATE{severity = "warning"}[1h]) > 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL!
Apparently there also ALERTS
, but the value there is "1", whereas for ALERTS_FOR_STATE
it's timestamp.
How did you find out this exists?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Through @err404r :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ALERTS is not working with changes for some reason, when I found this out I google and find out about ALERTS_FOR_STATE it is internal metrics which is used to track alert state in between prometheus restarts. According to official docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would we need to replicate the alert per severity?
Hi, during next two day I'm going to test this rule with inhibitions rules, so please do not merge I might be able to find some useful improvements |
Issue
We are currently not providing any alert rules that would detect when an alert is transitioning to and from
pending
in a fast pace, which means we could potentially loose out on information from recurring intermittent errors.Solution
Detect whenever an alert is transitioning more than 5 times in the last hour.
Context
resolves #145
Testing Instructions
Upgrade Notes