-
Notifications
You must be signed in to change notification settings - Fork 8.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] Warn by default when rule schedule interval is set below the minimum configured. #127498
[Alerting] Warn by default when rule schedule interval is set below the minimum configured. #127498
Conversation
…g/minimum_rule_interval_warn
…g/minimum_rule_interval_warn
Pinging @elastic/response-ops (Team:ResponseOps) |
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.
Docker config change LGTM
@lcawl Can you review the wording of the helper text and server log warning as show in the screenshots? |
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.
Changes LGTM! Tested locally and saw the warnings 👍
})} | ||
/> | ||
</> | ||
); | ||
|
||
const getHelpTextForInterval = () => { |
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.
I notice if I increase xpack.alerting.rules.minimumScheduleInterval.value
to a value higher than 1m
and open the create rule flyout, the interval of 1m
is set by default and the warning displays. If this isn't desired behaviour, should we change it so the default rule interval equals minimumScheduleInterval.value
when configured to a value higher than 1m
?
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.
That's a good catch @mikecote! Updated in this commit to set the default schedule interval to match the minimum configured if the minimum is greater.
That commit should also fix this bug: #122707
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, thank you!
That commit should also fix this bug: #122707
I wasn't able to confirm this, I set defaultScheduleInterval
with a few varying configurations.
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.
…g/minimum_rule_interval_warn
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.
Minor suggestions, otherwise text LGTM
x-pack/plugins/alerting/server/rules_client/tests/create.test.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/alerting/server/rules_client/tests/update.test.ts
Outdated
Show resolved
Hide resolved
… less than minimum
…g/minimum_rule_interval_warn
…g/minimum_rule_interval_warn
…g/minimum_rule_interval_warn
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
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Public APIs missing exports
Page load bundle
History
To update your PR or re-run it, just comment with: cc @ymao1 |
Resolves #126946
Summary
Updates minimum schedule interval configuration in the following ways:
xpack.alerting.rules
config keysenforce
value to specify whether we are enforcing the minimum or not. Defaults tofalse
.enforce = true
, behavior is same as described in this PR where existing rules run untouched but rules cannot be created or updated with an interval below the configured minimum.When
enforce = false
:Checklist