mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-13 23:10:12 -08:00
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,
|
discoveryManager.ApplyConfig,
|
||||||
webHandler.ApplyConfig,
|
webHandler.ApplyConfig,
|
||||||
notifier.ApplyConfig,
|
notifier.ApplyConfig,
|
||||||
|
scrapeManager.ApplyConfig,
|
||||||
func(cfg *config.Config) error {
|
func(cfg *config.Config) error {
|
||||||
// Get all rule files matching the configuration oaths.
|
// Get all rule files matching the configuration oaths.
|
||||||
var files []string
|
var files []string
|
||||||
|
|
|
@ -61,7 +61,9 @@ func (m *ScrapeManager) Run(tsets <-chan map[string][]*config.TargetGroup) error
|
||||||
case f := <-m.actionCh:
|
case f := <-m.actionCh:
|
||||||
f()
|
f()
|
||||||
case ts := <-tsets:
|
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:
|
case <-m.graceShut:
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue