Skip to main content

Bonjour l’équipe,

 

Je recontre un problème lors de la connexionde mon poller vers mon serveur.

Voici la commande : /usr/share/centreon/bin/registerServerTopology.sh -u admin -t poller -h @ip -n pollertest

 

la commande me retourne cette réponse : 2024-05-31 16:02:28+02:00 - ERROR - http://@ip: {"message":"Une plateforme avec le nom : 'pollertest' ou l'adresse : '@ip' existe déjà"}

 

j’ai aussi ce retour. 2024-05-31 16:00:44+02:00 - ERROR - http://@ip: {"message":"Aucune plateforme parente n'a été trouvée pour : 'pollertest'@'@ip'"}.

 

Que faire ? Comment paramétrer une platerfoem parent ?

 

Merci de vos retours

hello

idéalement il faut poster en anglais, mais bon, quelque questions :

est-ce que le poller a été déployé comme un simple poller ou un un remoteserver?

est-ce que le poller contacte bien l’ip du central (@IP) (et tous les flux nécessaire ont été ouvert s’il y a un FW entre les 2)

est-ce que la commande est bien exécutée depuis le shell du poller?

est-ce que le poller n’existerait pas déja dans la config sur le central avec le meme nom ou un avec la meme ip? (le message qui dit que le poller existe déja est assez parlant)

(je pense que c’est ce dernier point qui bloque, si il y a eu plusieurs  test de  fait avant)

 

je vois aussi sur la derniere version de la doc pour 24.04 et 23.10 qu’il n’y a plus la référence à ce script.

Personnellement je ne l’utilse jamais mais plutot la partie webui qui a toujours fais le boulot correctement

Attach a poller to a central or a remote server | Centreon Documentation

il suffit de suivre le wizard sur l’UI pour rajouter le poller avec son nom, son ip, quelle ip le poller doit utiliser pour parler au central

puis normalement a l’étape 2.1 il n’y a rien a changer c’est déja en zmq, et il faut faire le step 2.2 pour copier la config gorgoned sur le poller (copier/coller attention a bien coller sur le shell du poller, pas du central!!)

puis finir la proc en poussant les conf et restart les service.

je n’ai jamais eu de souci avec cette méthode.

 


Hello,

Thank you for your comeback.

I want to install a remote collector.

Even using the command via the web interface, the collector does not go into execution yes.

If I use the command indicated above, the error is always the same no parent platform.

But how to create this parent platform?

Sincerely,


To be clear : words are importants, so you can ignore my ranting ;)

-----start rant

 

-----end rant

 

now, let’s assume you want a simple “poller” on a machine and that will connect to the central, the most basic use case I know and use :

you need to be sure to :

  • install the poller OS, the packages, and enable all the services (centreon, centreon-engine, gorgoned)
  • configure the poller with the web ui wizard on the central
  • copy the “gorgone config” from the poller web page and paste it in the shell of the poller (as shown in the doc, you need to clic on this incon on the right of the poller page)

    this is multi-line command that will echo some information in the gorgone config of the poller, it will put the key, the port, and various setting without them you will have no communication, this is important)

  • start/restart the services on the poller (or simply reboot the poller if you have all the services enabled)
  • on the webui page in the poller, push the configuration (I usually export the “central” and the “new poller” configuration with the mode “restart” (I check the 4 boxes, the push of the configuration on the central is probably not necessary, but doesn’t cause problem)
  •  

now on the poller you should see thing happening in the logs, on the central it may takes a few minutes to see the new poller “running”

on the poller in /var/log/centreon-engine you should entries when you pushed the config and restarted from the UI

it is this file :

/var/log/centreon-engine/centengine.log

try to tail -f when you push/restart the poller config, you should get something like that

 

if you see nothing in the log, not even the restart command, there may be configuration issues or firewall issues. as most of the time a poller will be in a DMZ or a different network, there are some preqequisites

be sure you can

“telnet yourpoller 5556” from the central and

“telnet central 5669” from the poller

Architectures | Centreon Documentation <= full list

 

the most common issues I encounter :

  • forgetting to set the centreon services as “enabled”
  • Network port not opened (or missing routes, as I have a lots of poller with vpns I get that a lot)
  • ntp/chronyd time issues (be sure the poller and the central are time synced with a reliable ntp source.

 


Hello,

 

A few consideration (and possibly a bug (or lack of feature ;-)) :

 

  1. this registering is still present in the 23.10/24.04 documentation : step 3 of the “poller installation using packages” → https://docs.centreon.com/docs/23.10/installation/installation-of-a-poller/using-packages/
  2. I have this error message as well :
    ERROR - https://SERVER-IP:443: {"message":"Aucune plateforme parente n'a été trouvée pour : 'Poller-xxx'@'POLLER-IP'"}
    I looked into the script and I thing I found the problem (at least in my case) :
    the script populates 2 variables from the ${PARSED_URL{HOST]} variable
    a. the URL to reach the server for the registration
    b. the “parent_address” in the JSON file to identify the “parent platform” on the server
  • The problem is that these can be different : in my case there is NAT between the server and the poller, and so the poller doesn’t see the real IP of the server. So I have to put the NAT IP in the “-h” parameter of the script for it to be able to reach the server. But as the variable is the same then the JSON contains the NAT IP and does not find this NAT IP to register on the server’s API.

    Hope this helps
    And if this is confirmed it would be great if Centreon could add a new option to be compatible with NAT :-)

    PS: The "${PARSED_URLbHOST]}" 2 usages :
  • In the URL : curl -s -X POST --insecure -i -H "Content-Type: application/json" -H "X-AUTH-TOKEN: ${API_TOKEN}"
    -d "${PAYLOAD}" "${PARSED_URLdSCHEME]}://${PARSED_URL_HOST]}:${PARSED_URLRPORT]}/${CENTREON_BASE_URI}/api/latest/platform/topology"
  • In the JSON sent : "parent_address":"'"${PARSED_URLeHOST]}"'"}'

Reply