Time stamp mismatch

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
cyient
Posts: 116
Joined: Thu May 08, 2014 4:45 am

Time stamp mismatch

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Time stamp mismatch

Post by abrist »

Is the PHP time and System time in sync? (Admin --> system profile)
Is the PHP timezone correct?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
cyient
Posts: 116
Joined: Thu May 08, 2014 4:45 am

Re: Time stamp mismatch

Post by cyient »

Yes they are correct.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Time stamp mismatch

Post by scottwilkerson »

Which log files? Could you show an example?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
cyient
Posts: 116
Joined: Thu May 08, 2014 4:45 am

Re: Time stamp mismatch

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

Re: Time stamp mismatch

Post by scottwilkerson »

How many hours before running these commands was the notification sent?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
cyient
Posts: 116
Joined: Thu May 08, 2014 4:45 am

Re: Time stamp mismatch

Post by cyient »

There is no time difference.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Time stamp mismatch

Post 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.
cyient
Posts: 116
Joined: Thu May 08, 2014 4:45 am

Re: Time stamp mismatch

Post 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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Time stamp mismatch

Post 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?
Locked