From 704a1145d64532df36624a3c9850b0c86f38f76f Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 11 Nov 2008 12:22:06 +0100 Subject: doc: added new nomatch mode Note: the actual nomatch mode is not yet available in this code, this needs to be merged from v3-stable first. This happens soon, but I wanted to make sure the doc is right. --- doc/rsyslog_conf_nomatch.html | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/doc/rsyslog_conf_nomatch.html b/doc/rsyslog_conf_nomatch.html index 5c4f3f90..5f25f3e4 100644 --- a/doc/rsyslog_conf_nomatch.html +++ b/doc/rsyslog_conf_nomatch.html @@ -8,9 +8,11 @@ of the property replacer.

shall return if a regular expression did not find the search string.. Traditionally, the string "**NO MATCH**" was returned, but many people complained this was almost never useful. Still, this mode is support as "DFLT" for legacy configurations. -

Two additional and potentially useful modes exist: in one (BLANK) a blank string +

Three additional and potentially useful modes exist: in one (BLANK) a blank string is returned. This is probably useful for inserting values into databases where no -value shall be inserted if the expression could not be found. A use case may be +value shall be inserted if the expression could not be found. +

A similar mode is "ZERO" where the string "0" is returned. This is suitable +for numerical values. A use case may be that you record a traffic log based on firewall rules and the "bytes transmitted" counter is extracted via a regular expression. If no "bytes transmitted" counter is available in the current message, it is probably a good idea to return an empty string, which the @@ -23,6 +25,15 @@ it shall be logged. checker and generator to see these options in action. With that online tool, you can craft regular expressions based on samples and try out the different modes. +

Summary of nomatch Modes

+ + + + + + + +
ModeReturned
DFLT"**NO MATCH**"
BLANK"" (empty string)
ZERO"0"
FIELDfull content of original field
 Interactive Tool

[manual index] [rsyslog.conf] [rsyslog site]

-- cgit