Question

Mise à jour configuration pollers 1.8.1 depuis un Central 21.10

  • 1 April 2022
  • 9 replies
  • 390 views

Badge +1

Bonjour, je rencontre un problème avec une migration ( 1.8.1 --> 21.10 ).
J'ai installé un nouveau serveur Central avec l'ISO 21.10 et intégré la base de données de l'ancien serveur.
J'ai bien mes pollers distants qui communiquent avec le central mais je n'arrive plus à mettre à jour les configurations des pollers.
l'utilisateur "centreon" du serveur central arrive bien a se connecter sur le distant sans MDP ( clé SSH OK ) mais la configuration n'est pas envoyé.
Pour des raisons de volume et d'organisation, je ne peux pas réaliser la migration de tous mes pollers distants en 21.10 immédiatement.
Avez-vous déjà réussi à faire communiquer un serveur central 21.10 avec un poller distant en 1.8.1?
Merci d'avance pour vos retours,
Cordialement


9 replies

Userlevel 5
Badge +16

Hello @SebastienD,

centengine 1.8.1 and broker 21.10 are not compatible.

There are kind of break changes between this 2 version (almost 5 years).

Once of the biggest break changes is the format of the cbmod’s configuration loaded by centengine, which was in XML and now in JSON format.

For the copy of the file, now that is handle by gorgone daemon, try to perform the connection with the user centreon-gorgone on the centreon user of the poller:

su - centreon-gorgone
ssh centreon@ip_poller

Maybe you’ll need to use the old keys of centreon user or perform a new exchange.

 

Then You can try the following “trick” to load the old configuration by editing the engine configuration of your poller and change this:

/usr/lib64/nagios/cbmod.so /etc/centreon-broker/poller-aws-training1-module.json
by
/usr/lib64/nagios/cbmod.so /etc/centreon-broker/poller-aws-training1-module.xml

 

Badge +1

Thank you for your feedback, 

I have the user "centreon-gorgone" of the central server which can connect to the user "centreon" of the remote poller without asking for a password.
The problem is that the configuration file is never loaded on the remote poller.
I can't find a log file on the central server that indicates a connection and transfer error

 

Badge +1

By checking in the Centreon documentation, it is however well specified that a Central 21.10 server can export the configuration of a poller in 1.8.1 but nothing is specified except an adaptation on the path of the plugins.

 

Userlevel 5
Badge +16

I wasn’t aware about this documentation :’)
When you expert the configuration, did you see something is the /var/log/centreon-gorgone/gorgoned.log ?

Could you enable debug of gorgoned (in the menu Administration > Parameters > Debug), restart gorgoned, export the configuration and take a look ?

Userlevel 5
Badge +16

And also could you check the log on the pollers:

  • /var/log/messages
  • /var/log/centreon-engine/centengine.log
  • /var/log/centreon-broker/<poller-module>.log

When you try to restart centengine ?

Badge +1

Hello,

Contents of the "Gorgoned" log file

16 09:07:02 - DEBUG - [proxy] Send message: [channel = control] [action = PING] [token = ] [target = 37~~37] [data = {}]
2022-05-16 09:07:02 - DEBUG - [core] Message received - [PONG] [] [] {"data":{"id":"37"}}
2022-05-16 09:07:02 - INFO - [proxy] Pong received from '37'
2022-05-16 09:07:02 - DEBUG - [core] zmq_recvmsg error: Ressource temporairement non disponible
2022-05-16 09:07:31 - DEBUG - [legacycmd] Processing file '/var/lib/centreon/centcore.cmd_read'
2022-05-16 09:07:31 - INFO - [legacycmd] Handling command 'SENDCFGFILE', Target: '37'
2022-05-16 09:07:31 - INFO - [legacycmd] Handling command 'SENDCBCFG', Target: '37'
2022-05-16 09:07:31 - INFO - [legacycmd] Handling command 'RELOAD', Target: '37'
2022-05-16 09:07:31 - DEBUG - [core] Message received - [REMOTECOPY] [5b49ae0f4dec4324631a534e00349100af7257fc1a9753c45ebf301bbfc29223fe655204aa1a7229a4740463a6027489e4b24dc8687ac66e2c4f6063a4ffe1b0] [37] {"logging":0,"content":{"owner":"centreon-engine","source":"/var/cache/centreon//config/engine/37","group":"centreon-engine","destination":"/etc/centreon-engine//","metadata":{"centcore_proxy":1,"centcore_cmd":"SENDCFGFILE"},"cache_dir":"/var/cache/centreon/"}}
2022-05-16 09:07:31 - DEBUG - [proxy] choose node target '37' for node '37'
2022-05-16 09:07:31 - DEBUG - [core] Message received - [REMOTECOPY] [5b49ae0f4dec4324631a534e00349100af7257fc1a9753c45ebf301bbfc29223fe655204aa1a7229a4740463a6027489e4b24dc8687ac66e2c4f6063a4ffe1b0] [37] {"logging":0,"content":{"owner":"centreon-broker","source":"/var/cache/centreon//config/broker/37","group":"centreon-broker","destination":"/etc/centreon-broker/","metadata":{"centcore_proxy":1,"centcore_cmd":"SENDCFGFILE"},"cache_dir":"/var/cache/centreon/"}}
2022-05-16 09:07:31 - DEBUG - [proxy] choose node target '37' for node '37'
2022-05-16 09:07:31 - DEBUG - [legacycmd] Event: [ACK] [5b49ae0f4dec4324631a534e00349100af7257fc1a9753c45ebf301bbfc29223fe655204aa1a7229a4740463a6027489e4b24dc8687ac66e2c4f6063a4ffe1b0] {"data":null,"code":0}
2022-05-16 09:07:31 - DEBUG - [proxy] Send message: [channel = 37] [action = REMOTECOPY] [token = 5b49ae0f4dec4324631a534e00349100af7257fc1a9753c45ebf301bbfc29223fe655204aa1a7229a4740463a6027489e4b24dc8687ac66e2c4f6063a4ffe1b0] [target = 37~~37] [data = {"logging":0,"content":{"source":"/var/cache/centreon//config/engine/37","owner":"centreon-engine","group":"centreon-engine","destination":"/etc/centreon-engine//","cache_dir":"/var/cache/centreon/","metadata":{"centcore_proxy":1,"centcore_cmd":"SENDCFGFILE"}}}]
2022-05-16 09:07:31 - DEBUG - [core] Message received - [COMMAND] [0edf259a5d1af17288364fe75b9e4be5e4c037f3e4a2bbe38d5a358ca994ba2f46dadbcfa83443b0c23852f5320a580dd08e59702bae2dd38b8ed9b7a4ae56fb] [37] {"logging":0,"content":[{"metadata":{"centcore_proxy":1,"centcore_cmd":"RELOAD"},"command":"sudo service centengine reload"}]}
2022-05-16 09:07:31 - DEBUG - [proxy] choose node target '37' for node '37'
2022-05-16 09:07:31 - DEBUG - [legacycmd] Event: [ACK] [5b49ae0f4dec4324631a534e00349100af7257fc1a9753c45ebf301bbfc29223fe655204aa1a7229a4740463a6027489e4b24dc8687ac66e2c4f6063a4ffe1b0] {"data":null,"code":0}
2022-05-16 09:07:31 - DEBUG - [core] zmq_recvmsg error: Ressource temporairement non disponible
2022-05-16 09:07:31 - DEBUG - [legacycmd] Event: [ACK] [0edf259a5d1af17288364fe75b9e4be5e4c037f3e4a2bbe38d5a358ca994ba2f46dadbcfa83443b0c23852f5320a580dd08e59702bae2dd38b8ed9b7a4ae56fb] {"data":null,"code":0}
2022-05-16 09:07:31 - DEBUG - [proxy] Sshclient return: [message = cannot sftp copy file : Can't open file: file does not exist]
2022-05-16 09:07:31 - DEBUG - [proxy] Send message: [channel = 37] [action = REMOTECOPY] [token = 5b49ae0f4dec4324631a534e00349100af7257fc1a9753c45ebf301bbfc29223fe655204aa1a7229a4740463a6027489e4b24dc8687ac66e2c4f6063a4ffe1b0] [target = 37~~37] [data = {"logging":0,"content":{"source":"/var/cache/centreon//config/broker/37","owner":"centreon-broker","group":"centreon-broker","destination":"/etc/centreon-broker/","cache_dir":"/var/cache/centreon/","metadata":{"centcore_proxy":1,"centcore_cmd":"SENDCFGFILE"}}}]
2022-05-16 09:07:31 - DEBUG - [proxy] Sshclient return: [message = cannot sftp copy file : Can't open file: file does not exist]
2022-05-16 09:07:31 - DEBUG - [proxy] Send message: [channel = 37] [action = COMMAND] [token = 0edf259a5d1af17288364fe75b9e4be5e4c037f3e4a2bbe38d5a358ca994ba2f46dadbcfa83443b0c23852f5320a580dd08e59702bae2dd38b8ed9b7a4ae56fb] [target = 37~~37] [data = {"logging":0,"content":[{"metadata":{"centcore_proxy":1,"centcore_cmd":"RELOAD"},"command":"sudo service centengine reload"}]}]

 

I see a "cannot sftp copy file" error but I don't know how to fix it

 

On the Poller : 

The command related to the reload of "centengine" on the poller works well because I see the reload of the process. I have no error on the poller because the new files are not copied so it restarts the old files. 

Thanks

Badge +1

Sorry but my post of yesterday did not go through the site…

 

Here are the messages I find in the "Gorgoned" logs when I upload the config

2022-05-17 13:45:05 - DEBUG - == Info: Connection #1745 to host 127.0.0.1 left intact
2022-05-17 13:45:05 - ERROR - [autodiscovery] -class- host discovery - cannot get platform versions - Login error [code: '401'] [message: 'Unauthorized']
2022-05-17 13:45:20 - DEBUG - [audit] sampling starting
2022-05-17 13:45:24 - DEBUG - [legacycmd] Processing file '/var/lib/centreon/centcore.cmd_read'
2022-05-17 13:45:24 - INFO - [legacycmd] Handling command 'SENDCFGFILE', Target: '37'
2022-05-17 13:45:24 - INFO - [legacycmd] Handling command 'SENDCBCFG', Target: '37'
2022-05-17 13:45:24 - INFO - [legacycmd] Handling command 'RELOAD', Target: '37'
2022-05-17 13:45:24 - DEBUG - [core] Message received - [REMOTECOPY] [84351458edc29828e1fb5e57e09ca75e8bdf8c1d701f027de73a886d241107d6fa147f1faf891b0589709bdf30c2fa67a82a93296d0ef51bdfe4072d243f63b2] [37] {"logging":0,"content":{"owner":"centreon-engine","source":"/var/cache/centreon//config/engine/37","group":"centreon-engine","destination":"/etc/centreon-engine//","metadata":{"centcore_proxy":1,"centcore_cmd":"SENDCFGFILE"},"cache_dir":"/var/cache/centreon/"}}
2022-05-17 13:45:24 - DEBUG - [proxy] choose node target '37' for node '37'
2022-05-17 13:45:24 - DEBUG - [core] Message received - [REMOTECOPY] [84351458edc29828e1fb5e57e09ca75e8bdf8c1d701f027de73a886d241107d6fa147f1faf891b0589709bdf30c2fa67a82a93296d0ef51bdfe4072d243f63b2] [37] {"logging":0,"content":{"owner":"centreon-broker","source":"/var/cache/centreon//config/broker/37","group":"centreon-broker","destination":"/etc/centreon-broker/","metadata":{"centcore_proxy":1,"centcore_cmd":"SENDCFGFILE"},"cache_dir":"/var/cache/centreon/"}}
2022-05-17 13:45:24 - DEBUG - [proxy] choose node target '37' for node '37'
2022-05-17 13:45:24 - DEBUG - [legacycmd] Event: [ACK] [84351458edc29828e1fb5e57e09ca75e8bdf8c1d701f027de73a886d241107d6fa147f1faf891b0589709bdf30c2fa67a82a93296d0ef51bdfe4072d243f63b2] {"data":null,"code":0}
2022-05-17 13:45:24 - DEBUG - [proxy] Send message: [channel = 37] [action = REMOTECOPY] [token = 84351458edc29828e1fb5e57e09ca75e8bdf8c1d701f027de73a886d241107d6fa147f1faf891b0589709bdf30c2fa67a82a93296d0ef51bdfe4072d243f63b2] [target = 37~~37] [data = {"logging":0,"content":{"source":"/var/cache/centreon//config/engine/37","owner":"centreon-engine","group":"centreon-engine","destination":"/etc/centreon-engine//","cache_dir":"/var/cache/centreon/","metadata":{"centcore_proxy":1,"centcore_cmd":"SENDCFGFILE"}}}]
2022-05-17 13:45:24 - DEBUG - [core] Message received - [COMMAND] [3436dd83f595bcd301adfd418b6df90a6cfbc3bf2f31d23fc81b14c58f43f8b292c1e5928ae5e21a5c1f74750352ae993acd6df119455722a9948716c465d924] [37] {"logging":0,"content":[{"metadata":{"centcore_proxy":1,"centcore_cmd":"RELOAD"},"command":"sudo service centengine reload"}]}
2022-05-17 13:45:24 - DEBUG - [legacycmd] Event: [ACK] [84351458edc29828e1fb5e57e09ca75e8bdf8c1d701f027de73a886d241107d6fa147f1faf891b0589709bdf30c2fa67a82a93296d0ef51bdfe4072d243f63b2] {"data":null,"code":0}
2022-05-17 13:45:24 - DEBUG - [proxy] choose node target '37' for node '37'
2022-05-17 13:45:24 - DEBUG - [core] zmq_recvmsg error: Ressource temporairement non disponible
2022-05-17 13:45:24 - DEBUG - [legacycmd] Event: [ACK] [3436dd83f595bcd301adfd418b6df90a6cfbc3bf2f31d23fc81b14c58f43f8b292c1e5928ae5e21a5c1f74750352ae993acd6df119455722a9948716c465d924] {"data":null,"code":0}
2022-05-17 13:45:24 - DEBUG - [proxy] Sshclient return: [message = cannot sftp copy file : Can't open file: file does not exist]
2022-05-17 13:45:24 - DEBUG - [proxy] Send message: [channel = 37] [action = REMOTECOPY] [token = 84351458edc29828e1fb5e57e09ca75e8bdf8c1d701f027de73a886d241107d6fa147f1faf891b0589709bdf30c2fa67a82a93296d0ef51bdfe4072d243f63b2] [target = 37~~37] [data = {"logging":0,"content":{"source":"/var/cache/centreon//config/broker/37","owner":"centreon-broker","group":"centreon-broker","destination":"/etc/centreon-broker/","cache_dir":"/var/cache/centreon/","metadata":{"centcore_proxy":1,"centcore_cmd":"SENDCFGFILE"}}}]
2022-05-17 13:45:24 - DEBUG - [proxy] Sshclient return: [message = cannot sftp copy file : Can't open file: file does not exist]
2022-05-17 13:45:24 - DEBUG - [proxy] Send message: [channel = 37] [action = COMMAND] [token = 3436dd83f595bcd301adfd418b6df90a6cfbc3bf2f31d23fc81b14c58f43f8b292c1e5928ae5e21a5c1f74750352ae993acd6df119455722a9948716c465d924] [target = 37~~37] [data = {"logging":0,"content":[{"metadata":{"centcore_proxy":1,"centcore_cmd":"RELOAD"},"command":"sudo service centengine reload"}]}]
 

the upload fails with the message "cannot sftp copy".
I see that the source is strange "/var/cache/centreon//config/broker/37". Shouldn't there be only one "/" in the middle of the link.

Badge +1

the upload fails with the message "cannot sftp copy".
I see that the source is strange "/var/cache/centreon//config/broker/37". Shouldn't there be only one "/" in the middle of the link.

2022-05-17 13:45:05 - DEBUG - == Info: Connection #1745 to host 127.0.0.1 left intact
2022-05-17 13:45:05 - ERROR - [autodiscovery] -class- host discovery - cannot get platform versions - Login error [code: '401'] [message: 'Unauthorized']
2022-05-17 13:45:20 - DEBUG - [audit] sampling starting
2022-05-17 13:45:24 - DEBUG - [legacycmd] Processing file '/var/lib/centreon/centcore.cmd_read'
2022-05-17 13:45:24 - INFO - [legacycmd] Handling command 'SENDCFGFILE', Target: '37'
2022-05-17 13:45:24 - INFO - [legacycmd] Handling command 'SENDCBCFG', Target: '37'
2022-05-17 13:45:24 - INFO - [legacycmd] Handling command 'RELOAD', Target: '37'
2022-05-17 13:45:24 - DEBUG - [core] Message received - [REMOTECOPY] [84351458edc29828e1fb5e57e09ca75e8bdf8c1d701f027de73a886d241107d6fa147f1faf891b0589709bdf30c2fa67a82a93296d0ef51bdfe4072d243f63b2] [37] {"logging":0,"content":{"owner":"centreon-engine","source":"/var/cache/centreon//config/engine/37","group":"centreon-engine","destination":"/etc/centreon-engine//","metadata":{"centcore_proxy":1,"centcore_cmd":"SENDCFGFILE"},"cache_dir":"/var/cache/centreon/"}}
2022-05-17 13:45:24 - DEBUG - [proxy] choose node target '37' for node '37'
2022-05-17 13:45:24 - DEBUG - [core] Message received - [REMOTECOPY] [84351458edc29828e1fb5e57e09ca75e8bdf8c1d701f027de73a886d241107d6fa147f1faf891b0589709bdf30c2fa67a82a93296d0ef51bdfe4072d243f63b2] [37] {"logging":0,"content":{"owner":"centreon-broker","source":"/var/cache/centreon//config/broker/37","group":"centreon-broker","destination":"/etc/centreon-broker/","metadata":{"centcore_proxy":1,"centcore_cmd":"SENDCFGFILE"},"cache_dir":"/var/cache/centreon/"}}
2022-05-17 13:45:24 - DEBUG - [proxy] choose node target '37' for node '37'
2022-05-17 13:45:24 - DEBUG - [legacycmd] Event: [ACK] [84351458edc29828e1fb5e57e09ca75e8bdf8c1d701f027de73a886d241107d6fa147f1faf891b0589709bdf30c2fa67a82a93296d0ef51bdfe4072d243f63b2] {"data":null,"code":0}
2022-05-17 13:45:24 - DEBUG - [proxy] Send message: [channel = 37] [action = REMOTECOPY] [token = 84351458edc29828e1fb5e57e09ca75e8bdf8c1d701f027de73a886d241107d6fa147f1faf891b0589709bdf30c2fa67a82a93296d0ef51bdfe4072d243f63b2] [target = 37~~37] [data = {"logging":0,"content":{"source":"/var/cache/centreon//config/engine/37","owner":"centreon-engine","group":"centreon-engine","destination":"/etc/centreon-engine//","cache_dir":"/var/cache/centreon/","metadata":{"centcore_proxy":1,"centcore_cmd":"SENDCFGFILE"}}}]
2022-05-17 13:45:24 - DEBUG - [core] Message received - [COMMAND] [3436dd83f595bcd301adfd418b6df90a6cfbc3bf2f31d23fc81b14c58f43f8b292c1e5928ae5e21a5c1f74750352ae993acd6df119455722a9948716c465d924] [37] {"logging":0,"content":[{"metadata":{"centcore_proxy":1,"centcore_cmd":"RELOAD"},"command":"sudo service centengine reload"}]}
2022-05-17 13:45:24 - DEBUG - [legacycmd] Event: [ACK] [84351458edc29828e1fb5e57e09ca75e8bdf8c1d701f027de73a886d241107d6fa147f1faf891b0589709bdf30c2fa67a82a93296d0ef51bdfe4072d243f63b2] {"data":null,"code":0}
2022-05-17 13:45:24 - DEBUG - [proxy] choose node target '37' for node '37'
2022-05-17 13:45:24 - DEBUG - [core] zmq_recvmsg error: Ressource temporairement non disponible
2022-05-17 13:45:24 - DEBUG - [legacycmd] Event: [ACK] [3436dd83f595bcd301adfd418b6df90a6cfbc3bf2f31d23fc81b14c58f43f8b292c1e5928ae5e21a5c1f74750352ae993acd6df119455722a9948716c465d924] {"data":null,"code":0}
2022-05-17 13:45:24 - DEBUG - [proxy] Sshclient return: [message = cannot sftp copy file : Can't open file: file does not exist]
2022-05-17 13:45:24 - DEBUG - [proxy] Send message: [channel = 37] [action = REMOTECOPY] [token = 84351458edc29828e1fb5e57e09ca75e8bdf8c1d701f027de73a886d241107d6fa147f1faf891b0589709bdf30c2fa67a82a93296d0ef51bdfe4072d243f63b2] [target = 37~~37] [data = {"logging":0,"content":{"source":"/var/cache/centreon//config/broker/37","owner":"centreon-broker","group":"centreon-broker","destination":"/etc/centreon-broker/","cache_dir":"/var/cache/centreon/","metadata":{"centcore_proxy":1,"centcore_cmd":"SENDCFGFILE"}}}]
2022-05-17 13:45:24 - DEBUG - [proxy] Sshclient return: [message = cannot sftp copy file : Can't open file: file does not exist]
2022-05-17 13:45:24 - DEBUG - [proxy] Send message: [channel = 37] [action = COMMAND] [token = 3436dd83f595bcd301adfd418b6df90a6cfbc3bf2f31d23fc81b14c58f43f8b292c1e5928ae5e21a5c1f74750352ae993acd6df119455722a9948716c465d924] [target = 37~~37] [data = {"logging":0,"content":[{"metadata":{"centcore_proxy":1,"centcore_cmd":"RELOAD"},"command":"sudo service centengine reload"}]}]

 

Badge +1

sorry but my posts of answer does not pass. Waiting for a moderator's validation..... 

I see in the logs "cannot sftp copy file : Can't open file: file does not exist"

and a few lines above: [data = {"logging":0, "content":{"source":"/var/cache/centreon//config/engine/37", "owner": "centreon-engine", "group": "centreon-engine", "destination":"/etc/centreon-engine//", "cache_dir":"/var/cache/centreon/", "metadata":{"centcore_proxy":1, "centcore_cmd": "SENDCFGFILE"}}]

the source looks wrong

Reply