Skip to main content

[How to] Remote Server, how to fix synchronisation problems

  • 3 July 2024
  • 0 replies
  • 25 views

Hello

If you have problems with a Remote Server who is not in a stable state, like :

  • wrong IP address or wrong name, in " Configuration  >  Pollers"
  • strange information in "Monitoring > Resources Status" (graph error, Command line not showing)

You can check the following thing :
On the Remote Server, use the following request on the "centreon" database :

SELECT  `id`,  `type`,  `status`,  `parent_id`, LEFT(`params`, 256),  `created_at` FROM `centreon`.`task` ORDER BY `created_at` DESC LIMIT 10;

Do the same on the Central.

If you have some task in status "pending" so you have a synchronization problem between your Central and the Remote Server.

On both RS and Central
check the local API reach-ability : 

curl "http://127.0.0.1/centreon/api/latest/"


the command must return something like this :

{"code":404,"message":"No route found for \"GET http:\/\/127.0.0.1\/centreon\/api\/latest\/\""}


If you have something else, like an HTML answer, fix your Apache config to get this working.

check the file :

/etc/centreon-gorgone/config.d/31-centreon-api.yaml


you will find a user and a password.
The user must exist in your local Centreon, must be admin, no access to front-end, and the correct password must be set. Check if the user is not locked.
If you need to create the user, don’t forget to add it to the "Excluded users" list on "Administration > Authentication"

Check if everything is fine
Execute this command with the correct user/password :

 /usr/share/centreon/bin/centreon -u "centreon-gorgone" -p 'my_super_pass'

It must reply : "Unknown option"
If it doesn’t, recheck you Apache conf and the user in Centreon, and check again.

Now restart Gorgone on both RS and Central :
 

systemctl stop gorgoned.service
systemctl start gorgoned.service

On the Central, export the configuration for the Central (generate, export, restart) and the Remote Server, and choose "restart" as the Method.

Now the task in the database must became "completed", and the errors on the Remote Server must be gone.

0 replies

Be the first to reply!

Reply