make default values for alerting configurable

This commit is contained in:
bergquist
2018-09-06 11:26:14 +02:00
parent 72ab24f300
commit 3ce89cad71
7 changed files with 46 additions and 18 deletions
+6 -2
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)