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 275 forks source link

Get broker-stats: Host key verification failed. #1757

Closed Meistercoach83 closed 4 years ago

Meistercoach83 commented 4 years ago

Hey! I try to get the broker-stats from a remote poller. Calling it directly in the shell: /usr/lib/centreon/plugins//centreon_centreon_central.pl --plugin=apps::centreon::local::plugin --hostname=***** --mode=broker-stats --broker-stats-file='/var/lib/centreon-engine/*-module-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} =~ /yes/i' --verbose --remote --ssh-option='-l=centreon'

works fine - but in the web interface i get an

UNKNOWN: Command error: Host key verification failed.

A connection via ssh centreon@***** is working as expected. What can I do to solve this?

garnier-quentin commented 4 years ago

You need to test the command with centreon-engine user.

Meistercoach83 commented 4 years ago

isn´t that the user "centreon"? i installed from iso...

garnier-quentin commented 4 years ago

Plugins are executed by centengine process. And the user of centengine process is 'centreon-engine'.

Meistercoach83 commented 4 years ago

Sorry to ask again.. but I didn´t get that running. Do I have to add a passwd for centreon-engine on the poller and add the autologin for ssh like I did for the user centreon?

garnier-quentin commented 4 years ago

You need to test the ssh connection with centreon-engine user on your poller. If it's working, try with the plugin (still with the user centreon-engine). Maybe you'll need that option: --ssh-option='-l=centreon-engine'

bgamer972 commented 1 year ago

try https://docs.centreon.com/pp/integrations/plugin-packs/procedures/applications-monitoring-centreon-central/#ssh-key-exchange