add the scrape manager config reloader
handle errors with invalid scrape config
This commit is contained in:
parent
b0d4f6ee08
commit
6ff1d5c51e
|
@ -285,6 +285,7 @@ func main() {
|
|||
discoveryManager.ApplyConfig,
|
||||
webHandler.ApplyConfig,
|
||||
notifier.ApplyConfig,
|
||||
scrapeManager.ApplyConfig,
|
||||
func(cfg *config.Config) error {
|
||||
// Get all rule files matching the configuration oaths.
|
||||
var files []string
|
||||
|
|
|
@ -61,7 +61,9 @@ func (m *ScrapeManager) Run(tsets <-chan map[string][]*config.TargetGroup) error
|
|||
case f := <-m.actionCh:
|
||||
f()
|
||||
case ts := <-tsets:
|
||||
m.reload(ts)
|
||||
if err := m.reload(ts); err != nil {
|
||||
level.Error(m.logger).Log("msg", "error reloading the scrape manager", "err", err)
|
||||
}
|
||||
case <-m.graceShut:
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue