I have managed to make NConf + Icinga (classic) work with MySQL Cluster. That took some hard work to get it done, but I did it.
Just to give you an overview of my configuration:
Both Icinga/Nconf hosts computers are monitoring the same hosts, same services, same everything. I did the mysql cluster to have a redundancy.
Code: Select all
- host computer 1 --> mysql cluster + icinga with Nconf - host computer 2 --> mysql cluster + icinga with Nconf
Now, for me to manage this, I had to make some adjustments, and I have to ask you what are the possible problems that I'm facing.
To be more specific:
Nconf stores the information in a MySQL database called "nconf". All the tables inside the "nconf" database have InnoDB ENGINE and they have some Constraints with Foreign Keys.
The problem is that MySQL Cluster works with NDB ENGINE, not with InnoDB. I cannot convert InnoDB --> NDB ENGINE because of the Constraints. Therefore, I had to drop all Constraint and after that, convert database from InnoDB --> NDB.
Code: Select all
| ConfigItems | CREATE TABLE `ConfigItems` ( `id_item` int(10) unsigned NOT NULL AUTO_INCREMENT, `fk_id_class` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id_item`), KEY `fk_id_class` (`fk_id_class`) USING BTREE, CONSTRAINT `ConfigItems_ibfk_1` FOREIGN KEY (`fk_id_class`) REFERENCES `ConfigClasses` (`id_class`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=5856 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT |
After the conversion, I tried to add the constraints back but I am unable, I get an error saying that it cannot be done.
I am currently using NConf with MySQL Cluster ( NDB Engine) but without the Constraints. All tabels from NCONF database had the Constraints dropped so they could be converted to NDB ENGINE.
My question to you is:
- What is the downside of having NCONF database without the Constraints? I know that you put them there for a reason , but I cannot figure out what that is.
Can you please give an example like this: Running NCONF with the database without it's constraints will probably cause this/that errors/duplicates/corrupt data.