Skip to content

Commit

Permalink
Update labels and Descs on config update
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeny Evseev committed Jun 7, 2024
1 parent 926ca78 commit 1c53166
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1c53166

Please sign in to comment.