mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-12 16:44:05 -08:00
Merge "Display filename when encountering bad rule file."
This commit is contained in:
commit
20bfaf80ab
|
@ -178,7 +178,7 @@ func (m *ruleManager) AddRulesFromConfig(config config.Config) error {
|
||||||
for _, ruleFile := range config.Global.RuleFile {
|
for _, ruleFile := range config.Global.RuleFile {
|
||||||
newRules, err := LoadRulesFromFile(ruleFile)
|
newRules, err := LoadRulesFromFile(ruleFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return fmt.Errorf("%s: %s", ruleFile, err)
|
||||||
}
|
}
|
||||||
m.Lock()
|
m.Lock()
|
||||||
m.rules = append(m.rules, newRules...)
|
m.rules = append(m.rules, newRules...)
|
||||||
|
|
Loading…
Reference in a new issue