Page 1 of 1

Duplicate hosts importing when using bulk import tool

Posted: Thu Nov 09, 2017 10:04 am
by JGCG
Hi,

We're experimenting migrating from Nagios Core 3.2 to Nagios XI where we currently have a substantial number of hosts and service checks.

We're only intersted in importing the actual hosts and the service checks, then we'll manually go through each one to change/update/group them etc.

I've copied the hosts configuration files from Core and ran the prep tool which has succesfully added them all into Nagios XI. Great!
Now, when I try to import the service check files, to assign the checks to the already imported hosts, it is duplicating every host.
I've checked that the configs we're importing have no "define host {" definitions.
It is only doing this when importing the _multiple_hosts.cfg service file.

Is it possible to do it this way? Mass importing all the hosts and then it's service checks?

Also, could I ask how do I get access to post in the customer support forum.
We have purchased Nagios XI, but do not believe my account is linked?

Thanks.
JG.

Re: Duplicate hosts importing when using bulk import tool

Posted: Thu Nov 09, 2017 12:42 pm
by npolovenko
Hello, @JGCG.
Also, could I ask how do I get access to post in the customer support forum.
We have purchased Nagios XI, but do not believe my account is linked?
Please email to [email protected] from your customer associated email address. Please include your forum nickname.
It is only doing this when importing the _multiple_hosts.cfg service file.
The config tool in XI is supposed to go over each host in a service check and match it against the already defined hosts. In practice, it gets very easily confused. So a better solution would be to import the service checks for 1 host only and than assign it to a host group in Core Configuration Manager.

Let us know if you have any other questions.

Re: Duplicate hosts importing when using bulk import tool

Posted: Fri Nov 10, 2017 6:02 am
by JGCG
Thanks for the reply. I think I'll have to add each service check in manually and then add each host to the check.

Just out of curiosity, is it possible to do this in the database to speed things up.
i.e. adding a service check (memory usage say) and then inserting into the database the 100 or so hosts that will have this check assigned to them?
If so, which table is this stored in?

Thanks.

Re: Duplicate hosts importing when using bulk import tool

Posted: Fri Nov 10, 2017 11:27 am
by npolovenko
@JGCG, On the theory that's possible but on practice we're very against manually modifying mysql as it often turns out catastrophic :roll: We recommend to only use safe tools like Core Configuration Manager.
I think putting the desired hosts in a host group and then assigning them to a service would be a better solution.
By the way, take a look at Bulk Modifications Tool in Core Configuration Manager. You can click on "Add Services", select all services at once using the shift key, select all hosts and click on Save Changes. After that click on Apply Configuration as well. That should do it for you.

Re: Duplicate hosts importing when using bulk import tool

Posted: Fri Nov 10, 2017 11:48 am
by JGCG
Thanks for the reply.
The only reason we can't do it the way you suggest (adding the service checks to hostgroups) is we have multiple of the same checks butthe thresholds are different depending on the server.

So, I'm having to create a service check, say CPU to go critical at 80%, and assign 120 hosts to this, and then another which goes critical at 90% and host 40 hosts, etc, etc.

No too much of an issue, just looks like I'll have to add each server manually.

Re: Duplicate hosts importing when using bulk import tool

Posted: Fri Nov 10, 2017 12:17 pm
by npolovenko
@JGCG, Why not create two service checks with 2 thresholds, maybe name them slightly different and then assign to different host groups, or apply to hosts with Bulk Modifications Tool without even creating host groups? Still seems like an easier way to do it rather than modifying 200 hosts manually :| But whatever works better.. May I go ahead and close the thread?

Re: Duplicate hosts importing when using bulk import tool

Posted: Fri Nov 10, 2017 1:00 pm
by JGCG
In total there are around 200 separate checks we have, approx. 60 are unique the rest are variations on thresholds so I'd still have the issue of creating many many host groups.

But, not an issue with going the manual route, I'll see if I can script something together.

Thanks for your help, feel free to close this thread.