Hostgroup subtraction?

Israel Brewster israel at frontierflying.com
Thu Jun 4 19:25:24 CEST 2009


On Jun 3, 2009, at 1:25 PM, Marc Powell wrote:

>
> On Jun 3, 2009, at 2:43 PM, Chris Pepper wrote:
>
>> 	    We use several hostgroups. I'd like to ensure each host is in a
>> group for its building. My concern is that we need to avoid adding a
>> host without adding it to a building hostgroup.
>>
>> 	I tried putting the generic parent object in a hostgroup for our  
>> main
>> location, and using 'hostgroups -mainlocation,+actuallocation', but
>> apparently hostgroups only allows '+', not '-' or '!'.
>>
>> 	Is there a way to remove hosts from inherited hostgroups?
>
> In this specific example, using the following in the host{} definition
> will override the template definition and the host would only be in
> actuallocation --
>
> 	hostgroups actuallocation

For this example, that works, and perhaps for the original poster it's  
good enough. I'm running into a very similar situation, however, where  
I have a list of hostgroups in a base definition, and I just want to  
remove one hostgroup from that list. I don't want to override the  
entire list, however, because it might change in the future, and then  
I'd have to change it in two spots. Plus, I want to keep the other  
hostgroups, I just don't want the one specific one. So is there a way  
to remove one (or more) item(s) from an inherited hostgroup list,  
without overriding the entire thing? Thanks.

-----------------------------------------------
Israel Brewster
Computer Support Technician II
Frontier Flying Service Inc.
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7250 x293
-----------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Israel Brewster.vcf
Type: text/directory
Size: 397 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090604/995ddfa8/attachment.bin>
-------------- next part --------------
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
-------------- next part --------------
_______________________________________________
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