Sub-groups of hostgroups

Chris Beattie cbeattie at geninfo.com
Tue Mar 10 20:18:44 CET 2009


Andrew Davis wrote:
> Is it possible to do a sub-group of a hostgroup?

As far as I know, hostgroups are all at the same level, but hosts can be 
members of more than one hostgroup.  I set my host definitions up like this:

define host {
	use		prod_windows_server
	host_name	servername
	alias		serveralias
	address		w.x.y.z
	hostgroups	+FTP Servers,Web Servers
}

My prod_windows_server host template sets a hostgroup of 
windows_servers.  In the host definition here, the + adds the additional 
host groups to the host.  Without the +, the host definition's hostgroup 
setting would replace windows_servers.

Then, in my services.cfg, I assign services to hostgroups:

define service {
	use			standard_service
	name			Web_Service
	hostgroup_name		Web Servers
	service_description	Service: Web
	check_command		check_nt_service!W3SVC
}

You don't have to assign services to a hostgroup, but it's convenient 
for me to do so.

-- 
Chris Beattie

Nothing in this message is intended to make or accept and offer or to form a contract, except that an attachment that is an image of a contract bearing the signature of an officer of our company may be or become a contract. This message (including any attachments) is intended only for the use of the individual or entity to whom it is addressed. It may contain information that is non-public, proprietary, privileged, confidential, and exempt from disclosure under applicable law or may constitute as attorney work product. If you are not the intended recipient, we hereby notify you that any use, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this message in error, please notify us immediately by telephone and delete this message immediately
 .

Thank you.

------------------------------------------------------------------------------
_______________________________________________
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