true regexp enhancement

Robert Bossecker nagios-d-rb at bossecker.de
Wed Jan 19 03:26:20 CET 2005


Hello,

after turning thousands of lines when trying the 
use_true_regexp_matching i thought if this
feature may be enhanced by surrounding the pattern string automatically 
with "^" and "$"
so there is no need to cover each string to prevent double matches. This 
may be
configurable.

If i have a host named "linux1" and i have also hosts named "linux10" 
and "linux11"
there will be a complain about, that a service for linux10 oder linux11 
is already defined,
caused by the service definition for this service when writing

define service{
    host_name   linux1
    service_description   PING
    check_command   check_ping...
}

this will unfortunately math all hosts beginning oder containing "linux1"

If the patterns will be surrounded by begin and end patterns there is no 
need to change thousands of
definitions.
Then a match for all hostnames beginning with "linux1" must be written 
as "linux1.*" which expicitly says i want
additional characters.

Best Regards
Robert



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt




More information about the Developers mailing list