I'm trying to collect statsd metrics in an influxdb/telegraf/grafana server. What I'm seeing is that there is a continuous stream of entries in influxdb every 10 seconds from telegraf. How can I configure telegraf to only send an update to influxdb whenever it receives a statsd metric over UDP. I don't want a continuously updating value because I want to see the discrete event counts over time periods in grafana.
For example, if I send exactly one counter metric (value=1) at time t0 and no more events for 10 minutes (say), I expect to see exactly one data point for the 10 minute time period I'm aggregating over in Grafana. However, what I see is that every 10s there is an entry in the influxdb telegraph table for the measurement with the value of 1. Grafana would then show me a continuous value of 1 over each 10 minute period. What I really want is that in the 10 minute period where t0 existed, that the value 1 would be shown, whereas in all subsequent time periods (until the next metric, of course), the value would be 0.
How can I achieve that? I see nothing in the telegraf documentation for the statsd plugin that says it will continuously update influxdb with the aggregated value (since the beginning of time) that telegraf has cached.
In telegraf.conf
, change the following to true:
[[input.statsd]]
delete_counters = true