Try to use high resolution timestamp but if it's 0, fall back to unix timestamp. Collectd timestamps are uint64 and influxdb uses int64. Change to use type conversion instead of converting to string and then parsing the string back to int64. Also, test if the collectd timestamp is too large for influxdb. If it is, wrap around and log an error message the first time but don't fill the log with messages for every entry thereafter. Move packet parsing code into its own function so it can be unit tested. Add unit tests to for packets using high resolution and unix timestamps. Fix #1051. Close #1054 |
||
---|---|---|
.. | ||
collectd | ||
graphite | ||
http | ||
udp | ||
coordinator.go |