Different timings reflected in Nagios XI and Nagios core

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Different timings reflected in Nagios XI and Nagios core

Post 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.
You do not have the required permissions to view the files attached to this post.
Thanks & Regards,
I2MP Team.
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: Different timings reflected in Nagios XI and Nagios core

Post 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;"
Be sure to check out the Knowledgebase for helpful articles and solutions!
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: Different timings reflected in Nagios XI and Nagios core

Post by RIDS_I2MP »

Hi Team,

Please find the attached snapshot:
date.PNG
You do not have the required permissions to view the files attached to this post.
Thanks & Regards,
I2MP Team.
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: Different timings reflected in Nagios XI and Nagios core

Post 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
Be sure to check out the Knowledgebase for helpful articles and solutions!
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: Different timings reflected in Nagios XI and Nagios core

Post 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.
You do not have the required permissions to view the files attached to this post.
Thanks & Regards,
I2MP Team.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Different timings reflected in Nagios XI and Nagios core

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: Different timings reflected in Nagios XI and Nagios core

Post by RIDS_I2MP »

Thanks Team,

We corrected the system time and rebooted the server, now all the timings are align to actual timing.
Thanks & Regards,
I2MP Team.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Different timings reflected in Nagios XI and Nagios core

Post by mcapra »

Awesome! Is it alright if we lock this thread and mark the issue as resolved?
Former Nagios employee
https://www.mcapra.com/
Locked