add the scrape manager config reloader

handle errors with invalid scrape config
This commit is contained in:
Krasi Georgiev 2017-11-29 23:56:57 +00:00
parent b0d4f6ee08
commit 6ff1d5c51e
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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
}