From 6284e2011c3f038c239ac12143cadd1f8d235988 Mon Sep 17 00:00:00 2001 From: Cameron Sparr Date: Fri, 26 Feb 2016 15:10:12 +0000 Subject: [PATCH] Fix sensor plugin, was splitting on ":" incorrectly closes #748 --- CHANGELOG.md | 1 + plugins/inputs/sensors/sensors.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b8ae58e74..3320e1dc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Features ### Bugfixes +- [#748](https://github.com/influxdata/telegraf/issues/748): Fix sensor plugin split on ":" ## v0.10.4.1 diff --git a/plugins/inputs/sensors/sensors.go b/plugins/inputs/sensors/sensors.go index b2c2919cc..dbb304b71 100644 --- a/plugins/inputs/sensors/sensors.go +++ b/plugins/inputs/sensors/sensors.go @@ -49,7 +49,7 @@ func (s *Sensors) Gather(acc telegraf.Accumulator) error { var found bool for _, sensor := range s.Sensors { - parts := strings.SplitN(":", sensor, 2) + parts := strings.SplitN(sensor, ":", 2) if parts[0] == chipName { if parts[1] == "*" || parts[1] == featureLabel {