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.
Apply Config Failed
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Apply Config Failed
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.
Re: Apply Config Failed
I added the new field via mysql's web front end (phpmyadmin).
Re: Apply Config Failed
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
Re: Apply Config Failed
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
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.
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.
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Re: Apply Config Failed
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.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.
Former Nagios employee
Re: Apply Config Failed
Got it, thanks! You may close this topic.