Skip to content

Undocumented regression in temp plugin #11294

Description

@quentinmit

Relevant telegraf.conf

[[inputs.temp]]

Logs from Telegraf

n/a

System info

Telegraf 1.22.4 on Debian 11

Docker

No response

Steps to reproduce

  1. Configure Telegraf with a bare temp input on a Linux system that has hwmon devices.

Expected behavior

In older versions (at least Telegraf <=1.17.3 but I haven't exhaustively tested), each temperature from /sys/class/hwmon/*/temp_* is exposed as a stream with a sensor tag derived from the filename in /sys:

sensor=coretemp_core0_critalarm
sensor=coretemp_core0_input
sensor=coretemp_core0_max
sensor=coretemp_core1_crit
sensor=coretemp_core1_critalarm
sensor=coretemp_core1_input
sensor=coretemp_core1_max
...

This is also what is documented in the temp plugin's README.

Actual behavior

In new builds (at least Telegraf >=1.22.4, sorry I have't bisected) only the /sys/class/hwmon/*/temp_*_input temperatures are exposed:

sensor=coretemp_core0
sensor=coretemp_core1
...

which means that the max/crit/etc. values are no longer being reported anywhere, nor are any sensors that don't follow the pattern of temp_*_input. It looks like this was broken when you pulled in shirou/gopsutil#905

I'm not sure what you should do to fix this now, but metrics shouldn't have undocumented regressions in their structure like this between versions. Ideally you would revert back to the old behavior because there is now missing data, in addition to the schema change. It looks like gopsutil now exposes the max and crit levels as fields that you could turn into metrics, but the other values are just dropped by gopsutil.

Additional info

No response

Metadata

Metadata

Assignees

Labels

bugunexpected problem or unintended behaviorregressionsomething that used to work, but is now brokenupstreambug or issues that rely on dependency fixes

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions