Merge pull request #140 from cloudflare/min-ttls

We'll get a panic if user sets zero or negative TTL value, add a check
This commit is contained in:
Łukasz Mierzwa
2017-07-10 09:09:15 -07:00
committed by GitHub

View File

@@ -73,6 +73,12 @@ func main() {
log.Infof("Version: %s", version)
config.Config.Read()
// timer duration cannot be zero second or a negative one
if config.Config.AlertmanagerTTL <= time.Second*0 {
log.Fatalf("Invalid AlertmanagerTTL value '%v'", config.Config.AlertmanagerTTL)
}
config.Config.LogValues()
transform.ParseRules(config.Config.JiraRegexp)