More config file madness add intersection to group operations

Ethan Galstad nagios at nagios.org
Sun Feb 18 23:23:05 CET 2007


John P. Rouillard wrote:
[snip]
> 
> 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
>   }

Yep, Nagios 3 has a subgroup feature that works like you mentioned, but 
only with a different directive name (hostgroups):

hostgroup hg3{
	hostgroups	allhostgroups,!hg1,!hg2
	...
	}
> 
> 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


Ethan Galstad,
Nagios Developer
---
Email: nagios at nagios.org
Website: http://www.nagios.org

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV




More information about the Developers mailing list