Skip to content

Commit

Permalink
Display error message if prometheus output fails to listen (#2984)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximesong authored and danielnelson committed Jul 5, 2017
1 parent 135ce41 commit 89c5fab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugins/outputs/prometheus_client/prometheus_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,12 @@ func (p *PrometheusClient) Start() error {
Handler: mux,
}

go p.server.ListenAndServe()
go func() {
if err := p.server.ListenAndServe(); err != nil {
log.Printf("E! Error creating prometheus metric endpoint, err: %s\n",
err.Error())
}
}()
return nil
}

Expand Down

0 comments on commit 89c5fab

Please sign in to comment.