Werk #18200: docker container diskstat: fix parsing of names line

Component Checks & agents
Title docker container diskstat: fix parsing of names line
Date Aug 6, 2025
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
2.5.0b1
Not yet released
Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.4.0p10 Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.3.0p36 Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)

Parsing of the section docker_container_diskstat_cgroupv2 crashed when the subsection [names] contained a line with only a device name (without a device number), e.g.:

[names]
nvme0c0n1

instead of the expected:

[names]
nvme0n1 259:1

The following error was raised:

self.names[line[1]] = line[0]
               ~~~~^^^
IndexError: list index out of range

This issue has been fixed by skipping such corrupt output lines.

To the list of all Werks