Assigning contacts to hosts confusion
Mathieu Gagné
mgagne at iweb.com
Thu May 14 02:14:04 CEST 2009
Hi,
On 5/13/09 7:57 PM, Frater, Greg J wrote:
>
> Can someone help me understand the best way to assign contacts to hosts
> en masse? In version 1.x, we would create a hostgroup put the hosts that
> we needed in it and then assign a contact group to that hostgroup, done
> deal. Now it appears that under Nagios 3 to accomplish the same thing I
> have to create the hostgroup as before and then go to each host and
> assign a contact or contact group to it. That's much more tedious than
> the old way, am I missing something? Please tell me there's an easier
> way that I'm overlooking.
Create a host template and assign your contacts there.
If you need to *override* contacts inherited from the template, do it in
the host declaration itself like you would normally do. Exemple:
define host {
address 127.0.0.1
alias localhost
contacts just_this_one
host_name localhost
use generic-host
}
If you need to *add* contacts to the list of contacts already inherited
from the template, add a "+" in front of the list of contacts in the
host declaration. Example:
define host {
address 127.0.0.1
alias localhost
contacts +oh_and_add_this_one_too
host_name localhost
use generic-host
}
Reference:
http://nagios.sourceforge.net/docs/3_0/objectinheritance.html
-> Implied/Additive Inheritance in Escalations
--
Mathieu
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list