centreon / centreon-plugins

Collection of standard plugins to discover and gather cloud-to-edge metrics and status across your whole IT infrastructure.
https://www.centreon.com
Apache License 2.0
311 stars 274 forks source link

[apps::centreon::local::plugin] --mode=broker-stats : UNKNOWN: Command error: Host key verification failed #4113

Closed gagzou closed 11 months ago

gagzou commented 1 year ago

Hi,

When changing "centreon-plugin-Applications-Monitoring-Centreon-Central.noarch" from version 20221115 to 20221215, I have an ssh error :

`# /usr/lib/centreon/plugins//centreon_centreon_central.pl --plugin=apps::centreon::local::plugin --hostname=127.0.0.1 --mode=broker-stats --broker-stats-file='/var/lib/centreon-broker/central-broker-master-stats.json' --broker-stats-file='/var/lib/centreon-broker/central-rrd-master-stats.json' --broker-stats-file='/var/lib/centreon-engine/central-module-master-stats.json' --filter-name='' --warning-speed-events='' --critical-speed-events='' --warning-queued-events='' --critical-queued-events='' --warning-unacknowledged-events='' --critical-unacknowledged-events='' --warning-status='' --critical-status='%{type} eq "output" and %{queue_file_enabled} =~ /true|yes/i' --verbose

UNKNOWN: Command error: Host key verification failed.`

Best regards,

NTIC94130 commented 1 year ago

Hello : Centreon : 22.10.2 Plugin : App-Monitoring-Centreon-Central-custom : 22.07.5

Migration from version 22.04 to 22.10

Command : /usr/lib/centreon/plugins//centreon_centreon_central.pl --plugin=apps::centreon::local::plugin --hostname=172.x.x.x --mode=broker-stats --broker-stats-file='' --broker-stats-file='' --broker-stats-file='' --filter-name='' --warning-speed-events='' --critical-speed-events='' --warning-queued-events='' --critical-queued-events='' --warning-unacknowledged-events='' --critical-unacknowledged-events='' --warning-status='' --critical-status=''

I got this message from the node : Broker-Stats UNKNOWN: Command error: Host key verification failed.

Best regards,

Centreon_Broker_Stats_2_26122022 Centreon_Broker_Stats_1_26122022

tizianosartori commented 1 year ago

Same issue for me I tried this workaround: https://github.com/centreon/centreon-plugins/issues/1757 without success

gagzou commented 1 year ago

Same result with : --ssh-backend=sshcli or --ssh-backend=plink or --ssh-backend=libssh sshcli : UNKNOWN: Command error: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password). plink : UNKNOWN: please connect with plink command to your host and accept the server host key libssh : UNKNOWN: auth issue: pubkey issue

gagzou commented 1 year ago

Hi, Do you have any news regarding this problem. I updated to 21.10.14 (centreon plugins 20230315), same problem. Thanks,

gagzou commented 1 year ago

Hi, Same problem with centreon 22.10.7 and centreon plugins 202304. Best regards,

gagzou commented 1 year ago

Hi, centreon documentation says : The checks related to Broker-Stats service should be done from a poller and it is done through SSH. If you only have a central server, then checks will be initiated and performed on and by the central server itself. You can skip below steps for SSH key exchange if the central server monitors itself. (https://docs.centreon.com/pp/integrations/plugin-packs/procedures/applications-monitoring-centreon-central/) I only have one server (central server) and it's not working.

Thanks

gagzou commented 11 months ago

By adding --hostname='' , this fixes the problem

NTIC94130 commented 11 months ago

Thank you with little delay