NCONF + MySQL Cluster

Tell us how you use NConf, what environment you have, what challenges you face, what solutions you've implemented

NCONF + MySQL Cluster

Postby candymanuu » Fri Apr 11, 2014 14:06

Hi guys,

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:

Code: Select all
- host computer 1  --> mysql cluster + icinga with Nconf   
- host computer 2 --> mysql cluster + icinga with Nconf   

Both Icinga/Nconf hosts computers are monitoring the same hosts, same services, same everything. I did the mysql cluster to have a redundancy.

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.

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

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.
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 :D , 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.

Posts: 1
Joined: Thu Apr 10, 2014 20:31

Return to NConf in action

Who is online

Users browsing this forum: No registered users and 1 guest