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

newest verions of docker image breaks inputs.temp #12841

Closed
MG-Sky opened this issue Mar 12, 2023 · 2 comments · Fixed by #13017
Closed

newest verions of docker image breaks inputs.temp #12841

MG-Sky opened this issue Mar 12, 2023 · 2 comments · Fixed by #13017
Labels
bug unexpected problem or unintended behavior help wanted Request for community participation, code, contribution size/s 1 day effort, great beginniner issue

Comments

@MG-Sky
Copy link

MG-Sky commented Mar 12, 2023

Relevant telegraf.conf

[[inputs.temp]]

Logs from Telegraf

2023-03-12T14:03:47Z E! [inputs.temp] Error in plugin: error getting temperatures info: Number of warnings: 1

System info

Ubuntu 20.04

Docker

No response

Steps to reproduce

  1. only replace 1.24.x image with the latest - then this plugin stops working.

Expected behavior

temperature should be recorded

Actual behavior

plug-in error

Additional info

No response

@MG-Sky MG-Sky added the bug unexpected problem or unintended behavior label Mar 12, 2023
@powersj
Copy link
Contributor

powersj commented Mar 13, 2023

Looks like the update to gopsutil between v1.25.2 and v1.25.1 may have caused this:

Status: Downloaded newer image for telegraf:1.25.2
2023-03-13T01:14:40Z I! Using config file: /etc/telegraf/telegraf.conf
2023-03-13T01:14:40Z I! Starting Telegraf 1.25.2
2023-03-13T01:14:40Z I! Available plugins: 228 inputs, 9 aggregators, 26 processors, 21 parsers, 57 outputs, 2 secret-stores
2023-03-13T01:14:40Z I! Loaded inputs: temp
2023-03-13T01:14:40Z I! Loaded aggregators: 
2023-03-13T01:14:40Z I! Loaded processors: 
2023-03-13T01:14:40Z I! Loaded secretstores: 
2023-03-13T01:14:40Z I! Loaded outputs: file
2023-03-13T01:14:40Z I! Tags enabled: host=c3f13a8d946d
2023-03-13T01:14:40Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"c3f13a8d946d", Flush Interval:10s
2023-03-13T01:14:50Z E! [inputs.temp] Error in plugin: error getting temperatures info: Number of warnings: 1
...
Status: Downloaded newer image for telegraf:1.25.1
2023-03-13T01:14:18Z I! Using config file: /etc/telegraf/telegraf.conf
2023-03-13T01:14:18Z I! Using config file: /etc/telegraf/telegraf.conf
2023-03-13T01:14:18Z I! Starting Telegraf 1.25.1
2023-03-13T01:14:18Z I! Available plugins: 228 inputs, 9 aggregators, 26 processors, 21 parsers, 57 outputs, 2 secret-stores
2023-03-13T01:14:18Z I! Loaded inputs: temp
2023-03-13T01:14:18Z I! Loaded aggregators: 
2023-03-13T01:14:18Z I! Loaded processors: 
2023-03-13T01:14:18Z I! Loaded secretstores: 
2023-03-13T01:14:18Z I! Loaded outputs: file
2023-03-13T01:14:18Z I! Tags enabled: host=75c771c29fa2
2023-03-13T01:14:18Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"75c771c29fa2", Flush Interval:10s
temp,host=75c771c29fa2,sensor=acpitz temp=48 1678670060000000000
temp,host=75c771c29fa2,sensor=nvme_composite temp=28.85 1678670060000000000
temp,host=75c771c29fa2,sensor=nvme_sensor_1 temp=28.85 1678670060000000000
temp,host=75c771c29fa2,sensor=nvme_sensor_2 temp=36.85 1678670060000000000
temp,host=75c771c29fa2,sensor=pch_skylake temp=36.5 1678670060000000000
temp,host=75c771c29fa2,sensor=thinkpad_cpu temp=48 1678670060000000000
temp,host=75c771c29fa2,sensor=thinkpad temp=0 1678670060000000000
temp,host=75c771c29fa2,sensor=thinkpad temp=0 1678670060000000000
temp,host=75c771c29fa2,sensor=thinkpad temp=0 1678670060000000000
temp,host=75c771c29fa2,sensor=thinkpad temp=0 1678670060000000000
temp,host=75c771c29fa2,sensor=thinkpad temp=0 1678670060000000000
temp,host=75c771c29fa2,sensor=thinkpad temp=0 1678670060000000000
temp,host=75c771c29fa2,sensor=coretemp_package_id_0 temp=39 1678670060000000000
temp,host=75c771c29fa2,sensor=coretemp_core_0 temp=39 1678670060000000000
temp,host=75c771c29fa2,sensor=coretemp_core_1 temp=36 1678670060000000000
temp,host=75c771c29fa2,sensor=coretemp_core_2 temp=38 1678670060000000000
temp,host=75c771c29fa2,sensor=coretemp_core_3 temp=38 1678670060000000000
temp,host=75c771c29fa2,sensor=iwlwifi_1 temp=29 1678670060000000000

In that release gopsutil was updated from 3.22.9 to 3.22.12. I can reproduce outside of telegraf as well.

The key item is that the host.SensorsTemperatures() appears to commonly return warnings in the error but not actual errors. It looks like previously we were checking for warnings and ignoring them: https://github.com/influxdata/telegraf/pull/12580/files#diff-8b5b8537f5ed74417dff77ae61825a839140f430d7ff441b153d0abc743597b8 It was removed since warnings was removed from gopsutil.

However, it looks like the warnings were moved back in with shirou/gopsutil#1377

next steps: re-add the check for warnings

@srebhan I want this for v1.26

@powersj powersj added help wanted Request for community participation, code, contribution size/s 1 day effort, great beginniner issue labels Mar 13, 2023
powersj added a commit to powersj/telegraf that referenced this issue Mar 13, 2023
The temperature sensor reading can return warnings as an error.
Previously we ignored these, but they were removed from gopsutil. The
warning was returned to gopsutil and we should continue to ignore
warnings and only fail on a true error.

fixes: influxdata#12841
powersj added a commit to powersj/telegraf that referenced this issue Mar 13, 2023
The temperature sensor reading can return warnings as an error.
Previously we ignored these, but they were removed from gopsutil. The
warning was returned to gopsutil and we should continue to ignore
warnings and only fail on a true error.

fixes: influxdata#12841
@powersj
Copy link
Contributor

powersj commented Mar 20, 2023

My upstream issue and PR were merged, so now we wait for a release

powersj added a commit to powersj/telegraf that referenced this issue Apr 3, 2023
The temperature sensor reading can return warnings as an error.
Previously we ignored these, but they were removed from gopsutil. The
warning was returned to gopsutil and we should continue to ignore
warnings and only fail on a true error.

fixes: influxdata#12841
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior help wanted Request for community participation, code, contribution size/s 1 day effort, great beginniner issue
Projects
None yet
2 participants