Fix sensor plugin, was splitting on ":" incorrectly

closes #748
This commit is contained in:
Cameron Sparr 2016-02-26 15:10:12 +00:00
parent a97c93abe4
commit 6284e2011c
2 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@
### Features ### Features
### Bugfixes ### Bugfixes
- [#748](https://github.com/influxdata/telegraf/issues/748): Fix sensor plugin split on ":"
## v0.10.4.1 ## v0.10.4.1

View File

@ -49,7 +49,7 @@ func (s *Sensors) Gather(acc telegraf.Accumulator) error {
var found bool var found bool
for _, sensor := range s.Sensors { for _, sensor := range s.Sensors {
parts := strings.SplitN(":", sensor, 2) parts := strings.SplitN(sensor, ":", 2)
if parts[0] == chipName { if parts[0] == chipName {
if parts[1] == "*" || parts[1] == featureLabel { if parts[1] == "*" || parts[1] == featureLabel {