hello, i have really weird problems with getting checkmk agent 2.4.0 run reliable on win11 proxmox vm.
does anybody have win11 24h2 with all updates up and running and successfully monitor with checkmk ?
i can setup / register successfully, but after reboot agent does not listen anymore on port 6556 and allow-legacy-pull file appears on reboot - agent pull or service discovery fails then.
Hi.
Did you check the agent controller state . Some times the cmk-agent-ctl not set the legacy mode correctly. in this case you need to set the legacy mode manually:
after installation and issuing register command, it works fine and monitoring server discovers all services and shows green for everything, inlcuding checkmk agent.
with that, agent controller state is:
c: \Program Files (x86) \checkmk\service>cmk-agent-ctl. exe status
Version: 2.4.0p3
Agent socket: operational
IP allowlist: any
Connection: myhostname/mysite
UUID: cae9257a-d465-4607-8ade-312d25f39999
Local:
Connection mode: pull-agent connecting to receiver port: 8000
Certificate issuer: Site mysite agent signing CA
Certificate validity: Wed, 18 Jun 2025 14:31:19 +0000 - Tue, 18, Jun 2030
Remote:
connection mode: pull-agent
Hostname: myhostname
after reboot, it resets itself to legacy mode and it does not even listen on port 6556 - i’m getting then:
C: \Program Files (x86) \checkmk\service>ck-agent-ctl.exe status:
Version: 2.4.0p3
Agent socket: operational
IP allowlist: any
Legacy mode: enabled
No connections
in c:\ProgramData\checkmk\agent i see file “allow-legacy-pull” - but i did not put it there and it was not there before.
it seems, it’s resetting itself somehow
in the log , on successful register/connect i see:
2025-06-18 17:41:02.462 [ctl:3304] [cmk_agent_ctl: :modes: :renew_certificate][DEBUG] Checking registered connections for certificate expiry.
2025-06-18 17:42:49.468
[ctl:3304] [cmk_agent_ctl: :modes: :pull][INFO] Start listening for incoming pull requests
activated)
2025-06-18 17:42:49.490 [ctl:3304] [cmk_agent_ctl: :modes: :pull][INFO] Listening on [::]:6556 for incoming pull connections (IPv6 & IPV4 if
when it resets itself, which happens on simple service restart, then only
2025-06-18 18:09:33.315 [srv 10304] Firewall rule 'Checkmk Agent' had been added successfully for ports [6556]
2025-06-18 18:09:33.317 [srv 10304] File 'C:\ProgramData\cmk_agent_uninstall.txt' is absent, assuming fresh install, legacy pull mode ON
2025-06-18 18:09:33.318 [srv 10304] Reading module config normal
2025-06-18 18:09:33.318 [srv 10304] Processed [1] module(s)
then , after adding an empty version of that file to that location, i’m getting
2025-06-18 18:14:11.761 [srv 6804] Firewall rule 'Checkmk Agent' had been added successfully for ports [6556]
2025-06-18 18:14:11.762 [srv 6804] File 'C: |ProgramData\cmk_agent_uninstall.txt* is too old, assuming fresh install, legacy pull mode ON'
2025-06-18 18:14:11.764 [srv 6804] Reading module config normal
2025-06-18 18:14:11.764 [srv 6804] Processed [1] module(s)
this looks totally weird.
restarting the check mk services removes that file from that location - so if it checks for exitance and then removing it on existence, which leads to assume of fresh installation - how can we have a chance then that registration will be persistent ?
i had the look into the windows agent source, and indeed that file is being refernced there, i.e. being accessed by the windows service. but why ?
there is definitive something wrong with 2.4 agent, as i can reliably make it fail when 2.4 is installed/registered/rebooted. when i install 2.3 agent and do the same, all is working fine.
whoever wants to look at this, i can reproduce this reliably and show it to any dev.
Easiest way would be an empty 2.3 site installed beside your 2.4 one. Take the agent from there.
But I would investigate why the 2.4 one is not running on your system.
I know the problem with CMK 2.4 and Windows Server 2022/2025.
CMK Agent installation and then nothing runs on 6556.
Only after I had registered the agent did the agent start listening. Sometimes I had to restart the service afterwards.
This is a behavior that I have only seen since CMK 2.4