Page 1 of 1

How to bulk add hosts from Auto-Discovery to a Host Template

Posted: Tue Oct 28, 2014 9:27 am
by PhilG
I know how to use Auto-Discovery.
I know how to add a Host - http://assets.nagios.com/downloads/nagi ... gement.pdf
I know how to create a Host Template.

UPDATED:
GOAL: Take all specific like Production hosts, associate those specific like Hosts to the same like Host Template so they use the same Check Settings, and then introduce them to a same like Service Template.

UPDATE #2:
1). Created a Host template, or at least modified the Linux server Host Template to update the Check Settings, Alert Settings, and and the Manage Contactgroups for our environment, saved and then applied configuration.
2). Check the Service templates and modify accordingly, save and then apply configuration.
3). Go into Auto-Discovery Wizard and select the job's devices found, go into the job, select the address and service needed, modify the Monitoring Settings to our needs, modify the Notification Settings to our needs (Contact group and individual), define the Host Groups and Service Groups as per our needs, apply.

QUESTIONS:
1) Does identifying the Monitoring Settings from this process override the Host Groups' template settings??
2). To get all my Production servers into their respective groups, I should identify a specific Host in Auto-Discovery, then use that Host as a "template" for a particular Host/Service, and then use the Bulk Import to clone all my other Hosts, ex. pick a Linux server in Auto-Discovery, configure appropriately as noted above, when completed, then use Bulk Import and choose that Linux server/Host as a template to bring in all my other like Linux servers? Does that sound about right?

Ultimate goal: To make this as painless and simple as possible and get my 200 plus servers in to Nagios XI as quickly as possible for simple monitoring since our other product is failing fast. Then, add my respective clients to monitor additional components, ex. CPU, disk space, services, etc.

Re: How to bulk add hosts from Auto-Discovery to a Host Temp

Posted: Tue Oct 28, 2014 12:55 pm
by lmiltchev
You could probably create your hosts/services in bulk (via a script, etc.) in the CLI, place them in the "import" directory and run "reconfigure_nagios.sh". For more info, review the following document:

http://assets.nagios.com/downloads/nagi ... gement.pdf

Re: How to bulk add hosts from Auto-Discovery to a Host Temp

Posted: Tue Oct 28, 2014 3:21 pm
by PhilG
Appreciate the feedback, but that didn't answer my 2 questions as per the CCM.

Re: How to bulk add hosts from Auto-Discovery to a Host Temp

Posted: Wed Oct 29, 2014 11:53 am
by lmiltchev
2). To get all my Production servers into their respective groups, I should identify a specific Host in Auto-Discovery, then use that Host as a "template" for a particular Host/Service, and then use the Bulk Import to clone all my other Hosts, ex. pick a Linux server in Auto-Discovery, configure appropriately as noted above, when completed, then use Bulk Import and choose that Linux server/Host as a template to bring in all my other like Linux servers? Does that sound about right?
When you discover a host in Auto-Discovery, you can configure it, then use it as a template in the "Bulk Host Cloning and Import" wizard and clone it as many times as you want to in order to set up the "other like Linux servers". I am afraid I don't quite understand why you have the following:
then use that Host as a "template" for a particular Host/Service
Can you elaborate?
Note: In "Bulk Host Cloning and Import" wizard you don't actually clone a template, but a host (that you use as a "template" for creating the clones...). Other words, the term "template" in the wizard has a different meaning.

Re: How to bulk add hosts from Auto-Discovery to a Host Temp

Posted: Wed Oct 29, 2014 1:48 pm
by PhilG
Let me put it this way:
Ultimate goal: To have all my Linux servers and their respective disk space usage, their memory usage, and CPU utilization being monitored in Nagios XI.

How do I do this?

The method I am attempting to do is as follows:
1). Use Auto-Discovery on my Production subnet VLANs to identify all our Production devices. The devices can be a Linux server, a Windows server, a switch, or a firewall device.
2). Use one of the Auto-Discovery jobs to identify one of my Linux servers and configure its basic monitor elements (ex. HTTP), configure the Monitoring Settings, configure the Notification Settings, configure the Host groups and Service groups.
3). Use Bulk Host Cloning and Import with that Linux server (does not have the NRPE client on it) for cloning.

PROBLEM: The CPU, disk space, and memory usage are not identified through Auto-Discovery for Linux servers. So, it appears to get those basic monitoring checks I would have to install the NRPE client on every Linux server. Correct? It appears that Windows servers, though, do not have that issue since one can use the WMI wizard which identifies those checks without installing the NSClient, yes?


Side note: "Cloning" to me means having 2 or more identical devices with the same name, DNS, etc., so I choose to use "template" as it will be used as a copy for all other devices. Novell used the term "user template" in NDS years ago for setting up a user account that was configured with the basic information (ex. number of password resets allowed, time when user can be logged in, etc.) which was used when creating a new account.

Re: How to bulk add hosts from Auto-Discovery to a Host Temp

Posted: Wed Oct 29, 2014 1:57 pm
by slansing
So auto-discovery itself will run an NMAP scan of the subnet you define, which I'm guessing you know by now. Being an NMAP scan, it's not going to automatically set up granular checks for you, it will only list addresses it can reach, and common ports that are open. You will need to run a wizard specific to the OS on that address after you have cataloged your systems via auto-disco. Once you have set up one windows host to your liking, you could use the bulk host cloning tool to duplicate it's checks on the Nagios side to a new address, you will still need to set up the agent the same way on that system though. This can be handled en-masse by using puppet/check type systems.