-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accumulator options? #1310
Comments
The UDP listener should not be dropping any points, that sounds like a serious bug if it's really happening. What version of Telegraf are you using and can you give more details on what you're seeing? Only the statsd input does counts, sums, etc. There is already a feature request to add that to telegraf more generally (#380) FWIW our statsd listener does support tags: https://github.com/influxdata/telegraf/tree/master/plugins/inputs/statsd#influx-statsd |
$ telegraf -version Here's a demo of what's going on: https://gist.github.com/cheald/f21507116def1669a75017615812fa29 Basically, I can write 100 data points and confirm that they're all sent (via ncat), but when I send them to the UDP listener, only the final one ever makes it into influx. I did go ahead and end up switching to the statsd listener and everything is working as expected now - I just wrote a custom statsd client that can speak Telegraf's augmented line protocol. So, the problem's solved for me at the moment, but the UDP listener's behavior surprised me. My plan initially was to log timing data, then use |
@cheald I see the problem. Since you are sending points without a timestamp to influxdb (which is configured by default for ie, each point gets the timestamp after running your script as configured I get the same result:
but if I change the influxdb precision to "ns", like this: # Configuration for influxdb server to send metrics to
[[outputs.influxdb]]
## The full HTTP or UDP endpoint URL for your InfluxDB instance.
## Multiple urls can be specified as part of the same cluster,
## this means that only ONE of the urls will be written to each interval.
# urls = ["udp://localhost:8089"] # UDP endpoint example
urls = ["http://localhost:8086"] # required
## The target database for metrics (telegraf will create it if not exists).
database = "telegraf" # required
## Retention policy to write to.
retention_policy = "default"
## Precision of writes, valid values are "ns", "us" (or "µs"), "ms", "s", "m", "h".
## note: using "s" precision greatly improves InfluxDB compression.
precision = "ns" then I get all of the points:
|
btw thanks for the great debugging information :), I'm closing this case because #380 already exists for requesting the generic aggregation feature. |
Makes sense. Thank you! |
I'm logging data from our applications to Telegraf via the UDP listener and the Influx line protocol, but it appears that Telegraf is only logging one data point per 10 second window - there's no aggregation of the values passed (counts, sums, etc). We might have hundreds of events per second, but only the most recent one is logged - all the others seem to get dropped. It's obviously desirable to not just write arbitrary numbers of datapoints into influx, but dropping data seems undesirable.
This functionality does exist in the statsd input plugin, but I was hoping to not use that so as to give consumers a much more flexible way to specify tags in the messages sent (rather than relying on statsd templating). Do we have any options besides the statsd plugin? Is there some way to configure a given input plugin to accumulate the values passed to it?
The text was updated successfully, but these errors were encountered: