Page 2 of 2

Re: Unable to apply configuration

Posted: Thu Dec 27, 2018 3:38 pm
by npolovenko
@smapple, Please run the following command to fix the corrupted table in the database:
echo 'repair table nagios_logentries use_frm;' | mysql -t -u root -pnagiosxi nagios
mysqlcheck -r -f -uroot -pnagiosxi --all-databases
Also, please set the timezone in the /etc/php.ini to avoid these warnings:
It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function
Finally, please remove all files from this folder:
/usr/local/nagios/etc/import/

Re: Unable to apply configuration

Posted: Thu Dec 27, 2018 3:48 pm
by smapple
THank you this worked.
I am still not sure what was changed ? Why was I getting that error suddenly?

Re: Unable to apply configuration

Posted: Thu Dec 27, 2018 4:11 pm
by npolovenko
@smapple, I think the main issue was the datacollection.apple.com.cfg config in the imports folder. Somehow it already got imported in the past or you had a host with the same name in the XI. So this was preventing CCM configuration from getting successfully applied.
- Importing: /usr/local/nagios/etc/import/datacollection.apple.com.cfg .. ERROR
Duplicate entry '1' for key 'config_name'Entry host_name:: inside tbl_host could not be inserted: Duplicate entry '1' for key 'config_name'<br>
Let me know if we're good to lock this thread as resolved.

Re: Unable to apply configuration

Posted: Mon Jan 07, 2019 5:06 pm
by smapple
Thanks!