cross products: host/host group x service/service group ..?

Marc Powell marc at ena.com
Thu Jan 24 15:03:54 CET 2008


On Jan 24, 2008, at 4:23 AM, Jan Grant wrote:

> By-and-large, I generate my nagios configs mechanically from the same
> config that drives app deployment. However, I've just had cause to  
> write
> some config by hand and the following occurred to me:
>
> I've got several hostgroups, and several service groups. What I'd  
> really
> find convenient is a way to say
>
> 	all these services are running on all these hosts

I think you can get close to what you want. Servicegroups are just for  
CGI display purposes but in a service definition you can specify  
hostgroups instead of specific hosts.

http://nagios.sourceforge.net/docs/2_0/templatetricks.html

All Hosts In Multiple Hostgroups: If you want to create identical  
services that are assigned to all hosts in one or more hostgroups, you  
can do so by creating a single service definition. How? The  
hostgroup_name directive allows you to specify the name of one or more  
hostgroups that the service should be created for:

	define service{
		hostgroup_name		HOSTGROUP1,HOSTGROUP2,...,HOSTGROUPN
		service_description	SOMESERVICE
		other service directives ...
		}

The definition above would create a service called SOMESERVICE on all  
hosts that are members of hostgroups HOSTGROUP1 through HOSTGROUPN.  
All the instances of the SOMESERVICE service would be identical (i.e.  
have the same check command, max check attempts, notification period,  
etc.).

-
Marc

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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