hostgroup expansion and regex

Terry td3201 at gmail.com
Sat Aug 29 16:56:48 CEST 2009


On Sat, Aug 29, 2009 at 4:22 AM, Jim Avery<jim at jimavery.me.uk> wrote:
> 2009/8/29 Terry <td3201 at gmail.com>:
>> I am overlooking something simple.
>> Nagios Core 3.2.0
>>
>> use_regexp_matching=1
>> use_true_regexp_matching=0
>>
>> define hostgroup {
>>        hostgroup_name  allhosts
>>        members         *
>>
>> Error: Could not expand members specified in hostgroup (config file
>> '/etc/nagios/objects/hostgroups.cfg', starting on line 89)
>>
>> What in the world am I missing here?
>
>
> "*" is a wildcard, not a regular expression.  To use simple wildcards
> like this you need:
>
>  use_regexp_matching=0
>
>
> If you still want to use a regular expression though, the one you need
> which would be equivalent to a "*" wildcard is:
>
>  .*
>
> The "." means "match any character" and the "*" in a regular
> expression means "match zero or more repetitions of the previous
> element.".
>
>
> hth,
>
> Jim
>
> ------------------------------------------------------------------------------

I tried .* with regex and true_regex but I clearly didnt try * without
enable_regex.   Thanks for helping!

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
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