Page 1 of 1

Different timings reflected in Nagios XI and Nagios core

Posted: Wed Jul 27, 2016 7:20 am
by RIDS_I2MP
Hi Team,

We are using Nagios XI 2014R2.7 in our project, we have four Nagios servers for one of the server we are facing timing issue.

Different time is reflecting in Nagios core and Nagios XI, there is a difference of an hour between both the timings kindly refer the highlighted part in the attached snapshot:

kindly suggest.

Re: Different timings reflected in Nagios XI and Nagios core

Posted: Wed Jul 27, 2016 9:22 am
by bwallace
Can you post the output of the following commands? Want to check that system time, php timezone and mysql all align...

Code: Select all

date

grep "date.timezone" /etc/php.ini

ls -l /etc/localtime

php -r 'echo date("D M j G:i:s T Y")."\n";'

mysql -uroot -pnagiosxi -e "SELECT NOW();"

mysql -uroot -pnagiosxi -e "SELECT @@global.time_zone;"

Re: Different timings reflected in Nagios XI and Nagios core

Posted: Thu Jul 28, 2016 6:26 am
by RIDS_I2MP
Hi Team,

Please find the attached snapshot:
date.PNG

Re: Different timings reflected in Nagios XI and Nagios core

Posted: Thu Jul 28, 2016 9:27 am
by bwallace
Thanks -
Your php time is 1 hour ahead of the mysql time. All you need to do is get the php time to align with the rest by editing /etc/php.ini and this doc has a section on it:
https://assets.nagios.com/downloads/nag ... m_Time.pdf

Re: Different timings reflected in Nagios XI and Nagios core

Posted: Fri Jul 29, 2016 3:38 am
by RIDS_I2MP
Hi Team,

Kindly refer the attached snapshot, I have provided the snapshot of reference server as well on which the time reflected is correct:
Defected server.PNG
Reference server.PNG
As the result of comparison between defected server timings and reference server timings below are my finding:

1. In the defected server php timing is the correct timing.
2. We need to change MySQL timing as its 1hr behind the php time(actual time).

Kindly suggest your views on this.

Re: Different timings reflected in Nagios XI and Nagios core

Posted: Fri Jul 29, 2016 10:25 am
by lmiltchev
Did you follow the instructions in our documentation?
https://assets.nagios.com/downloads/nag ... m_Time.pdf

Code: Select all

rm /etc/localtime
cp /usr/share/zoneinfo/Europe/London /etc/localtime
When you run:

Code: Select all

ls -l /etc/localtime
the output is:

Code: Select all

/etc/localtime -> /usr/share/zoneinfo/
at least, this is what it is on the screenshot... It could be "cut off".

However, the output should be:

Code: Select all

/etc/localtime -> /usr/share/zoneinfo/Europe/London
What is the output of the following command?

Code: Select all

cat /etc/sysconfig/clock
BTW, I have seen cases when the system and php time would not sync before the server is rebooted. Have you tried rebooting the Nagios XI server?

Re: Different timings reflected in Nagios XI and Nagios core

Posted: Thu Aug 04, 2016 1:29 am
by RIDS_I2MP
Thanks Team,

We corrected the system time and rebooted the server, now all the timings are align to actual timing.

Re: Different timings reflected in Nagios XI and Nagios core

Posted: Thu Aug 04, 2016 9:08 am
by mcapra
Awesome! Is it alright if we lock this thread and mark the issue as resolved?