mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-04 12:47:36 +08:00
[FIX] fix bug
This commit is contained in:
parent
650d996857
commit
4f3cd226f7
@ -74,7 +74,7 @@ func NewManager(config *option.Config) *Manager {
|
|||||||
ScrapeInterval: model.Duration(time.Second * 5),
|
ScrapeInterval: model.Duration(time.Second * 5),
|
||||||
EvaluationInterval: model.Duration(time.Second * 30),
|
EvaluationInterval: model.Duration(time.Second * 30),
|
||||||
},
|
},
|
||||||
RuleFiles:[]string{"/etc/prometheus/rules.yml"},
|
RuleFiles:[]string{"/etc/prometheus/rules.yml", "/etc/prometheus/default_rules.yml"},
|
||||||
},
|
},
|
||||||
Registry: reg,
|
Registry: reg,
|
||||||
httpClient: client,
|
httpClient: client,
|
||||||
@ -103,13 +103,17 @@ func NewManager(config *option.Config) *Manager {
|
|||||||
}
|
}
|
||||||
m.SaveAlertingRulesConfig()
|
m.SaveAlertingRulesConfig()
|
||||||
m.LoadConfig()
|
m.LoadConfig()
|
||||||
m.LoadAlertingRulesConfig()
|
|
||||||
|
|
||||||
return m
|
return m
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *Manager) StartDaemon(errchan chan error) {
|
func (p *Manager) StartDaemon(errchan chan error) {
|
||||||
|
p.LoadAlertingRulesConfig()
|
||||||
logrus.Info("Starting prometheus.")
|
logrus.Info("Starting prometheus.")
|
||||||
|
for _,v := range p.AlertingRulesConfig.Groups{
|
||||||
|
fmt.Println(v.Name)
|
||||||
|
fmt.Println(v.Rules)
|
||||||
|
}
|
||||||
|
|
||||||
// start prometheus
|
// start prometheus
|
||||||
procAttr := &os.ProcAttr{
|
procAttr := &os.ProcAttr{
|
||||||
|
Loading…
Reference in New Issue
Block a user