From 1c5316600fd704a759dd66a0b345d7fde4ef26c5 Mon Sep 17 00:00:00 2001 From: Evgeny Evseev Date: Fri, 7 Jun 2024 19:03:38 +0300 Subject: [PATCH] Update labels and Descs on config update --- collector.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/collector.go b/collector.go index c4aa256..1e8dc1b 100644 --- a/collector.go +++ b/collector.go @@ -49,6 +49,8 @@ func (p *pingCollector) UpdateConfig(cfg *config.Config) { p.mutex.Lock() defer p.mutex.Unlock() p.cfg.Targets = cfg.Targets + p.customLabels = newCustomLabelSet(cfg.Targets) + p.createDesc() } func (p *pingCollector) Describe(ch chan<- *prometheus.Desc) {