-
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
Telegraf snmp input truncating Counter64 values #2237
Comments
This is a bug/limitation within the telegraf core, and not specific to the snmp input. It seems that during serialization, the value is converted from unsigned 64-bit integer to a signed 64-bit integer. And since the value is greater than the max of a signed 64-bit integer, it sets it to the max possible with this type (9223372036854775807). |
Opened issue for this on influxdb, as it clearly does not support unsigned 64-bit integers. influxdata/influxdb#7801 |
Ah, missed the fact that InfluxDB itself can't handle uint64. I think I grabbed my config from one of the issues here I suspect people either haven't had their counters exceed int64 size or (more likely?) just haven't noticed it's being truncated. Hopefully this is an easy enough feature to add to InfluxDB - I'm assuming Telegraf serialization will also need to be fixed-up if that happens. |
closing this for now. If InfluxDB support uint64 than we will add support in telegraf as well. |
@sparrc is InfluxDB the only output officially supported? This is still an issue if anyone's using the SNMP input with an output that supports uint64. |
Well this would be an issue with telegraf in general, not the SNMP input. The SNMP input is passing on the value as the proper type. |
True, didn't mean to point fingers specifically at SNMP, though it'll be a common issue with that input. |
Bug report
The SNMP input is truncating large Counter64 values:
Telegraf output:
Relevant telegraf.conf:
System info:
Telegraf 1.1.1, Oracle Linux Server release 6.8
Steps to reproduce:
This requires a target device that's either very busy or been up long enough so a Counter64 value is close to wrapping.
Expected behavior:
Actual value is sent to Influx.
Actual behavior:
Value is truncated.
The text was updated successfully, but these errors were encountered: