mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Add setting for maximum allowed rule evaluation results (#89468)
* Alerting: Add setting for maximum allowed rule evaluation results Added a new configuration setting `quota.alerting_rule_evaluation_results` to set the maximum number of alert rule evaluation results per rule. If the limit is exceeded, the evaluation will result in an error.
This commit is contained in:
committed by
GitHub
parent
be1414b36b
commit
68691c9386
@@ -91,6 +91,7 @@ type UnifiedAlertingSettings struct {
|
||||
MaxAttempts int64
|
||||
MinInterval time.Duration
|
||||
EvaluationTimeout time.Duration
|
||||
EvaluationResultLimit int
|
||||
DisableJitter bool
|
||||
ExecuteAlerts bool
|
||||
DefaultConfiguration string
|
||||
@@ -355,6 +356,7 @@ func (cfg *Cfg) ReadUnifiedAlertingSettings(iniFile *ini.File) error {
|
||||
|
||||
quotas := iniFile.Section("quota")
|
||||
uaCfg.RulesPerRuleGroupLimit = quotas.Key("alerting_rule_group_rules").MustInt64(100)
|
||||
uaCfg.EvaluationResultLimit = quotas.Key("alerting_rule_evaluation_results").MustInt(-1)
|
||||
|
||||
remoteAlertmanager := iniFile.Section("remote.alertmanager")
|
||||
uaCfgRemoteAM := RemoteAlertmanagerSettings{
|
||||
|
||||
Reference in New Issue
Block a user