Page 1 of 1

Apply Config Failed

Posted: Thu May 28, 2015 8:53 pm
by briannd81
Apply Configuration in CCM threw these errors:

Error: Invalid host object directive 'branch_id'.
Error: Could not add object property in file '/usr/local/nagios/etc/hosts/p160042m.cfg' on line 33.

It has something to do with the "branch_id" field we created for table "tbl_host" under database "nagiosql".

Please advise.

Re: Apply Config Failed

Posted: Thu May 28, 2015 9:04 pm
by Box293
How did you go about adding the branch_id field to the database?

Re: Apply Config Failed

Posted: Fri May 29, 2015 7:29 am
by briannd81
I added the new field via mysql's web front end (phpmyadmin).

Re: Apply Config Failed

Posted: Fri May 29, 2015 9:06 am
by tmcdonald
We can't offer support for modifications that were made outside of our normal channels. If you have changed the database structure then any errors that result from that change will need to be handled by you. I would recommend removing that field.

Re: Apply Config Failed

Posted: Fri May 29, 2015 9:53 am
by briannd81
Understood. Is there a way to tell Nagios Apply Config to ignore the new field added? I did not modify anything else on tbl_host other than added a new field.

Re: Apply Config Failed

Posted: Fri May 29, 2015 11:04 am
by eloyd
It sounds like you might be trying to SCM your Nagios configurations. You can do that, but you don't want to use the Nagios database to store it. You're better off extracting somewhere, creating valid config files, and pushing them to the XI import directory to pull stuff into XI. Details on that step are available at https://assets.nagios.com/downloads/nag ... gement.pdf

I may be missing what you're trying to do, but it's easier to create config files and import them than it is to link a database to a source code/configuration management repository directly.

Re: Apply Config Failed

Posted: Fri May 29, 2015 11:26 am
by tmcdonald
briannd81 wrote:Understood. Is there a way to tell Nagios Apply Config to ignore the new field added? I did not modify anything else on tbl_host other than added a new field.
Other components of XI rely on a certain structure in the databases, such as our backup and repair scripts. Making such a change to accommodate an extra field would likely not be just a few lines changed. This would be custom development and is something you would need to speak to our Sales team about.

Re: Apply Config Failed

Posted: Fri May 29, 2015 6:17 pm
by briannd81
Got it, thanks! You may close this topic.