Running tests on intersection of two hostgroups?

Hari Sekhon hpsekhon at googlemail.com
Mon Apr 14 10:31:23 CEST 2008


Hugo van der Kooij wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Kelly Jones wrote:
> | I have a "Windows" hostgroup for my Windows machines, and an
> | "Important" hostgroup for all my important machines (Windows and
> | otherwise).
> |
> | How do I check a service on the intersection of these two groups (ie,
> | important Windows machines)?
> |
> | I realize I could create an "important Windows" hostgroup, but that
> | seems ugly, since I'd have to maintain it separately from the two
> | existing hostgroups.
>
> If the question is if one can use boolean logic in requiring an AND
> function in the membership of hostgroups. Then the simple answer is no.
> You need to define another group with the right members yourself.
>
> If your question is different you may need to rephrase the question.
>
> Hugo
Is there no plan to allow embedded hostgroups in Nagios?

Once you have this, you would just stick all important windows machines 
in the "Important Windows" group and then nest that group in the general 
"Important" group to achieve the effect of maintaining those hosts in 
only one place, scalable and consistent.

I'm not sure if this is in 3.x or planned, I don't follow the bleeding 
development track too closely...

Short of that, write a script to parse and generate another hostgroups 
file to achieve the same result and have it automated to create the 
Important group from other hostgroups and maintain your hosts in just 
those more specific hostgroups.

I did something similar to auto-generate servicegroups for all tests to 
allow easily grouping them together, you could do something similar for 
hostgroups (my script for servicegroups is released here 
http://www.nagiosexchange.org/cgi-bin/pages/Detailed/2435.html)

-h

-- 
Hari Sekhon


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