broker-stat unknown command error host key verification failed

Badge +2

After upgradind centreon from 21.10 to 22.10.2, I ‘ve got an error in the web interface (and when I execute the command directrly from the server)

How can I solve this error?

Thanks for your help

37 replies

Userlevel 4
Badge +12

Hi, can you show the command, and what is returned when you run it as centreon-engine on your monitoring server?

Userlevel 1
Badge +7

same exact issue, i’ve just imported ova version

Userlevel 4
Badge +13


choose your -t flavour 🍃


Badge +1

Hey, I’m having the same issue. I tried to follow the steps here but still ran into some problems.

I changed the host name of central to “Iocalhost”. Then I added „--ssh-username=centreon“ and „--ssh-port=xxx“ to the EXTRAOPTIONS macro, since we use a custom ssh port.

Now when I try to connect from centreon-engine, it asks for the passphrase, which is fine for the first time.

So I try to persist it:

Which fails, since apparently the environment variables aren’t set for the connection. Well alright, let’s fix that:

Ok, now the ssh key should remembered unless a restart occurs. And the logon works:

However, when I try to run the plugin from root or the console I get:

And also when I re-log to centreon-engine, it asks for the passphrase again.


PS: Also the forum really does seem to have a problem when trying to post something containing Iocalhost with an l instead of I. I’ve had my whole post deleted and had to re-write it twice. 


Hey, I had the same issue, and I managed to solve it using the next steps:

  • generate a new ssh-key as centreon-engine user (with no passphrase)
  • do the SSH exchange to yourself using ssh-copy-id
  • connect to yourself through ssh to check if it’s working

To create a passphraseless ssh-key, just press “Enter” when prompted for passphrase (which corresponds to “empty for no passphrase” as you can see in the previous capture).


I did not have to edit the configuration of the “Broker-Stats” service (it was suggested in previous answers to add “--remote --ssh-option='-l=centreon'” to the “EXTRAOPTIONS” parameter).


My configuration is the following: 

  • OS - using the VM for VirtualBox, under AlmaLinux8.7
  • architecture - standalone central server
  • Centreon - 23.04
Badge +2


have you try ?

/usr/lib/centreon/plugins// --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} =~ /true|yes/i' --verbose --sshcli-option='-l=centreon-engine'

Userlevel 1
Badge +4

Hi everyone, 


I’ve migrate my centreon 22.04 centos 7 to 23.04 on alma 9,



i’ve the same issue “UNKNOWN: Command error: Host key verification failed.”, i’ve following this for the ssh key exchange, but still have this error, my command : 

/usr/lib/centreon/plugins// --plugin=apps::centreon::local::plugin --hostname= --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


someone have any idea ?



Badge +2

Bonjour, j’ai le même problème :  UNKNOWN: Command error: Host key verification failed.

Seulement j’ai suivis les consigne indiquer sur cette page pour l’échange de clé ssh :

J’ai également changer l’extra option : --verbose --ssh-username=centreon.


Mais mon problème reste le même.


Quelqu’un peut m’aider ?

Merci d’avance.



Kélian et MHEN56, avez vous essayé la solution dont je parle plus haut ?

J’ai divergé des consignes données sur le site de Centreon, en faisant l’échange de clé avec l’utilisateur centreon-engine et non l’utilisateur centreon.

Si cela ne marche toujours pas, pourriez vous indiquer précisément quelles ont été les commandes utilisées svp ? (pour la génération des clés, pour l’échange, et sous quel utilisateur)

Badge +2

@fruchame, je te remercie de t’as réponse, j’ai fait exactement ça : 

su - centreon-engine
ssh-keygen -t ed25519 -a 100
ssh-copy-id -i ~/.ssh/ centreon@localhost


j’utilise actuellement un poller qui est lui même sur le même serveur que mon application WEB Centreon

(je n’ai qu’un serveur pour toute ma supervision et mon application web et en générale pour tout si jamais j’ai oublier quelque chose)

et ma ligne EXTRA OPTION a comme valeur : --verbose --ssh-username=centreon

car si j’utilise les valeurs : --verbose --remote --ssh-option='-l=centreon'

J’ai une erreur qui ressemble a cela : Unknown option: remote at /usr/lib/centreon/plugins// line 2248.

[ cat -n /usr/lib/centreon/plugins// | grep 2248
   = 2248                    warn "Unknown option: $option" if ($warn_message == 1); ]


je n’arrive pas a cerner ce qui ne fonctionne pas, sachant que j’ai suivis la procédure a la lettre :(

Encore merci a vous.

Badge +3

Hello everyone,


If you only have the Centreon central server (standalone), you just need to add [ --hostname=’’ ] without the square brackets in the 'EXTRAOPTIONS' macro of the 'Broker-Stats' service itself, and this will solve the problem. This will bypass Host Key verification. I have personally tested it, and it works.

However, the best practice is to have the central server monitored by a poller.

Userlevel 4
Badge +12

Hi @Melvin @beugnv @m4gn3to @Isabelle BADORC @gaetan.meister @ReneRohe 

If anyone is still having this issue when monitoring the central’s broker from the central’s poller, then follow this :

The best practice is to have the central server monitored by a poller if you have one. If not, you will need to add the --hostname='' option to the host's EXTRAOPTIONS macro to avoid host key verification issues.


Sorry for not posting it here earlier...