CheckMK Setup
I use OMD - Open Monitoring Distribution Version 2.2.0p16.cre
hosted on Docker, i added my hosts into checkmk and now i wanted to configure services and monitoring agents. This is the first time trying version above 2.1, i´m already familiar with other Check_MK versions.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ec9af386ec4b checkmk/check-mk-raw:2.2.0p16 "/docker-entrypoint.…" 2 months ago Up 21 minutes (healthy) 0.0.0.0:162->162/udp, :::162->162/udp, 0.0.0.0:514->514/tcp, :::514->514/tcp, 0.0.0.0:6563->6563/tcp, :::6563->6563/tcp, 0.0.0.0:514->514/udp, :::514->514/udp, 0.0.0.0:8000->8000/tcp, :::8000->8000/tcp, 6557/tcp, 0.0.0.0:80->5000/tcp, :::80->5000/tcp monitoring
Error message
I was able to install the agent both on linux and windows server machines but i also wanted to register the agent. It worked once on a system, but on any other system that i tried later, it did not work.
I always get this error message on windows server:
PS C:\Program Files (x86)\checkmk\service> ./cmk-agent-ctl register --hostname PD_PD-RD --server 192.168.190.16 --site pd --user register
Attempting to register at 192.168.190.16, port 8000. Server certificate details:
PEM-encoded certificate:
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
Issued by:
Site 'pd' local CA
Issued to:
pd
Validity:
From Tue, 12 Dec 2023 09:09:59 +0000
To Thu, 12 Dec 3022 09:09:59 +0000
Do you want to establish this connection? [Y/n]
> Y
Please enter password for 'register'
> i entered the correct password here
[2024-02-19 15:31:27.323087 +01:00] ERROR [cmk_agent_ctl] src\main.rs:29: Error registering existing host at https://192.168.190.16:8000/pd
Caused by:
Request failed with code 500 Internal Server Error: Internal Server Error
User register is member of the agent_registration built-in role. It makes no difference giving the user admin privileges or changing the user to another admin account, error message stays the same.
My servers and the checkmk host are in the same subnet and can reach each other, so there is no firewall blocking inbetween. Error message also pops up on linux systems.
I only got it one time working, on the machine i tried first:
C:\Program Files (x86)\checkmk\service>cmk-agent-ctl.exe status
Version: 2.1.0p30
Agent socket: operational
IP allowlist: any
Connection: 192.168.190.16:8000/pd
UUID: 0b7d0471-7f0b-4bc6-b1d1-07e041830cff
Local:
Connection type: pull-agent
Certificate issuer: Site 'pd' agent signing CA
Certificate validity: Mon, 19 Feb 2024 13:08:31 +0000 - Mon, 19 Feb 2029 13:08:31 +0000
Remote:
Connection type: pull-agent
Registration state: operational
Host name: PD_PD-Prm