app/vmalert: update config state metrics if config parsed failed (#1507)

This commit is contained in:
Qifei Wan 2021-08-03 17:55:29 +08:00 committed by Aliaksandr Valialkin
parent 44bf4cabea
commit 095bb90879

View file

@ -266,6 +266,8 @@ func configReload(ctx context.Context, m *manager, groupsCfg []config.Group) {
}
newGroupsCfg, err := config.Parse(*rulePath, *validateTemplates, *validateExpressions)
if err != nil {
configReloadErrors.Inc()
configSuccess.Set(0)
logger.Errorf("cannot parse configuration file: %s", err)
continue
}