On Fri, 2006-08-18 at 16:25 -0500, Marc Powell wrote: > > -----Original Message----- > > From: [EMAIL PROTECTED] [mailto:nagios-users- > > [EMAIL PROTECTED] On Behalf Of Christian Hedegaard > > Sent: Friday, August 18, 2006 1:44 PM > > To: nagios-users@lists.sourceforge.net > > Subject: [Nagios-users] regular expression matching. > > > > > > The Nagios documentation relating to the "regular expression" matching > > seems very thin to me. And not quite clear. > > > > It appears, by example, that the only regular expressions you can use > > are "*" and "?", which I would just consider wildcard matching and not > > regular expressions. > > > > Regardless, can anything else be used as far as these "regular > > expressions" are concerned? > > You're probably looking for this option in nagios.cfg -- > > # "TRUE" REGULAR EXPRESSION MATCHING > # This option controls whether or not "true" regular expression > # matching takes place in the object config files. This option > # only has an effect if regular expression matching is enabled > # (see above). If this option is DISABLED, regular expression > # matching only occurs if a string contains wildcard characters > # (* and ?). If the option is ENABLED, regexp matching occurs > # all the time (which can be annoying). > # Values: 1 = enable true matching, 0 = disable true matching > > use_true_regexp_matching=1 <snip> Then again, maybe it isn't. The title of this option is accurate but easily misunderstood. It isn't so much about changing how the characters are interpreted, i.e., non-true uses "*" while true uses ".*" but rather where regex interpretation takes place. We leave it disabled because we do not want all of our strings interpreted as regular expressions.
Then again, maybe this is why we have found Nagios regex a little inconsistent. I wonder how it delimits a string. I would view: abc.*(?:def|ghi|jkl) as a string but perhaps Nagios thinks the only regex is abc.* -- John A. Sullivan III Open Source Development Corporation +1 207-985-7880 [EMAIL PROTECTED] Financially sustainable open source development http://www.opensourcedevel.com ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Nagios-users mailing list Nagios-users@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