Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
Remove ConfigSetup() during the Prometheus input plugin Start() metho…
Browse files Browse the repository at this point in the history
…d to fix configuration reset

  During the startup process, the prometheus module is first configured using `prometheus.ConfigSetup()` and `prometheus.ConfigProcess()`, then the Handler is started. The problem is that `ConfigSetup()` is called from `Start()`, which makes the configuration re-initialize to its default values. Removing the call from `Start()` solve the issue.
  • Loading branch information
beorn- committed Jun 7, 2019
1 parent 38c749d commit 3927378
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion input/prometheus/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ func (p *prometheusWriteHandler) Name() string {

func (p *prometheusWriteHandler) Start(handler input.Handler, cancel context.CancelFunc) error {
p.Handler = handler
ConfigSetup()

mux := http.NewServeMux()
mux.HandleFunc("/write", p.handle)
Expand Down

0 comments on commit 3927378

Please sign in to comment.