Service Status: duration is always one hour more

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
migueltricas
Posts: 6
Joined: Mon Aug 29, 2011 7:12 am

Service Status: duration is always one hour more

Post by migueltricas »

Hello everybody. I am new here, sorry for my bad english.
I have a problem with my nagios xi installation (Nagios XI 2011R1.6):
The "Duration" in the service status and host status has always one hour more. The hour in "Last Check" date is correct, however the duration is incorrect. The date in the linux server (Red Hat Enterprise Linux Server release 5.5) is ok too.

For example, is the last check of the PING service of some host is "29/08/2011 13:24:25", that is, the actual hour, and the service check returns a new CRITICAL state, the duration will be "1h 2m 6s", and it should be "2m 6s".

What could be happening?? Thanks.
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Service Status: duration is always one hour more

Post by nscott »

It could be due to improper date set on your machine or improper timezone. Make sure the date is set properly on your linux server and that you php.ini reflects proper timezone settings.
Nicholas Scott
Former Nagios employee
migueltricas
Posts: 6
Joined: Mon Aug 29, 2011 7:12 am

Re: Service Status: duration is always one hour more

Post by migueltricas »

The date on the linux server is correct. The result of the date command in the linux server is:

[root@localhost etc]# date
mar ago 30 07:40:18 WEST 2011


that is the correct date.

In the php.ini file, the date.timezone variable is empty:

[Date]
; Defines the default timezone used by the date functions
;date.timezone =
migueltricas
Posts: 6
Joined: Mon Aug 29, 2011 7:12 am

Re: Service Status: duration is always one hour more

Post by migueltricas »

Other information that could be useful: when a clic in a service, and i go to the "Advanced" tab and clic on "See this service in Nagios Core", the "Duration" column is correct.
migueltricas
Posts: 6
Joined: Mon Aug 29, 2011 7:12 am

Re: Service Status: duration is always one hour more

Post by migueltricas »

ERROR SOLVED.
I fix the error by configuring the date.timezone variable in the php.ini file and restarting the apache server.
Thank you all for help.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Service Status: duration is always one hour more

Post by lmiltchev »

Great! Thanks for the feedback!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked