Hello
When we try to Apply Configiuration it fails saying there are 0 services, and it restores the config.
When doing a Delete Files, Write Configs, Verify Files no services are written to /usr/local/nagios/etc/services/
Doing a Verify Config on the good config shows plenty of services (ignore the censored warnings, they're not the issue and contain customer names)
A "Delete All Hosts/Services Configuration Files" and then "Write Configs" works without errors.
Then running "Verify Config" shows 0 services.
Looking at the CCM it shows services (there are some disabled, but only a few).
So we're currently unable to make changes through the interface, and I'm holding off putting new changes into static.
We have recenty migrated the server from CentOS 6 to 7, and this is XI v 5.2.0 so we were going to upgrade, but this is holding us back.
Thanks
Apply Configuration wipes out services.
Apply Configuration wipes out services.
You do not have the required permissions to view the files attached to this post.
Re: Apply Configuration wipes out services.
I've solved the problem, it was a setting in the MySQL config.
I ran the SQL used for exporting the CCM Services config from the database, and saw it was giving an error
I googled "this is incompatible with sql_mode=only_full_group_by" and it relates to a strict mysql setting
So, I've added the following to the /etc/my.cnf file (I did fully test my test VM clone instance)
And it works.
I ran the SQL used for exporting the CCM Services config from the database, and saw it was giving an error
Code: Select all
mysql> SELECT `id`, `config_name` FROM (SELECT `id`, `config_name`, `last_modified` FROM `tbl_service` WHERE `config_id` = '1' AND `active`='1' ORDER BY `last_modified` DESC) as `X` GROUP BY HEX(`config_name`);
ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'X.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_bySo, I've added the following to the /etc/my.cnf file (I did fully test my test VM clone instance)
Code: Select all
sql_mode="ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"Re: Apply Configuration wipes out services.
Hi
Glad you were able to get it working. We actually have people set it as:
This is documented in:
https://support.nagios.com/kb/article/n ... n-822.html
I am going to lock this but please feel free to reopen it.
Thanks
Glad you were able to get it working. We actually have people set it as:
Code: Select all
[mysqld]
sql_mode=""https://support.nagios.com/kb/article/n ... n-822.html
I am going to lock this but please feel free to reopen it.
Thanks