INFO [cmk_agent_ctl] starting
INFO [cmk_agent_ctl] Loaded config from '"/var/lib/cmk-agent/cmk-agent-ctl.toml"', connection registry from '"/var/lib/cmk-agent/registered_connections.json"'
INFO [cmk_agent_ctl::site_spec] Failed to discover agent receiver port using https.
INFO [cmk_agent_ctl::site_spec] Failed to discover agent receiver port using http.
ERROR [cmk_agent_ctl] Failed to discover agent receiver port from Checkmk REST API, both with http and https. Run with verbose output to see errors.
Can anybody help me because I lost a day trying to make this work
so that triggered a lot more to happen but I still get an error
russell@plex-ubuntu:~$ sudo cmk-agent-ctl -v register --server 192.168.1.15:8000 --site monitoring --user<user> --hostname 192.168.1.28
INFO [cmk_agent_ctl] starting
INFO [cmk_agent_ctl] Loaded config from '"/var/lib/cmk-agent/cmk-agent-ctl.toml"', connection registry from '"/var/lib/cmk-agent/registered_connections.json"'
Attempting to register at 192.168.1.15, port 8000. Server certificate details:
PEM-encoded certificate:
-----BEGIN CERTIFICATE-----
xxxxxxxxxxxxxxxx
-----END CERTIFICATE-----
Issued by:
Site 'monitoring' local CA
Issued to:
monitoring
Validity:
From Sun, 07 Apr 2024 07:12:04 +0000
To Mon, 07 Apr 3023 07:12:04 +0000
Do you want to establish this connection? [Y/n]
> y
Please enter password for 'userl'
>
ERROR [cmk_agent_ctl] Error registering existing host at https://192.168.1.15:8000/monitoring
Caused by:
Request failed with code 404 Not Found: Host 192.168.1.28 does not exist.
It is a home lab and I do not want the certs timing out…is there a parameter I can add to make the cert unlimited in duration or at least longer than 1 year.
I know this is not great security but this is all on a local network
Did you try with hostname? Exactly as it is in Checkmk (caps and lowercase).
You can see in “Available agent configurations”, if the host is on the agent scope.
Hi, the CA for the TLS Registration is valid for a thousand years and the agent certificates are automatically renewed, so you don´t have anything to do there.
So I think the answer to your question is… YES
(I can only get the server to work when specified with IP:PORT but think that makes sense as I do not have a FQDN)