LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-27-2011, 12:51 AM   #1
nandhapswan
LQ Newbie
 
Registered: Jan 2011
Posts: 7
Blog Entries: 3

Rep: Reputation: 0
Red face 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
 
Old 01-30-2011, 02:04 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
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
 
Old 05-09-2011, 05:46 AM   #3
nandhapswan
LQ Newbie
 
Registered: Jan 2011
Posts: 7

Original Poster
Blog Entries: 3

Rep: Reputation: 0
Lost the logs in Nagios

Quote:
Originally Posted by EricTRA View Post
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.
 
Old 01-03-2016, 11:45 AM   #4
Anselmene
LQ Newbie
 
Registered: Jan 2016
Posts: 1

Rep: Reputation: Disabled
Unhappy

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!?
 
Old 01-05-2016, 03:00 AM   #5
fmattheus
Member
 
Registered: Nov 2015
Posts: 104

Rep: Reputation: 38
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting time and time zone altogether properly in Slack-current, KDE4 spaceballs Slackware 3 04-20-2011 05:15 AM
Trying to get current cpu percentages in a script for nagios. (bash) helptonewbie Linux - Newbie 3 05-01-2008 06:09 PM
rename according to time (programming C) dreamlemon Programming 1 01-28-2008 07:01 AM
Setting system date and time affecting the clock and date on BIOS satimis Ubuntu 7 09-21-2007 08:02 AM
Rename hostname d-rez Linux - Newbie 6 06-13-2002 11:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration