Page 1 of 1

Service Status: duration is always one hour more

Posted: Mon Aug 29, 2011 7:30 am
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.

Re: Service Status: duration is always one hour more

Posted: Mon Aug 29, 2011 10:41 am
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.

Re: Service Status: duration is always one hour more

Posted: Tue Aug 30, 2011 1:43 am
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 =

Re: Service Status: duration is always one hour more

Posted: Tue Aug 30, 2011 2:04 am
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.

Re: Service Status: duration is always one hour more

Posted: Tue Aug 30, 2011 2:30 am
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.

Re: Service Status: duration is always one hour more

Posted: Tue Aug 30, 2011 10:30 am
by lmiltchev
Great! Thanks for the feedback!