Page 1 of 2
time correction for Nagios
Posted: Wed Jan 29, 2014 3:11 pm
by nanz28v
We have a successful installation of NagiosXI and all is running well except the system time is off by 5 hours. We are in EST and I don't know how to change it since I'm a Linux newbie and we are in evaluation to monitor windows servers only. Thank you in advance.
Re: time correction for Nagios
Posted: Wed Jan 29, 2014 3:19 pm
by abrist
Re: time correction for Nagios
Posted: Mon Feb 10, 2014 11:22 am
by nanz28v
Thank you I was able to change the system time. However this caused an error in IE after I signed in:
NSP: Sorry Dave, I can't let you do that
Please let me know how to resolve this issue, thank you.
Re: time correction for Nagios
Posted: Mon Feb 10, 2014 11:43 am
by abrist
Is the date/time/timezone correct on your workstation?
Can you post the time/date/zone information from your profile? (admin --> system profile --> copy the date information and paste it here)
Re: time correction for Nagios
Posted: Mon Feb 10, 2014 1:05 pm
by nanz28v
Date/Time
PHP Timezone: America/New_York
PHP Time: Mon, 10 Feb 2014 08:03:19 -0500
System Time: Mon, 10 Feb 2014 13:03:19 +0000
It looks like the PHP time and system does not match. I'm a Linux newbie, what command should I run on our Nagios server to fix the issue? Thank you.
Re: time correction for Nagios
Posted: Mon Feb 10, 2014 1:22 pm
by abrist
It looks like your system is not using the correct timezone from /usr/share/zoneinfo. I did notice a weird problem on certain centos systems. Is /etc/localtime a file or dir?
Re: time correction for Nagios
Posted: Mon Feb 10, 2014 1:37 pm
by nanz28v
[root@SM5NAG01 ~]# file /etc/localtime
/etc/localtime: symbolic link to `/usr/share/zoneinfo/America'
[root@SM5NAG01 ~]#
Re: time correction for Nagios
Posted: Mon Feb 10, 2014 1:44 pm
by sreinhardt
You will want to remove that symlink and recreate it to the file within America for new york. Should be something like.
Code: Select all
rm /etc/localtime
ln -s /usr/share/zoneinfo/America/New_York /etc/localtime
Re: time correction for Nagios
Posted: Mon Feb 10, 2014 1:56 pm
by nanz28v
I ran those 2 lines then the date command returned:
[root@SM5NAG01 ~]# rm /etc/localtime
rm: remove symbolic link `/etc/localtime'? y
[root@SM5NAG01 ~]# ln -s /usr/share/zoneinfo/America/New_York /etc/localtime
[root@SM5NAG01 ~]# date
Mon Feb 10 08:55:16 EST 2014
[root@SM5NAG01 ~]#
We are in EST at 1:56pm now. Is there anyway to fix this?
Re: time correction for Nagios
Posted: Mon Feb 10, 2014 1:59 pm
by abrist
Update the clock with ntp if you have internet connectivity: