~ubuntu-branches/ubuntu/lucid/rsyslog/lucid-updates

« back to all changes in this revision

Viewing changes to doc/rsyslog_conf_nomatch.html

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2009-06-23 12:12:43 UTC
  • mfrom: (1.1.11 upstream) (3.2.8 sid)
  • Revision ID: james.westby@ubuntu.com-20090623121243-d2fejarzidywnn17
Tags: 4.2.0-1
* New upstream release of the now stable v4 branch.
  - Fix warnings when /etc/rsyslog.d/ is empty. Closes: #530228
* debian/patches/imudp_multiple_udp_sockets.patch
  - Removed, merged upstream.
* debian/rsyslog.default
  - Set default compat mode to '4'.
* debian/rsyslog.logcheck.ignore.server
  - Update logcheck rules files to also ignore rsyslogd and imklog stop
    messages.
* debian/control
  - Bump Standards-Version to 3.8.2. No further changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
2
<html><head><title>nomatch mode - property replacer - rsyslog.conf</title></head>
 
3
<body>
 
4
<h1>nomatch mode - property replacer - rsyslog.con</h1>
 
5
<p>This is a part of the <a href="rsyslog_conf.html">rsyslog.conf documentation</a>
 
6
of the <a href="property_replacer.html">property replacer</a>.</p>
 
7
<p><b>The "nomatch-Mode" specifies which string the property replacer
 
8
shall return if a regular expression did not find the search string.</b>. Traditionally,
 
9
the string "**NO MATCH**" was returned, but many people complained this was almost never useful.
 
10
Still, this mode is support as "<b>DFLT</b>" for legacy configurations.
 
11
<p>Three additional and potentially useful modes exist: in one (<b>BLANK</b>) a blank string
 
12
is returned. This is probably useful for inserting values into databases where no
 
13
value shall be inserted if the expression could not be found.
 
14
<p>A similar mode is "<b>ZERO</b>" where the string "0" is returned. This is suitable
 
15
for numerical values. A use case may be
 
16
that you record a traffic log based on firewall rules and the "bytes transmitted" counter
 
17
is extracted via a regular expression. If no "bytes transmitted" counter is available
 
18
in the current message, it is probably a good idea to return an empty string, which the
 
19
database layer can turn into a zero.
 
20
<p>The other mode is "<b>FIELD</b>", in which the complete field is returned. This may be useful
 
21
in cases where absense of a match is considered a failure and the message that triggered
 
22
it shall be logged.
 
23
<p>If in doubt, <b>it is highly suggested to use the
 
24
<a href="http://www.rsyslog.com/tool-regex">rsyslog online regular expression
 
25
checker and generator</a> to see these options in action</b>. With that online tool,
 
26
you can craft regular expressions based on samples and try out the different modes.
 
27
 
 
28
<h2>Summary of nomatch Modes</h2>
 
29
<table border="1" cellspacing="0">
 
30
<tr><td><b>Mode</b></td><td><b>Returned</b></td></tr>
 
31
<tr><td>DFLT</td><td>"**NO MATCH**"</td></tr>
 
32
<tr><td>BLANK</td><td>"" (empty string)</td></tr>
 
33
<tr><td>ZERO</td><td>"0"</td></tr>
 
34
<tr><td>FIELD</td><td>full content of original field</td></tr>
 
35
<tr><td>&nbsp;</td><td><a href="http://www.rsyslog.com/tool-regex">Interactive Tool</a></td></tr>
 
36
</table>
 
37
<p>[<a href="manual.html">manual index</a>]
 
38
[<a href="rsyslog_conf.html">rsyslog.conf</a>]
 
39
[<a href="http://www.rsyslog.com/">rsyslog site</a>]</p>
 
40
<p><font size="2">This documentation is part of the
 
41
<a href="http://www.rsyslog.com/">rsyslog</a> project.<br>
 
42
Copyright &copy; 2008 by <a href="http://www.gerhards.net/rainer">Rainer Gerhards</a> and
 
43
<a href="http://www.adiscon.com/">Adiscon</a>. Released under the GNU GPL
 
44
version 2 or higher.</font></p>
 
45
</body>
 
46
</html>
 
47
 
 
48