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

Update ipmi_sensor_ to handle ipmitool Unable to read sensor errors #1601

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

smokris
Copy link
Contributor

@smokris smokris commented Nov 29, 2023

Occasionally (once every few days) ipmitool will output a reading like this:

Sensor Reading        :  Unable to read sensor: Device Not Present

Currently, Munin's ipmi_sensor_ produces the following output in that situation:

fan1.value Unable

…which causes Munin to log:

Failed to interpret expected numeric value of field 'fan1' (host 'palo.kosada.com'): 'Unable'
Argument "Unable" isn't numeric in sprintf

…and issue alerts as though the reading had a value of 0.

This PR modifies ipmi_sensor_ to omit the invalid value, which should avoid the unnecessary alerts.

Copy link
Member

@kenyon kenyon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Returning a value of U is the correct thing to do in this situation, which means an unknown/undefined value at that time. This is documented in https://guide.munin-monitoring.org/en/latest/develop/plugins/plugin-concise.html#fetch.

@smokris
Copy link
Contributor Author

smokris commented Nov 29, 2023

Ah, thanks. I just amended it to output fan1.value U when the sensor reading is unavailable.

@kenyon kenyon merged commit b9c1106 into munin-monitoring:master Nov 29, 2023
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants