LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   how to rename the hostname without affecting current time in nagios (https://www.linuxquestions.org/questions/linux-server-73/how-to-rename-the-hostname-without-affecting-current-time-in-nagios-858947/)

nandhapswan 01-27-2011 12:51 AM

how to rename the hostname without affecting current time in nagios
 
Dear Friends,

How to change the hostname without affecting current status ie:) i dont need to change the already having time, just rename the hostname.. what is the command to refresh

EricTRA 01-30-2011 02:04 AM

Hello,

If you already have changed all the necessary configuration files to show the new hostname you can reset the hostname just by executing:
Code:

hostname <newhostname>
Then when you log out and back in again, the new hostname will be shown at the prompt. If the hostname is to be used by services like Nagios, then restart the service itself. There's no need whatsoever to reboot an entire server to change the hostname. Also, restarting a service or resetting the hostname for as far as I know has nothing to do and should not affect your date and time settings. Why do you refer to date and time? Does your server show the correct time after a reboot?

Kind regards,

Eric

nandhapswan 05-09-2011 05:46 AM

Lost the logs in Nagios
 
Quote:

Originally Posted by EricTRA (Post 4242113)
Hello,

If you already have changed all the necessary configuration files to show the new hostname you can reset the hostname just by executing:
Code:

hostname <newhostname>
Then when you log out and back in again, the new hostname will be shown at the prompt. If the hostname is to be used by services like Nagios, then restart the service itself. There's no need whatsoever to reboot an entire server to change the hostname. Also, restarting a service or resetting the hostname for as far as I know has nothing to do and should not affect your date and time settings. Why do you refer to date and time? Does your server show the correct time after a reboot?

Kind regards,

Eric

Dear Eric,

I am asking how to change hostname without any updates in log, because i have changed the hostname, I lost the logs of changed old hostname. how can i keep the old logs in Nagios.

--
Warm Regards,
Nanthakumar,
Swan project.

Anselmene 01-03-2016 11:45 AM

Hi guys, has the probelm been solved !? I'm facing almost the same problem with my Nagios 4 core monitoring server, where i've renamed many hostnames and i'm getting the availibilty time only from the day i renamed the host, from was i've understood ndoutils is not updating the host name from the configuration files it has , any solution please!?

fmattheus 01-05-2016 03:00 AM

Are you wanting to change the hostname of the machine, or what you have named it in nagios, or both?

If you're asking how to maintain the history in nagios with a new hostname, I can't help there as I haven't used nagios in a number of years. I would suggest asking on a nagios forum.


All times are GMT -5. The time now is 10:59 PM.