Page 1 of 2

Nagios host/host group/contact/contact group design

Posted: Thu Mar 06, 2014 1:15 pm
by nanz28v
hi we are planning monitor hierarchy as follows:

1. organize hosts administered by a single admin into "his" host group, then assign that host group to "his" contact/contact group.

2. organize hosts by OS. What is the quickest way?

3. organize hosts by function, such as SQL, FTP, or AD. What is the quickest way?

For number one I cannot figure out how to link host to group to contact in this way since I went in to host group and I cannot find an option to tie it to a contact or group directly. And in contact I cannot link it to a host or a group.

Please answer all 3 questions here, thank you.

Re: Nagios host/host group/contact/contact group design

Posted: Thu Mar 06, 2014 5:46 pm
by slansing
1. organize hosts administered by a single admin into "his" host group, then assign that host group to "his" contact/contact group.
You would create a user, then add the contact that was created with him to the hosts make sure his privileges allow him to only view what his contact is assigned to:

http://assets.nagios.com/downloads/nagi ... Rights.pdf
2. organize hosts by OS. What is the quickest way?
I would recommend grouping your systems by hostgroup for this
3. organize hosts by function, such as SQL, FTP, or AD. What is the quickest way?
This could be done with making their aliases (names) appended with the above, or by hostgroup as well.

Re: Nagios host/host group/contact/contact group design

Posted: Fri Mar 07, 2014 9:00 am
by nanz28v
1. organize hosts administered by a single admin into "his" host group, then assign that host group to "his" contact/contact group.

You would create a user, then add the contact that was created with him to the hosts make sure his privileges allow him to only view what his contact is assigned to:

Unfortunately all of our team members has to be admins for backing each other up so permission is not feasible. So is it possible to assign contact to a host group, so we do not need to manually assign a contact to a host, and make it dynamic by adding a host to a host group that already has the contact assigned?


2. organize hosts by OS. What is the quickest way?

I would recommend grouping your systems by hostgroup for this

Is there an automated way? Such as when we scan the IP address range and it reports OS version? Again we are looking for a dynamic/automated method.

Thank you.

Re: Nagios host/host group/contact/contact group design

Posted: Fri Mar 07, 2014 10:39 am
by technick
nanz28v wrote:
2. organize hosts by OS. What is the quickest way?

I would recommend grouping your systems by hostgroup for this

Is there an automated way? Such as when we scan the IP address range and it reports OS version? Again we are looking for a dynamic/automated method.

Thank you.
I would create a script that runs nmap or whatever auto discovery tool your using. Take the results, parse the results. Any results with OS Type=Windows or whatever the appropriate regex value would be, run the following command which would build a template with the hostname / ip address / hostgroup and insert it into a file config file that nagios knows about, then reload nagios. If you associate your service checks against hostgroups, this will automatically pick up service checks.

I highly recommend reading this link - http://nagios.sourceforge.net/docs/3_0/ ... ricks.html

Re: Nagios host/host group/contact/contact group design

Posted: Fri Mar 07, 2014 1:26 pm
by tmcdonald
We actually do have an Autodiscovery Wizard in XI. Go to CCM, then on the left you will see a link for it. There might be some on-screen instructions if you have not run it before, just follow them. Then you will start your first scan which does run nmap in the background, and then once the scan has finished you will be able to do a second pass over the results in order to set up hosts/services.

Re: Nagios host/host group/contact/contact group design

Posted: Fri Mar 07, 2014 3:04 pm
by nanz28v
Thank you for your replies. So can we assign a host group to a contact directly? Since if this is possible then we can then just keep adding new servers to one of the host groups that already attached to a contact, thus making newly added servers automatically assigned a contact.

Re: Nagios host/host group/contact/contact group design

Posted: Mon Mar 10, 2014 10:56 am
by tmcdonald
I don't believe you can directly assign one contact to a whole host group, no. This can be done by using a template with those hosts and in that template you would assign the contact, but you would still need to configure which hosts are to use this template.

Re: Nagios host/host group/contact/contact group design

Posted: Mon Mar 10, 2014 2:04 pm
by nanz28v
Can we assign a server multiple templates, for example "Nan's servers" and "all Windows 2008", that would require one server in multiple host groups?

Re: Nagios host/host group/contact/contact group design

Posted: Mon Mar 10, 2014 2:11 pm
by tmcdonald
I'm not sure what you mean by that last part "that would require one server in multiple host groups". Yes, you can assign multiple templates to a host.

Re: Nagios host/host group/contact/contact group design

Posted: Mon Mar 10, 2014 2:15 pm
by nanz28v
What I meant was can a server, say domain controller, be either in Nan's server host group, since it belongs to me, while at the same time it belong to another host group "Windows 2008 server"? So basically we will have multiple hosts belong to multiple host groups all at the same time in multi-to-multi (cross) relationship between hosts and host groups.