Page 1 of 1

config file out of sync / date

Posted: Wed Dec 07, 2011 10:08 am
by LinedataIT
Hi, I have a relatively new install of nagios. It was a R1.5 VM download that I have upgraded to the latest.
I have created some new host groups, but on the Host Group page within the Core Config mgr I see 'Warning: configuration file is out of date!"
Similarly, on the Services and Hosts sections, everything I have created is 'Out of Sync'.

I saw previous posts about setting the timezone in the php.ini file, as well as setting up ntp. I have done both of those, but it has not resolved the problem.

Any ideas? Attached some screenshots. Note, this server is in Singapore.

Thanks.

Re: config file out of sync / date

Posted: Wed Dec 07, 2011 10:28 am
by mguthrie
Are you able to "Apply Configuration" successfully? When changes are made in the Core Config Manager, they will also by "out of sync" until "Apply Configuration" successfully completes. Out of sync means that configurations that have been updated in the database have not yet been written to file.

Re: config file out of sync / date

Posted: Wed Dec 07, 2011 11:00 am
by LinedataIT
Yes, I was applying the configuration, and it was returning a success.
Also, under Tools -> Write Config Files, I was able to click the first 3 GO buttons with no errors.

OK, now another odd thing. I have added a few more hosts and services today via the wizard. All the ones I added yesterday are now synced, but only the ones I have added today are now 'Out of Sync'.

Re: config file out of sync / date

Posted: Wed Dec 07, 2011 1:35 pm
by lmiltchev
Make sure your system time is up to date. See this:

http://support.nagios.com/wiki/index.ph ... e.22_Error

You can install ntp:

Code: Select all

# yum install ntp
# ntpdate pool.ntp.org
You can add it as a cron job (for example, if you want to update system
time every day at 1:30 pm, you would do):

Code: Select all

# crontab -e

30 13 * * * /usr/sbin/ntpdate pool.ntp.org
However, if your console is reporting proper time, most probably you
will have to do only one more thing to get this working. You will have
to edit your php.ini file.

Go to terminal and type:

Code: Select all

# vi /etc/php.ini
Find the line that says:

Code: Select all

date.timezone =
Enter your time zone, for example:

Code: Select all

date.timezone = Etc/GMT-13
I believe you can also you this format:

Code: Select all

date.timezone = America/Chicago
Check this out:

http://www.php.net/manual/en/timezones.america.php

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/America/New_York /etc/localtime
*Important!*

You must restart your apache in order for changes to take effect:

Code: Select all

# service httpd restart
Hope this helps.