Docker monitoring, python requests package collision

CMK version: v2.3.0p39
OS version: Rocky Linux 9.5

I have troubles fullfilling the requirements for a docker/container monitoring.

As stated in https://www.youtube.com/watch?v=b4B4x417OQM
or Monitoring Docker

I need to run as root

pip3 install docker

but in fact, when the condition is met that the python package requests is also installed on the node, this can’t be done.

# pip3 install docker
Collecting docker
  Using cached docker-7.1.0-py3-none-any.whl.metadata (3.8 kB)
Collecting requests>=2.26.0 (from docker)
  Using cached requests-2.32.4-py3-none-any.whl.metadata (4.9 kB)
Requirement already satisfied: urllib3>=1.26.0 in /usr/lib/python3.9/site-packages (from docker) (1.26.5)
Requirement already satisfied: charset_normalizer<4,>=2 in /usr/local/lib64/python3.9/site-packages (from requests>=2.26.0->docker) (3.4.2)
Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3.9/site-packages (from requests>=2.26.0->docker) (2.10)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.9/site-packages (from requests>=2.26.0->docker) (2025.7.14)
Using cached docker-7.1.0-py3-none-any.whl (147 kB)
Using cached requests-2.32.4-py3-none-any.whl (64 kB)
Installing collected packages: requests, docker
  Attempting uninstall: requests
    Found existing installation: requests 2.25.1
error: uninstall-no-record-file

× Cannot uninstall requests 2.25.1
╰─> The package's contents are unknown: no RECORD file was found for requests.

hint: The package was installed by rpm. You should check if it can uninstall the package.
# rpm -qa|grep requests
python3-requests-2.25.1-8.el9.noarch

And because I can’t install docker in a dedicated python env (pip3 install docker), I can’t continue.

To uninstall the requests package is not an option.

Is there a solution for this problem?

What happens if you use this “python3-docker-5.0.2-4.el9.noarch.rpm” package from your distribution?

1 Like

Yeah, the suggestion to use pip3 install docker is really not useful here, @mschlenker.
Most distribution carry a recent enough python3-docker package nowadays.

good call, installing the package python3-docker helped me to proceed. Thanks a lot!

one thing to mention here @andreas-doehler , @r.sander

as a result I get this picture, this additional line:

compared to a node, where pip3 install docker as root was possible, because the python3-requests was not a conflicting issue:
image

maybe an additional important fact: on the node, where I helped myself by adding the python3-docker package, I’m dealing with podman (!), not docker

The extra filesystem only depends on your containers running and the configuration of these. I have only these on some of my docker hosts.
Normally they get a “auto ignore” rule :smiley:

1 Like

podman cannot be monitored yet.

We already have a ticket for this issue, I will discuss raising priority with my colleagues.

3 Likes

You volunteered to comment on the changes to the monitoring_docker article? :wink: