Page 1 of 1

Help on host group relationship

Posted: Fri Nov 13, 2015 11:11 am
by Francesco
Hi team,
we've imported an old nagios core 3.x configuration in Nagios XI using these steps:

1) read hostxxx.cfg from nagios core and replicate the information in the new machine.cfg
example: cat xxxxxxxxx.cfg

define service {
use tm-s1-service
service_description DISK USAGE
display_name check_aix_disk_all
check_command check_aix_disk_all
host_name xxxxxxxxx
hostgroups os-aix,!tm-test
register 1
}

2) in Nagios XI under /usr/local/nagios/etc/hosts/xxxxxxxxx.cfg I found

define host {
host_name xxxxxxxxx
use aix
address xxx.xxx.xxx.xxx
hostgroups os-aix,tm-prod
register 1
}
As you can see the hostgroups is wrong
Opening the interface I found: (view xxxxxxxxx.jpg)

The question is:

Why the configuration created by the import procedure is wrong and how we can understand (view image)
"=>" Denotes object relationship elsewhere - where is "elsewere??"

Second question:
is there a correct procedure to import again only the hostgroups reassigning them to the hosts in NaiosXI overwriting the wrong informations in the database?

Thanks very much for your help

Re: Help on host group relationship

Posted: Fri Nov 13, 2015 2:18 pm
by lmiltchev
Please, review the three documents under the "Migrating From Nagios Core" section in the Admin Guide:

https://assets.nagios.com/downloads/nag ... ngfromcore

This would be the correct import procedure. If you are absolutely sure that your config is correct, you could place it in the "/usr/local/nagios/etc/import/" directory and run "reconfigure_nagios.sh":

Code: Select all

cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.sh
I would like to point out that hostgroups exclusions, i.e. "hostgroups os-aix,!tm-test" would not be imported properly (and would not work in XI), unless you manage these configs manually by placing them in the "static" directory.

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Hope this helps.

Re: Help on host group relationship

Posted: Fri Dec 04, 2015 12:09 pm
by Francesco
Hi,
We have solved removing and re-inserting the incorrect host group.
Thank you
Francesco

Re: Help on host group relationship

Posted: Fri Dec 04, 2015 12:40 pm
by bwallace
Thanks for that update and glad to hear this is resolved. We'll lock this thread now and feel free to open another should you require assistance with anything else.