I have checkmk server running on a Vm and am monitoring a remote VM. The way checkmk server setup is it’s got multiple hosts added with same IP (i.e remote server). Only the hostname different but all pointing to same remote server IP. Now when I trying to register the remote server with checkmk server via
:~$ sudo cmk-agent-ctl status
Version: 2.2.0p22
Agent socket: operational
IP allowlist: any
Connection: /monitoring
UUID: e3b23413-1e82-452a-90d6-9c0c0eac1498
Local:
Connection mode: pull-agent
Connecting to receiver port: 8000
Certificate issuer: Site ‘monitoring’ agent signing CA
Certificate validity: Thu, 29 Feb 2024 04:31:47 +0000 - Wed, 28 Feb 2029 04:31:47 +0000
Remote:
Connection mode: pull-agent
Hostname: hostname4
it lost configs for hostname1 ,hostname2 and hostname3
how can I achieve multiple hosts registration with same IP. Reason for why it was setup like this is due to customer scripts depending on each microservice in /usr/lib/check_mk_agent/local/
It may be a stupid setup but am looking to improve this by registering a single time and grouping services to folders … is it possible at all ?
Regards
Matt Output of “cmk --debug -vvn hostname”: (If it is a problem with checks or plugins)
That is completely normal, you can only register your host to a second site with a different name. On one site you can only have one registration at the same time.
I believe that the intention is not to register to a second site but to add additional hosts at the same Checkmk site that are targeting the same IP address (= same agent). Actually I’m having exactly this issue since I upgraded the agent to 2.1.
The registration allows one hostname only, no alias. After registration of one hostname Checkmk’s request to the other hostnames receive a TLS error. If you register another hostname the first hostname gets the same TLS error instead.
As i said that is as it should be.
It is only possible to register one host one time to the same site.
If you want to query the same agent under different names you need a second or third instance of CMK that fetches the results for the different hostnames.
I believe that the intention is not to register to a second site but to add additional hosts at the same Checkmk site that are targeting the same IP address (= same agent). Actually I’m having exactly this issue since I upgraded the agent to 2.1
When deregistering a host, multiple steps are needed:
(At host) cmk-agent-ctl --delete-all --enable-insecure-connections (second param may differ, I’m currently not at any system, but it’s needed because as long as it’s not used, you cannot pull without tls
if just one connection should get deleted, use param “–delete CONNECTION_UUID” - but beware that just this connection gets removed and as long as at least one other connection exists, pull without tls is not possible
(At site) from host properties, open host menu and select to remove tls registration
Services from same host can only be shown at another host by configuring cluster hosts (just with one node each) and defining “clustered services for overlapping clusters” accordingly - search for clustered services in our official documentation.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.