LinuxQuestions.org
Visit the LQ Articles and Editorials section
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
Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290
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
Blog Entries: 3

Original Poster
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


All times are GMT -5. The time now is 04:19 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration