From e6a481ab11080576f4f149f6ef6931ddd4b42408 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Wed, 26 Feb 2020 13:45:13 +0200 Subject: [PATCH] lib/promscrape: properly reload new configs on SIGHUP --- lib/promscrape/scraper.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/promscrape/scraper.go b/lib/promscrape/scraper.go index cdfa61a023..75c73b473c 100644 --- a/lib/promscrape/scraper.go +++ b/lib/promscrape/scraper.go @@ -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) }