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

Missing temperature sensor should not generate a warning #14645

Closed
danepowell opened this issue Jan 30, 2024 · 2 comments · Fixed by #14656
Closed

Missing temperature sensor should not generate a warning #14645

danepowell opened this issue Jan 30, 2024 · 2 comments · Fixed by #14656
Labels
feature request Requests for new plugin and for new features to existing plugins

Comments

@danepowell
Copy link
Contributor

danepowell commented Jan 30, 2024

Use Case

On many (probably most) systems, there's at least one temperature sensor with no data (see #5692 ), and this is completely normal and expected.

Expected behavior

The missing temperature is logged only as a debug message, given that this is normal and expected behavior. The developer guidelines say:

Don't log a warning every time a plugin is called for situations that are normal on some systems.

Actual behavior

The missing temperature is logged as a warning, leading to logs full of this warning and decreasing the visibility of more serious warnings:

[inputs.temp] Couldn't read temperature from "/sys/class/hwmon/hwmon2/temp1_input": read /sys/class/hwmon/hwmon2/temp1_input: no data available

Additional info

No response

@danepowell danepowell added the feature request Requests for new plugin and for new features to existing plugins label Jan 30, 2024
@powersj
Copy link
Contributor

powersj commented Jan 30, 2024

Hi,

Willing to put up a PR?

At first I was a little hesitant to make this change given the history. I think the temp plugin pre-dates the dev guidelines ;) However, after thinking about it, it makes a lot of sense to either print them once, or change them to debug.

@powersj powersj added the waiting for response waiting for response from contributor label Jan 30, 2024
@danepowell
Copy link
Contributor Author

Happy to post a PR, thanks. Just wanted to make sure it would be accepted.

@telegraf-tiger telegraf-tiger bot removed the waiting for response waiting for response from contributor label Jan 30, 2024
danepowell added a commit to danepowell/telegraf that referenced this issue Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants