Page 1 of 1
Query on Config import
Posted: Tue Oct 02, 2018 10:52 am
by bomahony
Hey folks
I am deploying XI as I wrk on it, via converted configs. Everything only gets imported once, regardless of how many times I run the import, with the exception of services. If I import "app-services-dns.cfg" and then accidentally import it a second time it fills the service cfg with a second copy of each service.
Is this intended?
Re: Query on Config import
Posted: Tue Oct 02, 2018 12:09 pm
by benjaminsmith
Hi,
No this not intended, and when you verify the configuration (Tools > Config File Management ) it will report a duplication warning for that service.
Are you migrating from Nagios Core to XI? If so, we have a config file prep tool to run before importing files into XI.
1. Documenation for the config file prep tool is available on our knowledgebase:
https://assets.nagios.com/downloads/nag ... p-Tool.pdf
Once this complete follow the instructions for import into XI:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Import configuration files in the following order: command, hostgroup, host and service
In the event that you apply configuration and it fails, Nagios XI will revert to a previous known good Configuration Snapshot.
Re: Query on Config import
Posted: Thu Oct 04, 2018 10:00 am
by bomahony
Actually we are building a repeatable procedure via ansible, which I guess is completely unsupported. Push the cfg files to the import directory, run the import. We are building the environment and the monitoring is going through multiple iterations as we flesh it out.
Re-importing all the cfg files works fine, in the fact that everything just stays the way it is, with the exception of our services. We have the services split out into config files per hostgroup. However if I say add a new check to the file, it still re-imports the other checks a ceond time.
EG if I have "Check Disks" in app-services-generic.cfg and I import again it will have two Services called "Check Disks" both being active and applied, just with different IDs. Although if a host is associated with that host group, the checks only appear once on the status page.
There is no failure on the import
Re: Query on Config import
Posted: Thu Oct 04, 2018 1:34 pm
by lmiltchev
The problem is caused by the way objects are currently imported. When updating a service via the import process, only two things are checked (matched) - the
host_name and the
service_description. If the service is added to a hostgroup only ("hostgroup_name" in the config), then the service is NOT updated, but a new object is created instead. A similar issue exists when updating services via the REST API. See this:
https://support.nagios.com/forum/viewto ... 16&t=49896
We have an internal feature request on file for improving this functionality (task_id=13605). It will be implemented in Nagios XI 5.6.
Re: Query on Config import
Posted: Fri Oct 05, 2018 6:21 am
by bomahony
Good to know!
I see from the roadmap that 5.6 is due Q4. I have work arounds for now anyway, so thanks for the info.
Re: Query on Config import
Posted: Fri Oct 05, 2018 9:07 am
by lmiltchev
You are welcome! I will be closing this topic now. If you have any further questions, please start a new thread.