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

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Iykmode
Posts: 29
Joined: Wed Sep 19, 2012 5:11 am

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

Post 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?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Iykmode
Posts: 29
Joined: Wed Sep 19, 2012 5:11 am

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

Post 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
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

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

Post 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
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

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

Post 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?
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

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

Post 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.
Iykmode
Posts: 29
Joined: Wed Sep 19, 2012 5:11 am

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

Post 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.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

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

Post by lmiltchev »

Can you run the following command and show us the output?

Code: Select all

cat /etc/php.ini | grep date.timezone
Be sure to check out our Knowledgebase for helpful articles and solutions!
Iykmode
Posts: 29
Joined: Wed Sep 19, 2012 5:11 am

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

Post by Iykmode »

Thanks, this is the output I got:

; http://www.php.net/manual/en/datetime.c ... e.timezone
date.timezone = Europe/London
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post by scottwilkerson »

edit that file and change the following if you are in Africa/Lagos

Code: Select all

timezone=Africa/Lagos
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked