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)
-
::
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!
-
::
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=603- 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.
-