Skip to content

Commit

Permalink
Fix counter and gauge metric types. (#3232)
Browse files Browse the repository at this point in the history
  • Loading branch information
tpounds authored and danielnelson committed Sep 14, 2017
1 parent d557cbd commit ef7ce31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/inputs/statsd/statsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,14 +251,14 @@ func (s *Statsd) Gather(acc telegraf.Accumulator) error {
}

for _, metric := range s.gauges {
acc.AddFields(metric.name, metric.fields, metric.tags, now)
acc.AddGauge(metric.name, metric.fields, metric.tags, now)
}
if s.DeleteGauges {
s.gauges = make(map[string]cachedgauge)
}

for _, metric := range s.counters {
acc.AddFields(metric.name, metric.fields, metric.tags, now)
acc.AddCounter(metric.name, metric.fields, metric.tags, now)
}
if s.DeleteCounters {
s.counters = make(map[string]cachedcounter)
Expand Down

0 comments on commit ef7ce31

Please sign in to comment.