Skip to content

Fix ups checks with Python ValueError exceptions - #837

Closed
sven-ruess wants to merge 1 commit into
Checkmk:masterfrom
sven-ruess:ups-fix
Closed

Fix ups checks with Python ValueError exceptions#837
sven-ruess wants to merge 1 commit into
Checkmk:masterfrom
sven-ruess:ups-fix

Conversation

@sven-ruess

Copy link
Copy Markdown
Contributor

General information

Checkmk 2.4.0p7 is used on Checkmk appliance 1.7.10.

ups check voltage in, ups voltage out and ups load out were not working and break down with exception ValueError.

Bug reports

If a ups device configured and a discovery is done, then those checks will report this exception.

Proposed changes

Take care about the value, which should be used for the check. In all cases a integer is return and check is working.

@sven-ruess

Copy link
Copy Markdown
Contributor Author

This error https://github.com/Checkmk/checkmk/actions/runs/16622749658/job/47030993204?pr=837#step:7:347 is not related to my changes. Can you support? I do not know, what I can do, to solve it.

Thank you

@sven-ruess
sven-ruess force-pushed the ups-fix branch 3 times, most recently from efa259e to dc59177 Compare August 4, 2025 15:05
Signed-off-by: Sven Rueß <github@sven-ruess.de>
@mo-ki

mo-ki commented Aug 21, 2025

Copy link
Copy Markdown
Member

Hi Sven!
Can you share the offending values with us? I'd rather handle this case explicitly, then silently skipping all unknown values and just not discovering anything.

@sven-ruess

Copy link
Copy Markdown
Contributor Author

Hi Moritz,

I contacted the customer to provide me a snmpwalk. After I have received, I will forward it.

Further I can tell you, that the problem is, that some values have not value and are None. Conversion from None to int is not working. So I take care about, that all needed values will be int. If present, the current value, otherwise 0. Functions are working as expected.

@racicLuka

Copy link
Copy Markdown
Contributor

Hello @sven-ruess,

Are there any news? Did the customer provide a walk?

Thank you!

@racicLuka

Copy link
Copy Markdown
Contributor

Hey @sven-ruess,

Since there has not been new information on this topic, I will close the PR. If anything new comes up, feel free to reopen it.

Best,
Luka

@racicLuka racicLuka closed this Sep 29, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants