Bulk Host Cloning and Import

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
tonkaUser
Posts: 54
Joined: Tue Nov 28, 2017 10:27 am

Bulk Host Cloning and Import

Post by tonkaUser »

Hi,

I have 100+ windows servers with NCPA agent installed. Some have a single disk C while others have disks C/D or C/D/E.
How can I use a wizard-like bulk clone that will be smart enough to apply space monitoring to only the available disks?

As I see now, I will have to use "Bulk Host Cloning and Import " to clone only servers that have the same disks. Is that true or there's some quick way to import ?

Thanks
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Bulk Host Cloning and Import

Post by npolovenko »

Hello, @tonkaUser.
How can I use a wizard-like bulk clone that will be smart enough to apply space monitoring to only the available disks?
I believe there's no such feature available yet. The wizard can determine the target server's configuration only when being ran for each server individually.
The reason why this hasn't been implemented is how would this plugin know if the drive is down versus if it doesn't actually exist?
As I see now, I will have to use "Bulk Host Cloning and Import " to clone only servers that have the same disks.
Yes, exactly, so you'd need to clone the configs to the servers that have same logical disks. Or you may clone one config to all servers and then delete the "non-existing checks".
Or you may assign servers with a similar structure to the hostgroups, and then assign the right service checks to the hostgroups.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
tonkaUser
Posts: 54
Joined: Tue Nov 28, 2017 10:27 am

Re: Bulk Host Cloning and Import

Post by tonkaUser »

Is there a way to do it using config files on Nagios box? Thanks
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Bulk Host Cloning and Import

Post by npolovenko »

@tonkaUser, Do you mean by manually modifying the cfg files in /usr/local/nagios/etc/ folder? You could, i'd recommend to import the new config files rather than modifying them. Take a look here:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Just run the NCPA wizard one time against a random host, and it will create cfg files in /usr/local/nagios/etc/ folder, then you could use those files as an example to create new ones.

You could also use a Bulk Modifications Tool. In XI web interface navigate to Configure/Core Configuration Manager, then click on Tools/Bulk Modifications Tool(in the left column). From there you'd click on add services, select the already existing services and clone them for the new hosts. And if you wonder how to add hosts: you could either add them in Core Configuration Manager, or you could use the Autodiscovery wizard that will scan the IP range and let you automatically add all hosts at once.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
tonkaUser
Posts: 54
Joined: Tue Nov 28, 2017 10:27 am

Re: Bulk Host Cloning and Import

Post by tonkaUser »

Thanks
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Bulk Host Cloning and Import

Post by dwhitfield »

tonkaUser wrote:Is there a way to do it using config files on Nagios box? Thanks
Are you talking about modifying the configs directly rather than using the CCM? You need to be careful with this, but it can be done: https://assets.nagios.com/downloads/nag ... ios-XI.pdf
tonkaUser
Posts: 54
Joined: Tue Nov 28, 2017 10:27 am

Re: Bulk Host Cloning and Import

Post by tonkaUser »

I wanted to change *.cfg files under /usr/local/nagios/etc/services and then let Nagios re-process them. I see that my changes are visible, but I don't want to loose them.
kyang

Re: Bulk Host Cloning and Import

Post by kyang »

When you say change, are you editing the services under a host for example: Editing the check command?

I'm not exactly sure, but this sounds a lot like what @dwhitfield mentioned in the above post.

Be careful when modifying the configs directly, but following the instructions in the documentation he posted is how you do so.

Along with running the commands to make sure your changes don't throw any errors and then restart Nagios.

https://assets.nagios.com/downloads/nag ... ios-XI.pdf
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: Bulk Host Cloning and Import

Post by gormank »

The following service will check all available drives. One thing is that if there are ~10 or more, the perfdata gets lost.

Code: Select all

define service {
        service_description             FS_Win_Usage
        use                             default_service
        hostgroup_name                  Windows_Physical,Windows_Virtual
        check_command                   check_nrpe!CheckDriveSize!-a ShowAll=long MinWarnFree=20% MinCritFree=10% FilterType=fixed!"perf-config=used.used(unit:G;suffix:'') used %(ignored:true) show-all=long"!-a ShowAll=long MinWarnFree=20% MinCritFree=10% FilterType=fixed perf-config=used.used(unit:G;suffix:'!!!!
        register                        1
        }
kyang

Re: Bulk Host Cloning and Import

Post by kyang »

Thanks gormank,

tonkaUser, Let us know of any other questions!
Locked