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

Initialize "crit" var in liebert pump check to avoid crash in case device doesn't provide baseline #782

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

indigoparadox
Copy link

Thank you for your interest in contributing to Checkmk!
Consider looking into Readme regarding process details.

General information

Extremely simple one-line fix to prevent the liebert_pump plugin from crashing due to "crit" being uninitialized, if the device does not have a threshold OID (as some in our environment do not). This is a re-submission of #747 which I had inadvertently closed while reorganizing my local fork of the repo. Sorry!

Bug reports

To reproduce, add a Liebert CRAC that reports pump hours over SNMP but does not provide a critical threshold over SNMP. This will cause the plugin to crash. The attached CRAC2.txt is an SNMP walk that simulates one such device.

Proposed changes

This plugin should, at the very least, initialize the crit variable, which will be used later (but has a possibility to not be set in the following loop).

@mo-ki mo-ki added the tracked label Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants