Importing hostgroug with same names and concatenate them

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
sigmainformatique
Posts: 74
Joined: Mon Apr 23, 2018 8:11 am

Importing hostgroug with same names and concatenate them

Post 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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Importing hostgroug with same names and concatenate them

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
sigmainformatique
Posts: 74
Joined: Mon Apr 23, 2018 8:11 am

Re: Importing hostgroug with same names and concatenate them

Post 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
Locked