Unable to apply configuration

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Unable to apply configuration

Post 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/
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
smapple
Posts: 81
Joined: Fri Apr 08, 2016 11:43 pm

Re: Unable to apply configuration

Post by smapple »

THank you this worked.
I am still not sure what was changed ? Why was I getting that error suddenly?
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Unable to apply configuration

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
smapple
Posts: 81
Joined: Fri Apr 08, 2016 11:43 pm

Re: Unable to apply configuration

Post by smapple »

Thanks!
Locked