Skip to content

Commit

Permalink
Fix statsd scientific notation parsing
Browse files Browse the repository at this point in the history
closes #1733
  • Loading branch information
sparrc committed Sep 9, 2016
1 parent ac58a6b commit ca8fb44
Show file tree
Hide file tree
Showing 3 changed files with 263 additions and 224 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

- [#1628](https://github.com/influxdata/telegraf/issues/1628): Fix mongodb input panic on version 2.2.
- [#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

## v1.0 [2016-09-08]

Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/statsd/statsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ func (s *Statsd) parseStatsdLine(line string) error {
}

// Parse the value
if strings.ContainsAny(pipesplit[0], "-+") {
if strings.HasPrefix(pipesplit[0], "-") || strings.HasPrefix(pipesplit[0], "+") {
if m.mtype != "g" {
log.Printf("Error: +- values are only supported for gauges: %s\n", line)
return errors.New("Error Parsing statsd line")
Expand Down
Loading

0 comments on commit ca8fb44

Please sign in to comment.