Skip to content
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

collectd timestamps are always 0 #1051

Closed
jvshahid opened this issue Oct 23, 2014 · 2 comments
Closed

collectd timestamps are always 0 #1051

jvshahid opened this issue Oct 23, 2014 · 2 comments
Assignees

Comments

@jvshahid
Copy link
Contributor

This is reported on irc and there's a pcap file that captures the collectd payload here

dgnorton added a commit that referenced this issue Oct 24, 2014
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.
@dgnorton dgnorton removed the review label Oct 27, 2014
@renchap
Copy link

renchap commented Oct 29, 2014

Seems like there is a problem with this patch, the timestamp are stored in seconds where influx wants milliseconds. I am using collectd 5.4.0 with the latest collectd.
You can find me on IRC if you want more debug traces.

@RobertAtomic
Copy link

I see the same behavior as renchap... time is stored in seconds rather than milliseconds. Seen in collectd 5.1 and 5.4
time sequence_number value
1415323127 1989850001 19847378
1415322953 1955640001 19830194
1415322800 1924380001 19814927
1415322640 1890780001 19798990
1415322476 1857380001 19782614
1415322312 1824420001 19766380

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants