Pandora FMS Community

Issue with hostname server after restart (two pandora servers)

renato.morales · 20 ene 2022, 3:56 · 3 mensajes · 81 visitas

  1. Inicio del debate

    Hi guys, yesterday we had a big outage and our pandora node got restart, after that the server was down and I restarted myself pandora service. However, when i restarted it, a new server was created with a new hostname I noticed that the hostname was not configured on the config file # Servername: Name of this server # if not given, it takes hostname. It's preferable to setup one # because machine name could change by some reason. #servername greystone So, now i have some issues because i have two different servers, one of the is taking some modules and the old one is taking others. My old server hostname was localhost.localdomain My new server hostanme is pandora It's ok If I change the hostname on the linux node to localhost.localdomain and then restart pandora service? Would this work to have again working the old server with all the modules? Is this safe?

    Thanks in advance!

  2. Hi Renato,

    Here is a solution to the problem, let's say you want the name of the pandora server to be "pandora":

    1- So that the name of the server never changes depending on the hostname of the machine and is always the one indicated in "pandora_server.conf", modify "pandora_server.conf".

    servername pandora

    Once the file has been modified, restart the server:

    [root@pandora ~]# /etc/init.d/pandora_server restart

    2- Delete the old server "localhost.localdomain", from the DB:

    [root@pandora ~]# mysql -u pandora -p pandora

    delete from tserver where name='localhost.localdomain';

    You can also do this step by deleting the "localhost.localdomain" servers from the server view. (Link not available anymore)

    3- Assign to all the agents the server with name "pandora":

    [root@pandora ~]# mysql -u pandora -p pandora

    update tagente set server_name='pandora' where id_agent like '%';

    With these steps:

    - The name of the server_name will always be "pandora", since it is registered in pandora_server.conf

    - All agents will have configured the server with name "pandora".

    Best regards,

    Raul.

  3. Thank you so much for your help Raul! I will check it and let you know how it goes

    Regards,

    Renato

Entra en tu cuenta para publicar.