-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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: new min_interval_seconds option to enforce a minimum evaluation frequency #21188
Conversation
It will let operator enforce a minimum time for the scheduler to enqueue evaluations
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.
Looks good AFAICT (haven't tested, just read through). But left a couple of comments.
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.
See comments
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.
Looks good, but some minor things left.
const frequencySecs = kbn.interval_to_seconds(this.alert.frequency); | ||
if (frequencySecs < this.alertingMinIntervalSecs) { | ||
this.frequencyWarning = | ||
'The rule will be evaluated every ' + |
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 like to change the warning text, but not exactly sure to what. Suggestions:
- "A minimum evaluation interval of
this.alertingMinInterval
have been configured and will be used for this rule" - "A minimum evaluation interval have been configured. This rule will be evaluated every
this.alertingMinInterval
"
@oddlittlebird maybe have some input on the warning text?
Evaluation interval is what we're referring to in docs: https://grafana.com/docs/grafana/latest/alerting/rules/#name-and-evaluation-interval
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.
Both of those warning texts are very passive. It makes it hard to understand what is happening to what. Of the two listed, the second is better. I would suggest something like:
"<rule name>
will be evaluated every <this.alertingMinInterval>
. You can change this by adjusting the <whatever>
value."
Either that or the second sentence should be other useful information about why they might want to increase or lower the value.
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.
Still some minor things, see comments. The suggested warning message is a bit weird because the user may not be able to change it why I suggests a different one.
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.
LGTM
…ation * origin/master: Explore: Fix timepicker when browsing back after switching datasource (#21454) Add disabled option for cookie samesite attribute (#21472) Chore: Adds basic alerting notification service tests (#21467) ImportDashboardCommand: Validate JSON fields (#21350) Docs: add test for website build (#21364) Fix: when clicking a plot on a touch device we won't display the annotation menu (#21479) Backend Plugins: add a common implementation (#21408) Alerting: new min_interval_seconds options to enforce a minimum eval frequency (#21188) Panel: Use Tabs in panel inspector (#21468)
* origin/master: ImportDashboardCommand: Validate JSON fields (#21350) Docs: add test for website build (#21364) Fix: when clicking a plot on a touch device we won't display the annotation menu (#21479) Backend Plugins: add a common implementation (#21408) Alerting: new min_interval_seconds options to enforce a minimum eval frequency (#21188) Panel: Use Tabs in panel inspector (#21468) Docs: Update rpm install (#21475)
What this PR does / why we need it:
It will allow operator to force alerting scheduler to honor a minimum frequency when Tick() is called.
This is continuation of work in #17279. It introduces a commit with the suggested UI modification on top of the existing commits. I have opened a new PR because I was unable to push commits to the old PR's source branch.
Which issue(s) this PR fixes:
Fixes #14447
Special notes for your reviewer: