Issue monitoring after deploy on Docker

Hi,

I deploy using this docker-compose:
version: ‘3.8’

services:
monitoring:
image: checkmk/check-mk-free:2.1.0-latest
container_name: checkmk
ports:
- “8100:5000”
- “8200:8000”
tmpfs:
- “/tmp”
volumes:
- “checkmk:/omd/sites”
- “/etc/localtime:/etc/localtime:ro”
restart: always

volumes:
checkmk:
driver: local

Work monitoring ok, add 2 host ( switch cisco and host docker )

For some reason appear this message:

As soon as you add your Checkmk server to the monitoring, a graph showing the history of your host problems will appear here. Please refer to the [Checkmk user guide](https://docs.checkmk.com/2.1.0/en/dashboards.html#host_problems)for more details.

Im using Checkmk Free Edition 2.1.0p49

The message you get means, that the system where CMK is running on must be monitored with an agent. In your case this will be the system inside the container.

Steps to get rid of this message:

  • setup monitoring for the Docker host
  • deploy the Docker plugin inside the agent of the Docker host
  • create a host object for your CMK container inside the system - follow here the manual about “Monitoring Docker”

One question - why do you use an old version of CheckMK that is not supported anymore?

4 Likes

Hi

I’m new using checkmk, I tought this is latest version.

latest version would be 2.3.0p23
But the procedure is the same for this and your version.

I’m using checkmk/check-mk-free:2.3.0p23
I get error no exist this image

For 2.3 the old free edition is the cloud edition without any licenses inserted.
The limit is there 750 services and not as before 25 hosts.

1 Like

Hi Andreas, thanks for the quick reply. I have a doubt about how many services a single host, such as Linux, can provide as an example.

I’m new using checkmk

Normally you calculate between 20 and 40 services per normal host. (old free edition 25 hosts with 30 services → 750 services for the free tier in the new cloud edition)
A docker container without agent for instance has only 8 or 9 services.
Inside my home environment i have around 600 services with 40 host objects.
The most services here are my two Proxmox hosts.

I deploy 2.3.0p23, and have same issue, was deploy from scratch and have same issue.

Agent

Appear same text:
As soon as you add your Checkmk server to the monitoring, a graph showing the history of your host problems will appear here. Please also be aware that this message might appear as a result of a filtered dashboard. This dashlet currently only supports filtering for sites.Please refer to the Checkmk user guide for more details.

Im using agent 2.3.0 version.

The screenshot shows only the container host, but now you have to deploy the Docker plugin on this host to also monitor the container itself. As your CheckMK runs inside a container, this data is needed.

2 Likes

in RHLE 9 only have available podman, Im using with portainer and work Ok. Im running plugin for install monitoring pods and have this error.

[jaraujo@container2 ~]$ sudo !!
sudo install -m 0755 mk_docker_2.py /usr/lib/check_mk_agent/plugins
[sudo] password for jaraujo: 
[jaraujo@container2 ~]$ 

after that I restart agent and nothing happen.

im reviewing py file and get this error.

[root@container2 jaraujo]# python3 mk_docker_2.py
File “mk_docker_2.py”, line 211
except docker.errors.APIError, exc:
^
SyntaxError: invalid syntax
[root@container2 jaraujo]#

exist plugin for use with podman ?

This version will only work with old Python2. You need to use the “mk_docker.py” what is for Python3.

Create a host in checkmk called localhost and this should populate that dashboard for you.
I also use the container and this is my localhost I made:

I installed plugin then restart services and nothing persist no show container

[root@container2 plugins]# systemctl stop check-mk-agent.socket
[root@container2 plugins]# systemctl start check-mk-agent.socket
[root@container2 plugins]# systemctl status check-mk-agent.socket
● check-mk-agent.socket - Local Checkmk agent socket
   Loaded: loaded (/usr/lib/systemd/system/check-mk-agent.socket; enabled; vendor preset: disabled)
   Active: active (listening) since Sun 2025-01-12 21:57:20 -05; 1h 15min ago
     Docs: https://docs.checkmk.com/latest/en/agent_linux.html
   Listen: /run/check-mk-agent.socket (Stream)
 Accepted: 6888; Connected: 0;
    Tasks: 0 (limit: 100620)
   Memory: 4.0K
   CGroup: /system.slice/check-mk-agent.socket

Jan 12 21:57:20  systemd[1]: Starting Local Checkmk agent socket.
Jan 12 21:57:20  systemd[1]: Listening on Local Checkmk agent socket.
[root@container2 plugins]# ls
mk_docker.py
[root@container2 plugins]# pwd
/usr/lib/check_mk_agent/plugins
[root@container2 plugins]# 

Thanks !!
is working, but how can show container of my server ?


docker plugin was installed then restart process and persist no show container info.

To monitor docker on the host as well as any containers you’ll need to go through the guide posted previously as there’s a few things you have to do to get it working properly