Merge pull request #13170 from bergquist/alerting_default_setting

make default values for alerting configurable
This commit is contained in:
Carl Bergquist
2018-09-06 13:26:42 +02:00
committed by GitHub
7 changed files with 48 additions and 18 deletions

View File

@@ -164,8 +164,10 @@ var (
Quota QuotaSettings
// Alerting
AlertingEnabled bool
ExecuteAlerts bool
AlertingEnabled bool
ExecuteAlerts bool
AlertingErrorOrTimeout string
AlertingNoDataOrNullValues string
// Explore UI
ExploreEnabled bool
@@ -672,6 +674,8 @@ func (cfg *Cfg) Load(args *CommandLineArgs) error {
alerting := iniFile.Section("alerting")
AlertingEnabled = alerting.Key("enabled").MustBool(true)
ExecuteAlerts = alerting.Key("execute_alerts").MustBool(true)
AlertingErrorOrTimeout = alerting.Key("error_or_timeout").MustString("alerting")
AlertingNoDataOrNullValues = alerting.Key("nodata_or_nullvalues").MustString("no_data")
explore := iniFile.Section("explore")
ExploreEnabled = explore.Key("enabled").MustBool(false)