mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-03-11 15:34:56 +00:00
lib/promscrape: properly reload new configs on SIGHUP
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/335
This commit is contained in:
parent
3ad36134f6
commit
b63e4464f4
1 changed files with 2 additions and 2 deletions
|
@ -89,12 +89,12 @@ func runScraper(configFile string, pushData func(wr *prompbmarshal.WriteRequest)
|
|||
logger.Errorf("cannot read %q: %s; continuing with the previous config", configFile, err)
|
||||
goto waitForChans
|
||||
}
|
||||
swsStaticNew, err := cfg.getStaticScrapeWork()
|
||||
swsStaticNew, err := cfgNew.getStaticScrapeWork()
|
||||
if err != nil {
|
||||
logger.Errorf("cannot parse `static_configs` from %q: %s; continuing with the previous config", configFile, err)
|
||||
goto waitForChans
|
||||
}
|
||||
swsFileSDNew, err := cfg.getFileSDScrapeWork(swsFileSD)
|
||||
swsFileSDNew, err := cfgNew.getFileSDScrapeWork(swsFileSD)
|
||||
if err != nil {
|
||||
logger.Errorf("cannot parse `file_sd_config` from %q: %s; continuing with the previous config", configFile, err)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue