How do I 'except' or 'negate' a regex host_name in a service definition?
jeff vier
boinger at tradingtechnologies.com
Tue Nov 1 16:32:17 CET 2005
On Mon, 2005-10-31 at 17:19 -0500, John P. Rouillard wrote:
> In message <1130772078.25677.10.camel at chi101100.int.tt.local>,
> jeff vier writes:
> >On Fri, 2005-10-28 at 01:59 +0200, Andreas Ericsson wrote:
> >> > I want to split off a group of similarly named hosts to a separate
> >> > service from a more global check.
> >> > Here's the "normal" (working) regex line:
> >> > host_name ^chi-[a-z0-9]*-sim-[0-9]$
> >> > Now...how do I define "not those" in the associated global check?
> Maybe something like:
>
> define hostgroup{
> name my_filter_group
> alias mfg
> members {^chi-[a-z0-9]*-sim-[0-9]$}
> }
> Then in the services definition use
>
> define service {
> hostgroup_name !my_filter_group
> host_name <some regexp matching all hosts>
> ...
> }
Ah, thanks.
I was too focused on doing it the "exciting" way, I failed to think of a
more normal way.
> Sadly you will end up seeing the hostgroup in the CGI, but.
Not a problem...I can sell it as a feature :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://www.monitoring-lists.org/archive/users/attachments/20051101/228a6377/attachment.sig>
More information about the Users
mailing list