telegraf icon indicating copy to clipboard operation
telegraf copied to clipboard

Telegraf 2.0 -> 2.2 breakage

Open mabushey opened this issue 11 years ago • 12 comments

I upgraded a server from 2.0 to 2.2.

Nov 23 18:56:55 www1 telegraf[19631]: 2015/11/23 18:56:55 ERROR: write failed: field type conflict: input field "value" on measurement "system_uptime" is type int64, already exists as type float
Nov 23 18:56:55 www1 telegraf[19631]: 2015/11/23 18:56:55 Error in output [influxdb-0]: Could not write to any InfluxDB server in cluster, retrying in 12.921399984s

How do I change "system_uptime" datatype to int64 from float?

mabushey avatar Nov 23 '15 19:11 mabushey

This is likely due to this change: https://github.com/influxdb/telegraf/pull/372, I'll look into it

sparrc avatar Nov 23 '15 19:11 sparrc

@mabushey I confirmed that gosigar was providing the uptime metric as float64, whereas gopsutil is providing it as a uint64 (which we started using in Telegraf 0.2.1)

I actually think that gopsutil has it right, uptime should be an int, but I'll convert it so as not to break backwards compatability.

sparrc avatar Nov 23 '15 19:11 sparrc

Thanks for the lightning fast response! Sounds good. :) It will be nice to have FreeBSD compatibility too.

mabushey avatar Nov 23 '15 19:11 mabushey

When I was working on a fix for this I realized that the gopsutil uptime implementation is pretty broken. We'll have to wait until this PR is merged to fix this: https://github.com/shirou/gopsutil/pull/114

sparrc avatar Nov 23 '15 20:11 sparrc

+1 on this issue. Also, shirou/gopsutil#114 was merged.

allen13 avatar Nov 30 '15 19:11 allen13

Unfortunately there is a Golang bug preventing me from updating the gopsutil dependency: https://github.com/golang/go/issues/11307

I'm going to wait until Go1.5.2 is released to get this out the door, since that should be any day now

sparrc avatar Nov 30 '15 20:11 sparrc

@mabushey @allen13 Had to change some of the godep build process but I got gopsutil updated. This will be fixed in 0.2.4, thanks for your patience!

sparrc avatar Dec 04 '15 20:12 sparrc

Thanks!

allen13 avatar Dec 04 '15 21:12 allen13

Thank you for all you help @sparrc !

mabushey avatar Dec 04 '15 21:12 mabushey

And it is (problem) back for version 0.2.4.1 : 2015/12/11 11:01:39 ERROR: write failed: field type conflict: input field "value" on measurement "system_uptime" is type float64, already exists as type integer

After upgrade from 0.2.3 to fresh 0.2.4.1. Should I create a new issue?

Galser avatar Dec 11 '15 10:12 Galser

I'm facing the same problem with new 0.2.4.1 version:

2015/12/10 17:27:20 ERROR: {"error":"write failed: field type conflict: input field \"value\" on measurement \"system_uptime\" is type float64, already exists as type integer"}
2015/12/10 17:27:20 Error in output [influxdb]: Could not write to any InfluxDB server in cluster, retrying in 10s

pasancario avatar Dec 11 '15 10:12 pasancario

Well, I already opened a new issue (I think it is a correct way to track changes), as it if specific to version upgrade between previous stable 0.2.3 and new 0.2.4, see it in the list, on top.

Galser avatar Dec 11 '15 10:12 Galser