I believe the docs are pretty much correct on this one. Use_regexp_matching=1 will turn on regex for entries that contain a "*" or "?" only.
Use_true_regex_matching=1 will turn it on completely, which while it sounds neat, will cause lots of headaches. Consider if you have a host named "mile", and another named "smiles". If you have true_regex on, you will never be able to only reference the host "mile" as every entry for it will match "smiles". (You would have to use "^mile$" to be safe) That's why is recommended to keep it off unless you really know what you are doing. > -----Original Message----- > From: Ivan Fetch [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 23, 2006 12:37 PM > To: Andrew Laden > Cc: [email protected] > Subject: RE: [Nagios-users] Difficulty with wildcards in > serviceescalation > > Hello, > > Andrew, I wanted to thank you for your reply, and mention > that yes this does work as I wanted. > > I am curious what setting use_regexp_matching to 1, but > use_true_regexp_matching to 0 would bring to the table (given > that the docs apparently mis-state these options). > > > Thanks - Ivan. > On Tue, 21 Feb 2006, Andrew > Laden wrote: > > > There is a documentation error. You have to use real regex. > A naked * > > by itself is not a valid regex. > > > > Try .* > > > > -Andrew > > > >> -----Original Message----- > >> From: [EMAIL PROTECTED] > >> [mailto:[EMAIL PROTECTED] On > Behalf Of Ivan > >> Fetch > >> Sent: Monday, February 20, 2006 5:25 PM > >> To: [email protected] > >> Subject: [Nagios-users] Difficulty with wildcards in > >> serviceescalation > >> > >> Hello, > >> > >> > >> I'm having difficulties with wildcards in a serviceescalation, > >> running nagios 2.0-stable. It seems like the > documentation discusses > >> doing exactly this, so perhaps my trying to get this to work last > >> minute is causing me to overlook something... Any ideas? > >> > >> > >> # Limit notifications to a max of 5, the last one > notifying everyone. > >> define serviceescalation{ > >> host_name * > >> service_description * > >> first_notification 5 > >> last_notification 0 > >> notification_interval 0 > >> contact_groups everyone > >> } > >> > >> > >> > >> When verifying the config I get: > >> > >> "Reading configuration data... > >> > >> Error: Could not find any host matching '*' > >> Error: Could not expand hostgroups and/or hosts specified > in service > >> escalation (config file '/usr/local/nagios/etc/du/services.cfg', > >> starting on line 154)" > >> > >> > >> > >> I have this set in /usr/local/nagios/etc/nagios.cfg: > >> use_regexp_matching=1 > >> use_true_regexp_matching=0 > >> # ... at the end of the file ... > >> cfg_dir=/usr/local/nagios/etc/du > >> # (which is where the services.cfg is read, which is where the > >> # serviceescalation is defined) > >> > >> > >> > >> Thanks, > >> > >> Ivan Fetch. > >> ' > >> > >> > >> ------------------------------------------------------- > >> This SF.net email is sponsored by: Splunk Inc. Do you grep through > >> log files for problems? Stop! Download the new AJAX > search engine > >> that makes searching your log files as easy as surfing the web. > >> DOWNLOAD SPLUNK! > >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486& > > dat=121642 > >> _______________________________________________ > >> Nagios-users mailing list > >> [email protected] > >> 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 > >> > > > ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Nagios-users mailing list [email protected] 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
