From c3aa43a6bdfb95a032a68a7f34b673d4238d67de Mon Sep 17 00:00:00 2001 From: Cameron Sparr Date: Mon, 12 Sep 2016 10:09:13 +0100 Subject: [PATCH] Fix prometheus output panic on reload closes #1530 --- CHANGELOG.md | 1 + plugins/outputs/prometheus_client/prometheus_client.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23e39adb7..962752d42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ - [#1738](https://github.com/influxdata/telegraf/issues/1738): Fix unmarshal of influxdb metrics with null tags - [#1733](https://github.com/influxdata/telegraf/issues/1733): Fix statsd scientific notation parsing - [#1716](https://github.com/influxdata/telegraf/issues/1716): Sensors plugin strconv.ParseFloat: parsing "": invalid syntax +- [#1530](https://github.com/influxdata/telegraf/issues/1530): Fix prometheus_client reload panic ## v1.0 [2016-09-08] diff --git a/plugins/outputs/prometheus_client/prometheus_client.go b/plugins/outputs/prometheus_client/prometheus_client.go index 325e9566b..1f2120737 100644 --- a/plugins/outputs/prometheus_client/prometheus_client.go +++ b/plugins/outputs/prometheus_client/prometheus_client.go @@ -28,7 +28,7 @@ var sampleConfig = ` ` func (p *PrometheusClient) Start() error { - prometheus.MustRegister(p) + prometheus.Register(p) defer func() { if r := recover(); r != nil { // recovering from panic here because there is no way to stop a