Page 1 of 2
Date/Time issue
Posted: Fri Jun 01, 2012 4:56 am
by fpernet
Hi All,
My config: Nagios XI 2011R2.4 running on an vm CentOS Linux release 6.0 (Final) 32 bits.
My problem: Date and time is correct in Nagios XI parts but not in the Nagios core i think (the services/hosts last checks, or notification times, etc ...) date is 3 months and a half in the past...
I am ntp synchronized correctly (so system time is fine).
I fixed the timezone in nagios.cfg to Europe/Zurich, also in the php.ini / apache config as explained is some threads.
Nagios XI System Profile reports correct date/time.
I also tried to restart the vm but no change.
Do you have any idea where i can try to play in order to fix this issue ...
Many thanks in advance
Re: Date/Time issue
Posted: Fri Jun 01, 2012 10:06 am
by lmiltchev
I fixed the timezone in nagios.cfg to Europe/Zurich...
I am not sure about this one... Can you show us how exactly did you modify the "nagios.cfg" file?
I am not sure if you've tried this but some customers reported success by copying the sample timezone to /etc/localtime.
There are some samples in /usr/share/zoneinfo/.
For example:
Code: Select all
# cp /usr/share/zoneinfo/Europe/Zurich /etc/localtime
Re: Date/Time issue
Posted: Sat Jun 02, 2012 3:36 am
by fpernet
Thanks for your answer ...
Here is the part of my nagios.cg
Code: Select all
[root@idnagios ~]# cat /usr/local/nagios/etc/nagios.cfg
...
use_timezone=Europe/Zurich
Yes i did copy the timezoneinfo as you mentionned...
Code: Select all
[root@idnagios ~]# cat /etc/sysconfig/clock
ZONE="Europe/Zurich"
[root@idnagios ~]# diff /etc/localtime /usr/share/zoneinfo/Europe/Zurich
[root@idnagios ~]#
[root@idnagios ~]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*our reference xxx.xxx.xx.xx 3 u 258 1024 377 3.060 0.401 0.069
You have mail in /var/spool/mail/root
[root@idnagios ~]# date
Sat Jun 2 10:32:45 CEST 2012
As I said the system time is correct, also the time in the Nagios XI screens... only in the nagios core, the time is 3 months behind. I also checked the timestamps in the nagios.log and they are correct.
Under Nagios XI, the time is wrong in the last checks columns (look at the attachment), the event log or the notifications screens ...
The Performance Graphs are corrects - If i reconfigure a host/service, it runs ok (nagios can restart correctly, no issue in the config files) ...
Another idea would be to clear all datas in order to get rid of any outdated datas then restart with fresh records ...
Do you have any idea where i can take a look (some logs, in order) in order to find the problem ?
Thnak you in advance, I appreciate your help ...
Re: Date/Time issue
Posted: Mon Jun 04, 2012 12:21 pm
by scottwilkerson
Can you select one of these, click the advanced tab and show the:
Last Check: 2012-06-04 12:19:05
Next Check: 2012-06-04 12:24:05
Also, can you post your Admin -> System Profile
Thanks
Re: Date/Time issue
Posted: Tue Jun 05, 2012 1:37 am
by fpernet
Thanks for your help ...
Find attached the "Advanced Tab" screenshot (but of course with the wrong date/time, this is my problem).
Find also here attached, the system profile text file.
Thx
Re: Date/Time issue
Posted: Tue Jun 05, 2012 12:21 pm
by lmiltchev
Have you changed the "default user settings" (Admin->System Config->Manage System Config) ?
time.PNG
Re: Date/Time issue
Posted: Wed Jun 06, 2012 2:02 am
by fpernet
Yes I did but after the problem occured ..
My settings ...
Capture.PNG
Re: Date/Time issue
Posted: Tue Jun 12, 2012 6:08 am
by fpernet
no more ideas ? is there any check i can do to verify which part is running and which is not ?
Re: Date/Time issue
Posted: Tue Jun 12, 2012 9:53 am
by lmiltchev
Make sure there is no mismatch between date/time settings in these two places:
1. Admin->System Config->Manage System Config
2. Configure->More Options->My Account Settings->Account Preferences
Do you have an issue with this host only (
www.idsa.ch) or you are having "time" issues with all of your hosts?
Re: Date/Time issue
Posted: Mon Jun 25, 2012 9:16 am
by fpernet
Finally the upgrade to the version 2011R3.1 solved the problem.
I had a lot of troubles during this update (Nagios didn't want to start during updates, after the ndo2db upgrade, then the upgrade script failed).
Then I finally stopped all services (inlcuding DBs, snmptt, snmptrad, npcd, nd02db) and ran the upgrade script. Then start each service, one after the other, and ran the upgrade script again each time ... (
I know this procedure is very strange ...
)
Then the script went correctly at the end
Timestamps are all correct now ...