Werk #17372: Handle missing disk IO from running docker container
Component | Checks & agents | ||||||
Title | Handle missing disk IO from running docker container | ||||||
Date | Mar 11, 2025 | ||||||
Level | Trivial Change | ||||||
Class | Bug Fix | ||||||
Compatibility | Compatible - no manual interaction needed | ||||||
Checkmk versions & editions |
|
You're affected by this werk in case you are:
- monitoring docker containers with mk_docker
- observing your DiskIO service becoming UNKNOWN after a container restart
The main reason for this behaviour is that the docker API is not returning any metrics in case no Disk IO has happened (yet) in your newly started container.
One possible way to observe this, is to look at the corresponding system file, which is empty:
cat /sys/fs/cgroup/system.slice/docker-CONTAINER_ID.scope/io.stat
mk_docker will respond in that case with all metrics beeing null, e.g.:
{"io_service_bytes_recursive": null, "io_serviced_recursive": null, "io_queue_recursive": null, "io_service_time_recursive": null, "io_wait_time_recursive": null, "io_merged_recursive": null, "io_time_recursive": null, "sectors_recursive": null, "time": 1735809729.685249, "names": {"7:1": "loop1", "7:6": "loop6", "7:4": "loop4", "11:0": "sr0", "7:2": "loop2", "7:0": "loop0", "7:7": "loop7", "8:0": "sda", "7:5": "loop5", "7:3": "loop3"}}
As this is a valid scenario for docker containers, the service will now handle this with a PENDING status.