Page 1 of 1

How DO I Save Changes on commands made on Nagiosxi VM?

Posted: Thu Sep 27, 2012 3:33 am
by Iykmode
I made certain changes on CentOS 6.3, particularly on date and time. Everything worked fine until I rebooted and it went back to the former time.

I think its because I did not save the changes I made. What can I do?

Re: How DO I Save Changes on commands made on Nagiosxi VM?

Posted: Thu Sep 27, 2012 3:32 pm
by scottwilkerson
how did you make the changes?

Many people use NTP to manage time

Code: Select all

yum install ntp -y
service ntpd start

Re: How DO I Save Changes on commands made on Nagiosxi VM?

Posted: Tue Oct 02, 2012 4:13 am
by Iykmode
I took the following steps to change the date:

cd /usr/share/zoneinfo/Asia
ln -sf Kuala_Lumpur /etc/localtime
ntpdate pool.ntp.org
yum install ntp

I have now used the commands you gave me and reloaded Nagiosxi. It still returns me to the previous time which is 17:17 UTC time. 7 hours ahead of local time in Nigeria which is GMT +1

Re: How DO I Save Changes on commands made on Nagiosxi VM?

Posted: Tue Oct 02, 2012 4:10 pm
by mguthrie
You may still need to update your timezone for PHP in the /etc/php.ini file. Instructions on updating that can be found in the following FAQ:
http://support.nagios.com/wiki/index.ph ... .22_Errors

Re: How DO I Save Changes on commands made on Nagiosxi VM?

Posted: Wed Oct 03, 2012 11:57 am
by BanditBBS
It also could be getting set by the time on the VM Host machine. Is that machine set to correct current local time?

Re: How DO I Save Changes on commands made on Nagiosxi VM?

Posted: Wed Oct 03, 2012 12:03 pm
by slansing
Did you follow this guide here? It has a more in-depth view of date/time settings:

http://kb.vmware.com/selfservice/micros ... nalId=1436

Bandit also has a good point.

Re: How DO I Save Changes on commands made on Nagiosxi VM?

Posted: Tue Oct 09, 2012 3:11 am
by Iykmode
This guide was very useful for me. I have followed all the steps required. I have changed my timezone to Africa/Lagos, ie, WAT.

However, after I reload, it still puts me 7 hours ahead, though no more UTC time but on WAT. Even when I manually change the time with the date command, it still goes back to 7 hours ahead of local time after I reload.

Re: How DO I Save Changes on commands made on Nagiosxi VM?

Posted: Tue Oct 09, 2012 11:05 am
by lmiltchev
Can you run the following command and show us the output?

Code: Select all

cat /etc/php.ini | grep date.timezone

Re: How DO I Save Changes on commands made on Nagiosxi VM?

Posted: Fri Oct 12, 2012 2:45 am
by Iykmode
Thanks, this is the output I got:

; http://www.php.net/manual/en/datetime.c ... e.timezone
date.timezone = Europe/London

Re: How DO I Save Changes on commands made on Nagiosxi VM?

Posted: Fri Oct 12, 2012 11:58 am
by scottwilkerson
edit that file and change the following if you are in Africa/Lagos

Code: Select all

timezone=Africa/Lagos