Hostgroup definition

Andreas Ericsson ae at op5.se
Mon May 12 17:03:17 CEST 2008


Jay R. Ashworth wrote:
> I know that lots of the documentation about how to configure Nagios's
> cfg files is in transition from 2.x (where you mostly did it one way)
> to 3.0 (where you mostly do it another way), but there's a point I'm
> not clear on.
> 
> It seems to me that it would be much easier to maintain if member
> machines were placed in hostgroups *in each member machine's cfg file*
> (cause yes, I'm using a separate file for each machine).
> 

You can do that.

> This doesn't seem to be the way Nagios expects me to do it, and I don't
> see that there's a way to do it this way; you appear to have to define
> the hostgroup in some amorphous 'somewhere', and then add all the hosts
> to it *there* (which means that there are two places you have to change
> when you add a new host, which I'm not fond of).
> 

Not really, no, but the hostgroup needs to be defined somewhere. When it
is, you can do something like the following

define host {
	use     template_with_all_required_variables
	hostgroups   hostgroup1,hostgroup2,hostgroup4,hostgroupn
	}

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
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