Apply Config Failed

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
briannd81
Posts: 31
Joined: Sun May 03, 2015 5:41 pm

Apply Config Failed

Post 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.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Apply Config Failed

Post by Box293 »

How did you go about adding the branch_id field to the database?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
briannd81
Posts: 31
Joined: Sun May 03, 2015 5:41 pm

Re: Apply Config Failed

Post by briannd81 »

I added the new field via mysql's web front end (phpmyadmin).
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Apply Config Failed

Post 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.
Former Nagios employee
briannd81
Posts: 31
Joined: Sun May 03, 2015 5:41 pm

Re: Apply Config Failed

Post 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.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Apply Config Failed

Post 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.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Apply Config Failed

Post 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.
Former Nagios employee
briannd81
Posts: 31
Joined: Sun May 03, 2015 5:41 pm

Re: Apply Config Failed

Post by briannd81 »

Got it, thanks! You may close this topic.
Locked