Nagios eventlog and hosts/service status shows one hour less


#1

Hello, all!

I’ve been trying for two days to find a solution to the following problem in both Google and this forum but without finding a fix to the problem. Nagios eventlog and hosts/service status shows one hour less than the operating system.

OS: Centos 5.3 x86_64
Nagios: Nagios® 3.1.2

The operating system clock and localtime are configured as follows:

[nagios@espmicpdnag01 ~]$ cat /etc/sysconfig/clock
ZONE="Europe/Madrid"
UTC=true
ARC=false

And date/time is synchronize to Spanish time:
[nagios@espmicpdnag01 ~]$ date
Wed Feb 2 12:08:44 CET 2011

Nagios shows in screen one hour less:
Tablespace - RCORED OK 02-02-2011 11:10:35 0d 0h 33m 39s 1/2 REBOST1 : RCORED OK - 60.80% used 1207 / 3072 MB available ]
Tablespace - RXD OK 02-02-2011 11:10:33 0d 0h 29m 0s 1/2 REBOST1 : RXD OK - 96.90% used 1263 / 39936 MB available ]

But in nagios.log the time appears to be the correct one:
[nagios@espmicpdnag01 ~]$ tail /usr/local/nagios/var/nagios.log
[1296645182] SERVICE ALERT: BDPMICPDPOR01;Tablespace - RRX;OK;SOFT;2;PORPROD : RRX OK - % used / MB available ]

I’m using a perl script that converts Nagios time
[root@espmicpdnag01 ~]# /root/epochtime.pl 1296645182
2011/02/02 12:13:02

What I found to solve the issue was to configure the TimeZone in nagios.cfg and in Apache following this link:
nagios.sourceforge.net/docs/nagios-3.pdf (pages 76 and 77)
I both changed Apache and Nagios and restarted services, but unfortunately did not worked. Any idea to continue looking to where this time difference is configured?

Thank you,
Carlos