How do I 'except' or 'negate' a regex host_name in a service definition?

Andreas Ericsson ae at op5.se
Fri Oct 28 01:59:47 CEST 2005


jeff vier 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?
> 
> I've tried the usual '!' before the host_name regex string.


This only matches a single char.


> I've tried !(regex).

This matches the first char of the pattern. Tha pattern in this case is 
regex, unless you're using extended regular expressions..

> I've tried dropping the ^$ and appending a !.


Is this a make rule for dependencies?

> I can't use a negated regex, because then I'd be grabbing all sorts of
> hosts I don't want in there (there are additional hostgroup_name
> definitions in the service def.
> 
> Any ideas?
> 
> This is in Nagios 2.0b4, if that matters.
>

It does.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
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