More config file madness add intersection to group operations
John P. Rouillard
rouilj+nagiosdev at cs.umb.edu
Tue Feb 13 22:31:49 CET 2007
In message <45D0C6E5.50907 at nagios.org>,
Ethan Galstad writes:
>John Rouillard wrote:
>> Is 3.0 going to support the intersection operation between hostgroups?
>> Currently you can do:
>>
>> web_servers,!boston
>>
>> to get web servers that are not in boston, but trying to get web
>> servers that are in boston means adding every host to a site (e.g. boston,
>> miami, london, orlando) and then:
>>
>> web_servers, !orlando, !miami, !london
>>
>> this is a maintenance nightmare when adding new sites and doesn't
>> express what you want. (I chose a simple example here. In some of my
>> configs I have 10 or 15 different hostgroups.)
>>
>> What I would like to see is support for the intersection operation.
>> So web_servers in boston would be:
>>
>> web_servers, &boston
>>
>> and production tier 1 web servers in boston that are not dns servers
>> would be
>>
>> web_servers, &boston, &production_tier_1, !dns_servers
>>
>> The addition of intersection provides all the standard operations of
>> set theory: intersection, difference and union.
>I don't have any plans to add intersection support, as it would increase
>the complexity of the code quite a bit.
I agree the code is more complex, but it greatly reduces the complexity
of setting up services based on the characteristics of the systems for
every user.
>You can accomplish what you
>need by using smaller hostgroups (that don't get registered) that
>contain distinct sets of hosts and then use the new subgroup feature in
>Nagios 3 to define larger hostgroups that contain members of the smaller
>groups you defined.
That is better than what we have, but is still a major maintainence
burden due to the proliferation of hostgroups. Having to explain to a
new admin (or even an older admin) that they have to select 1
hostgroup from each of three lists is a lot easier than having to
select 20 or 30 subgroups that are derived from the base sets of host
characteristics.
Plus the proliferation of hostgroups leads to a lot of errors in the
configurations that means people don't monitor what they think they
were monitoring.
I think:
web_servers, &production_tier_1, &boston, &https_server
is a lot clearer than:
web_servers, !production_tier_2, !production_tier_3, !test_tier_any, !dev_tier_any, !orlando, !miami, !london, !http_only
In any case, does the subgroup feature in nagios 3 allow:
hostgroup boston_servers_AND_web_servers_AND_https {
hostgroup_name web_servers, !orlando, !miami, !london, !http_only
register 0
}
hostgroup boston_servers_AND_web_servers_AND_https {
hostgroup_name web_servers, !boston, !miami, !london, !http_only
register 0
}
so at least I only have one place to change the intersection like
hostgroup. Then can I use these as:
define service{
service_description HttpsCheck
hostgroup_name orlando_servers_AND_web_servers_AND_https
use generic-service
check_command check_http!-p 443 -w 5 -c 12
}
define service{
service_description HttpsCheck
hostgroup_name boston_servers_AND_web_servers_AND_https
use generic-service
check_command check_http!-p 443 -w 10 -c 20
}
define serviceextinfo{
service_description HttpsCheck
hostgroup_name boston_servers_AND_web_servers_AND_https
notes Basic check of https service at port 443.
use generic-service
}
Thanks for your feedback.
-- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
More information about the Developers
mailing list