Werk #18475: db2_logsizes: fix crash when write is suspended

Component Checks & agents
Title db2_logsizes: fix crash when write is suspended
Date Sep 23, 2025
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
2.5.0b1
Not yet released
Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.4.0p14
Not yet released
Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.3.0p39
Not yet released
Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)

SELECT total_log_used from sysibmadm.snapdb (which is used internally by db2_logsizes) returns "-" when writes are suspended in db2.

The check did not consider this edgecase and crashed with ValueError: invalid literal for int() with base 10: '-'. Now the check will go to UNKNOWN and show Can not read usedspace.

To the list of all Werks