Alerting: new min_interval_seconds options to enforce a minimum eval frequency (#21188)

* add min_interval_seconds setting to alerting config

It will let operator enforce a minimum time for the scheduler to enqueue evaluations

* Introduce UI modifications

* Update docs

Co-authored-by: Martin <uepoch@users.noreply.github.com>
This commit is contained in:
Sofia Papagiannaki
2020-01-14 11:13:34 +02:00
committed by GitHub
co-authored by Martin
parent 6b3041d358
commit d135f1229d
10 changed files with 56 additions and 2 deletions
+2
View File
@@ -201,6 +201,7 @@ var (
AlertingEvaluationTimeout time.Duration
AlertingNotificationTimeout time.Duration
AlertingMaxAttempts int
AlertingMinInterval int64
// Explore UI
ExploreEnabled bool
@@ -961,6 +962,7 @@ func (cfg *Cfg) Load(args *CommandLineArgs) error {
notificationTimeoutSeconds := alerting.Key("notification_timeout_seconds").MustInt64(30)
AlertingNotificationTimeout = time.Second * time.Duration(notificationTimeoutSeconds)
AlertingMaxAttempts = alerting.Key("max_attempts").MustInt(3)
AlertingMinInterval = alerting.Key("min_interval_seconds").MustInt64(1)
explore := iniFile.Section("explore")
ExploreEnabled = explore.Key("enabled").MustBool(true)