Reinstalled monitored server in a new location and can't add it to the monitoring

Hi there,

I had a TrueNAS “datacore.lan” running inside a ProxmoxVE-VM. The TrueNAS was replaced by a Debian-based samba-server inside another ProxmoxVE-server. The old TrueNAS was monitored using snmp.
The new host replaces the TrueNAS so it uses the same ip and hostname.

I deleted the host “datacore.lan” in cmk and tried to add the new one, but this is not working as I seems cmk holds the fingerprint of the old server.
I tried to delete the old fingerprint using

ssh-keygen -f "/omd/sites/monitoring/.ssh/known_hosts" -R "datacore.lan"

but this was no solution as it then clamimed problems with piggyback (might be, because it also switched the Proxmox-host).

Can you give me a hint hot to include my new host into the monitoring?

Thanks a lot for your help!

CMK version:
Version: 2.3.0p11

OS version:
Debian Version: 12.8

Error message:
[agent]: Host key verification failed.CRIT

Output of “cmk --debug -vvn hostname”:

OMD[monitoring]:~$ cmk --debug -vvn datacore.lan
value store: synchronizing
Trying to acquire lock on /omd/sites/monitoring/tmp/check_mk/counters/datacore.lan
Got lock on /omd/sites/monitoring/tmp/check_mk/counters/datacore.lan
value store: loading from disk
Releasing lock on /omd/sites/monitoring/tmp/check_mk/counters/datacore.lan
Released lock on /omd/sites/monitoring/tmp/check_mk/counters/datacore.lan
Checkmk version 2.3.0p11
+ FETCHING DATA
  Source: SourceInfo(hostname='datacore.lan', ipaddress='10.10.10.10', ident='agent', fetcher_type=<FetcherType.PROGRAM: 5>, source_type=<SourceType.HOST: 1>)
[cpu_tracking] Start [712c56977a40]
Read from cache: AgentFileCache(datacore.lan, path_template=/omd/sites/monitoring/tmp/check_mk/cache/{hostname}, max_age=MaxAge(checking=0, discovery=90.0, inventory=90.0), simulation=False, use_only_cache=False, file_cache_mode=6)
Not using cache (does not exist)
Calling: ssh -T root@datacore.lan
Get data from program
[cpu_tracking] Stop [712c56977a40 - Snapshot(process=posix.times_result(user=0.0, system=0.0, children_user=0.08, children_system=0.0, elapsed=0.12000000011175871))]
  Source: SourceInfo(hostname='datacore.lan', ipaddress='10.10.10.10', ident='piggyback', fetcher_type=<FetcherType.PIGGYBACK: 4>, source_type=<SourceType.HOST: 1>)
[cpu_tracking] Start [712c569d7a10]
Read from cache: NoCache(datacore.lan, path_template=/dev/null, max_age=MaxAge(checking=0.0, discovery=0.0, inventory=0.0), simulation=False, use_only_cache=False, file_cache_mode=1)
No piggyback files for 'datacore.lan'. Skip processing.
No piggyback files for '10.10.10.10'. Skip processing.
Get piggybacked data
[cpu_tracking] Stop [712c569d7a10 - Snapshot(process=posix.times_result(user=0.0, system=0.0, children_user=0.0, children_system=0.0, elapsed=0.0))]
[cpu_tracking] Start [712c56fb30e0]
+ PARSE FETCHER RESULTS
  HostKey(hostname='datacore.lan', source_type=<SourceType.HOST: 1>)  -> Add sections: []
Received no piggyback data
+ EXECUTING INVENTORY PLUGINS
 allnet_ip_sensoric: skipped (no data)
 allnet_ip_sensoric: skipped (no data)
 aruba_wlc_aps: skipped (no data)
 aruba_wlc_aps: skipped (no data)
 check_mk: skipped (no data)
 check_mk: skipped (no data)
 checkmk_agent_plugins: skipped (no data)
 checkmk_agent_plugins: skipped (no data)
 cisco_meraki_org_device_info: skipped (no data)
 cisco_meraki_org_device_info: skipped (no data)
 cisco_meraki_power_supplies: skipped (no data)
 cisco_meraki_power_supplies: skipped (no data)
 dell_hw_info: skipped (no data)
 dell_hw_info: skipped (no data)
 docker_node_info: skipped (no data)
 docker_node_info: skipped (no data)
 esx_systeminfo: skipped (no data)
 esx_systeminfo: skipped (no data)
 fireeye_sys_status: skipped (no data)
 fireeye_sys_status: skipped (no data)
 fritz: skipped (no data)
 fritz: skipped (no data)
 hp_proliant_da_phydrv: skipped (no data)
 hp_proliant_da_phydrv: skipped (no data)
 hp_proliant_mem: skipped (no data)
 hp_proliant_mem: skipped (no data)
 hp_proliant_systeminfo: skipped (no data)
 hp_proliant_systeminfo: skipped (no data)
 ibm_mq_channels: skipped (no data)
 ibm_mq_channels: skipped (no data)
 ibm_mq_managers: skipped (no data)
 ibm_mq_managers: skipped (no data)
 ibm_mq_queues: skipped (no data)
 ibm_mq_queues: skipped (no data)
 infoblox_osinfo: skipped (no data)
 infoblox_osinfo: skipped (no data)
 infoblox_systeminfo: skipped (no data)
 infoblox_systeminfo: skipped (no data)
 inv_cisco_vlans: skipped (no data)
 inv_cisco_vlans: skipped (no data)
 inv_esx_vsphere_hostsystem: skipped (no data)
 inv_esx_vsphere_hostsystem: skipped (no data)
 inv_if: skipped (no data)
 inv_if: skipped (no data)
 aix_baselevel: skipped (no data)
 aix_baselevel: skipped (no data)
 aix_lparstat_inventory: skipped (no data)
 aix_lparstat_inventory: skipped (no data)
 aix_packages: skipped (no data)
 aix_packages: skipped (no data)
 aix_service_packs: skipped (no data)
 aix_service_packs: skipped (no data)
 azure_load_balancer: skipped (no data)
 azure_load_balancer: skipped (no data)
 inventory_checkmk: skipped (no data)
 inventory_checkmk: skipped (no data)
 checkpoint_vpn_tunnels: skipped (no data)
 checkpoint_vpn_tunnels: skipped (no data)
 citrix_controller: skipped (no data)
 citrix_controller: skipped (no data)
 citrix_state: skipped (no data)
 citrix_state: skipped (no data)
 couchbase_nodes_ports: skipped (no data)
 couchbase_nodes_ports: skipped (no data)
 dmidecode: skipped (no data)
 dmidecode: skipped (no data)
 docker_container_labels: skipped (no data)
 docker_container_labels: skipped (no data)
 docker_container_network: skipped (no data)
 docker_container_network: skipped (no data)
 inventory_docker_container_node_name: skipped (no data)
 inventory_docker_container_node_name: skipped (no data)
 docker_node_images: skipped (no data)
 docker_node_images: skipped (no data)
 docker_node_network: skipped (no data)
 docker_node_network: skipped (no data)
 enviromux_micro_information: skipped (no data)
 enviromux_micro_information: skipped (no data)
 inventory_esx_vsphere_clusters: skipped (no data)
 inventory_esx_vsphere_clusters: skipped (no data)
 inventory_esx_vsphere_virtual_machines: skipped (no data)
 inventory_esx_vsphere_virtual_machines: skipped (no data)
 fortiauthenticator_system: skipped (no data)
 fortiauthenticator_system: skipped (no data)
 fortigate_ha: skipped (no data)
 fortigate_ha: skipped (no data)
 fortimail_system: skipped (no data)
 fortimail_system: skipped (no data)
 fortinet_firewall_network_interfaces: skipped (no data)
 fortinet_firewall_network_interfaces: skipped (no data)
 fortisandbox_software: skipped (no data)
 fortisandbox_software: skipped (no data)
 fortisandbox_system: skipped (no data)
 fortisandbox_system: skipped (no data)
 ipmi_firmware: skipped (no data)
 ipmi_firmware: skipped (no data)
 kube_cluster: skipped (no data)
 kube_cluster: skipped (no data)
 kube_cronjob: skipped (no data)
 kube_cronjob: skipped (no data)
 kube_daemonset: skipped (no data)
 kube_daemonset: skipped (no data)
 kube_deployment: skipped (no data)
 kube_deployment: skipped (no data)
 kube_namespace: skipped (no data)
 kube_namespace: skipped (no data)
 kube_node: skipped (no data)
 kube_node: skipped (no data)
 kube_pod: skipped (no data)
 kube_pod: skipped (no data)
 kube_statefulset: skipped (no data)
 kube_statefulset: skipped (no data)
 kyocera_printer: skipped (no data)
 kyocera_printer: skipped (no data)
 lnx_block_devices: skipped (no data)
 lnx_block_devices: skipped (no data)
 lnx_ip_r: skipped (no data)
 lnx_ip_r: skipped (no data)
 lnx_packages: skipped (no data)
 lnx_packages: skipped (no data)
 lnx_sysctl: skipped (no data)
 lnx_sysctl: skipped (no data)
 lnx_video: skipped (no data)
 lnx_video: skipped (no data)
 mobileiron_inventory: skipped (no data)
 mobileiron_inventory: skipped (no data)
 mssql_clusters: skipped (no data)
 mssql_clusters: skipped (no data)
 oracle_systemparameter: skipped (no data)
 oracle_systemparameter: skipped (no data)
 primekey: skipped (no data)
 primekey: skipped (no data)
 snmp_extended_info: skipped (no data)
 snmp_extended_info: skipped (no data)
 solaris_addresses: skipped (no data)
 solaris_addresses: skipped (no data)
 solaris_pkginfo: skipped (no data)
 solaris_pkginfo: skipped (no data)
 solaris_cpus: skipped (no data)
 solaris_cpus: skipped (no data)
 solaris_routes: skipped (no data)
 solaris_routes: skipped (no data)
 win_bios: skipped (no data)
 win_bios: skipped (no data)
 win_disks: skipped (no data)
 win_disks: skipped (no data)
 win_exefiles: skipped (no data)
 win_exefiles: skipped (no data)
 win_ip_r: skipped (no data)
 win_ip_r: skipped (no data)
 win_networkadapter: skipped (no data)
 win_networkadapter: skipped (no data)
 win_reg_uninstall: skipped (no data)
 win_reg_uninstall: skipped (no data)
 win_video: skipped (no data)
 win_video: skipped (no data)
 win_wmi_software: skipped (no data)
 win_wmi_software: skipped (no data)
 win_wmi_updates: skipped (no data)
 win_wmi_updates: skipped (no data)
 juniper_info: skipped (no data)
 juniper_info: skipped (no data)
 lnx_cpuinfo: skipped (no data)
 lnx_cpuinfo: skipped (no data)
 lnx_distro: skipped (no data)
 lnx_distro: skipped (no data)
 lnx_if: skipped (no data)
 lnx_if: skipped (no data)
 lnx_uname: skipped (no data)
 lnx_uname: skipped (no data)
 lparstat_aix: skipped (no data)
 lparstat_aix: skipped (no data)
 mem: skipped (no data)
 mem: skipped (no data)
 mem_used: skipped (no data)
 mem_used: skipped (no data)
 mssql_instance: skipped (no data)
 mssql_instance: skipped (no data)
 netapp_api_disk: skipped (no data)
 netapp_api_disk: skipped (no data)
 netapp_api_info: skipped (no data)
 netapp_api_info: skipped (no data)
 oracle_dataguard_stats: skipped (no data)
 oracle_dataguard_stats: skipped (no data)
 oracle_instance: skipped (no data)
 oracle_instance: skipped (no data)
 oracle_performance: skipped (no data)
 oracle_performance: skipped (no data)
 oracle_recovery_area: skipped (no data)
 oracle_recovery_area: skipped (no data)
 oracle_tablespaces: skipped (no data)
 oracle_tablespaces: skipped (no data)
 perle_chassis: skipped (no data)
 perle_chassis: skipped (no data)
 perle_chassis_slots: skipped (no data)
 perle_chassis_slots: skipped (no data)
 perle_psmu: skipped (no data)
 perle_psmu: skipped (no data)
 prtconf: skipped (no data)
 prtconf: skipped (no data)
 snmp_quantum_storage_info: skipped (no data)
 snmp_quantum_storage_info: skipped (no data)
 snmp_info: skipped (no data)
 snmp_info: skipped (no data)
 solaris_prtdiag: skipped (no data)
 solaris_prtdiag: skipped (no data)
 solaris_uname: skipped (no data)
 solaris_uname: skipped (no data)
 suseconnect: skipped (no data)
 suseconnect: skipped (no data)
 win_computersystem: skipped (no data)
 win_computersystem: skipped (no data)
 win_computersystemproduct: skipped (no data)
 win_computersystemproduct: skipped (no data)
 win_cpuinfo: skipped (no data)
 win_cpuinfo: skipped (no data)
 win_os: skipped (no data)
 win_os: skipped (no data)
 win_system: skipped (no data)
 win_system: skipped (no data)
 winperf_if: skipped (no data)
 winperf_if: skipped (no data)
 netapp_ontap_disk: skipped (no data)
 netapp_ontap_disk: skipped (no data)
 netapp_ontap_info: skipped (no data)
 netapp_ontap_info: skipped (no data)
No piggyback files for 'datacore.lan'. Skip processing.
No piggyback files for '10.10.10.10'. Skip processing.
[cpu_tracking] Stop [712c56fb30e0 - Snapshot(process=posix.times_result(user=0.010000000000000009, system=0.0, children_user=0.0, children_system=0.0, elapsed=0.009999999776482582))]
[agent] Host key verification failed.(!!), [piggyback] Success (but no data found for this host), execution time 0.1 sec | execution_time=0.130 user_time=0.010 system_time=0.000 children_user_time=0.080 children_system_time=0.000 cmk_time_ds=0.040 cmk_time_agent=0.000
Agent exited with code 255: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ED25519 key sent by the remote host is
SHA256:j+P0V7hZs5qiinEPH7i+PckzxwFXLAOPFfvhyyPEzB8.
Please contact your system administrator.
Add correct host key in /omd/sites/monitoring/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /omd/sites/monitoring/.ssh/known_hosts:2
  remove with:
  ssh-keygen -f "/omd/sites/monitoring/.ssh/known_hosts" -R "datacore.lan"
Host key for datacore.lan has changed and you have requested strict checking.
Host key verification failed.(!!)

try (as site-user):

ssh -l root -i /etc/check_mk/check_mk.key <ip-address-of-your-host>
  • Glowsome

Thanks for your hint. (Sorry for my late reply. I was really busy.)

I tried the command but got the following error:

OMD[monitoring]:~$ ssh -l root -i /etc/check_mk/check_mk.key 10.10.10.10
Warning: Identity file /etc/check_mk/check_mk.key not accessible: No such file or directory.

Any additional ideas? :slight_smile:

My bad, sorry for the confusion…
i’ll need to look it up again … i just grabbed this from a long time ago ( and dragged it along since 2.0.0)

Have you tried as site-user to directly ssh in to your monitoring host ?
As i am assuming the key you removed previously with ssh-keygen -f "/omd/sites/monitoring/.ssh/known_hosts" -R "datacore.lan" was not (by any means) afterwards re-added to the known_hosts on the monitoring server, resulting in seen behavior.
So SSH’ing directly from a/the monitoring Server to the host will present you with an option to (re-)trust the fingerprint.

  • Glowsome