Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

Welcome to Pandora FMS Community Forums Community support Advanced troubleshooting Issue with hostname server after restart (two pandora servers)

  • Issue with hostname server after restart (two pandora servers)

  • renato.morales

    Member
    January 20, 2022 at 03:56
    19 Karma points
    Community rank: Tentacle rookie
    Like it
    Up
    0
    Down
    Drop it
    ::

    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!

  • raul.martin

    Administrator
    January 24, 2022 at 10:35
    10 Karma points
    Community rank: Tentacle noob
    Like it
    Up
    1
    Down
    Drop it
    ::

    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:

    [[email protected] ~]# /etc/init.d/pandora_server restart

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

    [[email protected] ~]# mysql -u pandora -p pandora

    <mysql> delete from tserver where name=’localhost.localdomain’;

    You can also do this step by deleting the “localhost.localdomain” servers from the server view.
    http://PANDORA_IP/pandora_console/index.php?sec=gservers&sec2=godmode/servers/modificar_server&refr=60

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

    [[email protected] ~]# mysql -u pandora -p pandora

    <mysql> 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.

  • renato.morales

    Member
    January 25, 2022 at 17:24
    19 Karma points
    Community rank: Tentacle rookie
    Like it
    Up
    1
    Down
    Drop it
    ::

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

    Regards,

    Renato

Viewing 1 - 3 of 3 replies