Date: Wed, 21 Oct 2020 18:39:38 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 250513] net-mgmt/telegraf: uptime is reported as seconds-since-epoch, not seconds-since-boot Message-ID: <bug-250513-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D250513 Bug ID: 250513 Summary: net-mgmt/telegraf: uptime is reported as seconds-since-epoch, not seconds-since-boot Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: girgen@FreeBSD.org Reporter: uqs@FreeBSD.org Flags: maintainer-feedback?(girgen@FreeBSD.org) Assignee: girgen@FreeBSD.org So there I was installing telegraf, influxdb, grafana and the like and noti= ced my uptime measured in about 1 year (which itself is bogus, but not the problem). The problem is that the gopsutil as used by telegraf has a bug in how it returns uptime on FreeBSD. This is fixed in head, but broken in the 2.19.7 version used by the port. See this: % sudo telegraf -config /usr/local/etc/telegraf.conf -test|grep uptime; date +%s 2020-10-21T18:31:37Z I! Starting Telegraf 1.15.3 > system,host=3Dcoyote.spoerlein.net uptime=3D1603305097i 16033050970000000= 00 > system,host=3Dcoyote.spoerlein.net uptime_format=3D"18556 days, 18:31" 16= 03305097000000000 1603305097 And indeed, checking out 2.19.7 and running a simple print uptime command I get: % go run gopsutil_uptime.go 1603305234 <nil> Bisecting shows that v2.20.7 is the first version that fixes it: % go run gopsutil_uptime.go 1152659 <nil> Much better. Interestingly, the only commit for that month was a major refactor, that doesn't even state that it fixes this _significant_ problem = on FreeBSD. https://github.com/shirou/gopsutil/commit/28890b0482feb66e057d2e2763d851f02= 0f8dd65 Please approve that I bump the dependency to v2.20.7, thanks. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-250513-7788>