Page 1 of 2

Time stamp mismatch

Posted: Wed Jun 04, 2014 7:21 am
by cyient
Hi,

Earlier i had a problem with system time mismatch and it was resolved but know i find there is difference in time stamped in log files regarding the last check or notification and system time.

But in the alert time stamping is correct.

Please help me on this.

Re: Time stamp mismatch

Posted: Wed Jun 04, 2014 1:22 pm
by abrist
Is the PHP time and System time in sync? (Admin --> system profile)
Is the PHP timezone correct?

Re: Time stamp mismatch

Posted: Thu Jun 05, 2014 5:38 am
by cyient
Yes they are correct.

Re: Time stamp mismatch

Posted: Thu Jun 05, 2014 8:16 am
by scottwilkerson
Which log files? Could you show an example?

Re: Time stamp mismatch

Posted: Fri Jun 06, 2014 12:42 am
by cyient
This is the log file /var/log/messages

below is the sample output

Code: Select all

[root@NAGIOSXI-64 ~]# tail -3 /var/log/messages
Jun  6 05:38:17 NAGIOSXI-64 nagios: SERVICE NOTIFICATION: nt6306;172.17.1.69;Memory Usage;WARNING;xi_service_notification_handler;Memory usage: total:39606.21 Mb - used: 31901.28 Mb (81%) - free: 7704.94 Mb (19%)
Jun  6 05:38:17 NAGIOSXI-64 nagios: SERVICE ALERT: infhydsp1.example.com;CPU Usage;OK;SOFT;2;CPU Load 29% (5 min average)
Jun  6 05:38:17 NAGIOSXI-64 nagios: SERVICE ALERT: 172.17.1.47;IIS Web Server;OK;SOFT;2;W3SVC: Started
[root@NAGIOSXI-64 ~]# date
Fri Jun  6 11:08:48 IST 2014
[root@NAGIOSXI-64 ~]#
As you are bale to see the time mentioned in the log is different from the system time

Re: Time stamp mismatch

Posted: Fri Jun 06, 2014 9:41 am
by scottwilkerson
How many hours before running these commands was the notification sent?

Re: Time stamp mismatch

Posted: Sat Jun 07, 2014 1:02 am
by cyient
There is no time difference.

Re: Time stamp mismatch

Posted: Mon Jun 09, 2014 9:29 am
by slansing
What time does it currently show you at:

http://addr.of.xi.server/nagios/
-----> Services (look in the top left at last updated)
---------->"Service Name" (next scheduled check)

Do either of these times coincide with what you are seeing in the logs? It's possible, that if you did a major time jump you may need to stop nagios and remove the retention.dat file and then start nagios again.

Re: Time stamp mismatch

Posted: Tue Jun 10, 2014 12:48 am
by cyient
slansing wrote:What time does it currently show you at:

http://addr.of.xi.server/nagios/
-----> Services (look in the top left at last updated)
---------->"Service Name" (next scheduled check)

Do either of these times coincide with what you are seeing in the logs? It's possible, that if you did a major time jump you may need to stop nagios and remove the retention.dat file and then start nagios again.

There is difference between time, under -----> Services (look in the top left at last updated) and ---------->"Service Name" (next scheduled check). I have stopped nagios removed retention.dat file and started nagios. But still its the same problem.

Re: Time stamp mismatch

Posted: Tue Jun 10, 2014 1:28 pm
by slansing
No, I understand there will be a time difference there, because it is going to show you the next scheduled check...which will be in the future. What I was asking was how does this time stack up against what is being shown in the nagios log? Is the next scheduled time in the web interface in the correct timezone?