Page 1 of 1

Importing hostgroug with same names and concatenate them

Posted: Wed Nov 28, 2018 12:15 pm
by sigmainformatique
Hi Nagios XI Team,

I am migrating all my config from my olds Nagios into my brand new Nagios XI.

AsI have a lot of nagios collectors (10!) : a lot of hostgroups exist with the same name, and have the same function through the collectors.

When I import them, last hostgroup import erase all (ie contains only hosts from last import).

Do you know is there is a way to import hostgroups and concatenate them?

Thank you
Guillaume

Re: Importing hostgroug with same names and concatenate them

Posted: Wed Nov 28, 2018 5:24 pm
by lmiltchev
There is no way to "concatenate" them, but can't you "prep" the config before importing it by adding all of the hosts (combined members) to your hostgroup?

Let's say you had two hostgroups in two different Nagios Core instances, named the same - "My HG". The first HG had one member - Host1, and the second one had 2 members - Host2, and Host3. You could combine them:

Code: Select all

define hostgroup {
    hostgroup_name    My HG
    alias             My Host Group
    members           Host1,Host2,Host3...
}
then import the file.

Is this what you are looking for or I misunderstood your question?

Re: Importing hostgroug with same names and concatenate them

Posted: Mon Dec 03, 2018 12:02 pm
by sigmainformatique
Thank you! I will make a script that concatenate hostgroups and servicegroups.

I think this feature would be a good idea for future releases, as lot of customers have distributed supervisions.

You can close thise.
Regards