Page 1 of 1

Import from core to XI

Posted: Thu Dec 22, 2022 2:36 pm
by kbauma01
I'm new to NagiosXI. I've imported my config files (Commands-->Time Periods-->Contact Templates-->Contacts-->Contact Groups-->Host Templates-->Hosts).

I brought in 2 servers to start with and when I try to delete them via the XI GUI I get this:
Host Deletion Error
Host cannot be deleted using this method

So went to CCM and deleted them from there but when I do that I see

An error occurred while attempting to apply your configuration to Nagios Core. Monitoring engine configuration files have been rolled back to their last known good checkpoint.

<div>Error: There are no services defined!</div><div>Error: There are no hosts defined!</div>

Re: Import from core to XI

Posted: Mon Dec 26, 2022 9:18 pm
by gormank
Did you import services?

viewtopic.php?t=40123&p=195610

My notes (which shouldn't be trusted) say to import in the following order.
commands.cfg
timeperiods.cfg
contacttemplates.cfg
contacts.cfg
contactgroups.cfg
hosttemplates.cfg
hosts.cfg
hostgroups.cfg
servicetemplates.cfg
services.cfg
servicegroups.cfg

copy commands.cfg to /usr/local/nagios/etc/import/
cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.sh
Continue with timeperiods.cfg, and run the reconfigure script. Repeat until all files are imported.