Hi Everyone,
first time poster. I hope im doing everything right. Here i go:
Checkmk version: Checkmk Raw Edition 2.2.0p12
OS version of Checkmk server or monitored system:
Ubuntu 20.04.6 LTS on Checkmk server / Windwows 10 on monitored system
Description of the problem : I just set up a fresh checkmk raw on my system and wanted to test the monitoring on my Win10 host. I followed this guide: Monitoring Windows - The new agent for Windows in detail
Before registration, i set a random password for the user “automation”, wrote it down somewhere, and saved.
When i got to the registration of the agent, i encountered an error message.
Command :
"C:\Program Files (x86)\checkmk\service\cmk-agent-ctl.exe" register -s <IP-Address> -i <sitename> -U automation -H <hostname>
Output:
Attempting to register at <IP-Address>, port 8000. Server certificate details: PEM-encoded certificate: -----BEGIN CERTIFICATE----- *** -----END CERTIFICATE----- Issued by: Site '<sitename>' local CA Issued to: <sitename> Validity: From Mon, 30 Oct 2023 13:56:24 +0000 To Wed, 30 Oct 3022 13:56:24 +0000 Do you want to establish this connection? [Y/n] Y Please enter password for 'automation' [2023-11-01 15:57:49.552267 +01:00] ERROR [cmk_agent_ctl] src\main.rs:29: Error registering >existing host at https://<IP-Address>:8000/<sitename> Caused by: Request failed with code 500 Internal Server Error: Internal Server Error
In the Forum, i found this as a fix: Permissions for automation user to run cmk-agent-ctl register?
That didnt work for me, unfortunately. Also, since the user “automation” seems to have the admin-role, that didnt make sense to me. I reverted all changes in permissions to default afterwards.
Registration with the user cmkadmin was also not possible.
Then, i looked around and checked the file /opt/omd/sites/sitename/var/log/agent-receiver/error.log. At the bottom, i saw this entry:
FileNotFoundError: [Errno 2] No such file or directory: '/omd/sites/sitename/var/check_mk/web/automation/automation.secret'
That gave me the idea to set the Authentication of the user automation to “Automation secret for machine accounts”. I set a random value there, saved, and attempted the registration with the user cmkadmin. That worked! I tested back and forth with this, but now im confused. I can use the user cmkadmin for agent registration, but only if the user automation has Authentication set to automation secret… Im not sure whether or not i caused this error in my configuration of checkmk, if i just lack understanding of how this works or if i encountered a bug. Im hoping to get a better understanding here. Any advice is appreciated.
Kind regards
Hannes