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

« back to all changes in this revision

Viewing changes to doc/rsyslog_conf_global.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>Global Directives - rsyslog.conf</title></head>
 
3
<body>
 
4
<p>This is a part of the rsyslog.conf documentation.</p>
 
5
<a href="rsyslog_conf.html">back</a>
 
6
<h2>Global Directives</h2>
 
7
<p>All global directives need to be specified on a line by their
 
8
own and must start with a dollar-sign. Here is a list in alphabetical
 
9
order. Follow links for a description.</p>
 
10
<p>Please note that not all directives here are actually global. Some affect
 
11
only the next action. This documentation will be changed soon.
 
12
<p>Not all directives have an in-depth description right now.
 
13
Default values for them are in bold. A more in-depth description will
 
14
appear as implementation progresses.
 
15
</p>
 
16
<p><b>Be sure to read information about <a href="queues.html">queues in rsyslog</a></b> -
 
17
many parameter settings modify queue parameters. If in doubt, use the
 
18
default, it is usually well-chosen and applicable in most cases.</p>
 
19
<ul>
 
20
<li><a href="rsconf1_actionexeconlywhenpreviousissuspended.html">$ActionExecOnlyWhenPreviousIsSuspended</a></li>
 
21
<li>$ActionExecOnlyOnceEveryInterval &lt;seconds&gt; -
 
22
execute action only if the last execute is at last
 
23
&lt;seconds&gt; seconds in the past (more info in <a href="ommail.html">ommail</a>,
 
24
but may be used with any action)</li>
 
25
<li><i><b>$ActionExecOnlyEveryNthTime</b> &lt;number&gt;</i> - If configured, the next action will
 
26
only be executed every n-th time. For example, if configured to 3, the first two messages
 
27
that go into the action will be dropped, the 3rd will actually cause the action to execute,
 
28
the 4th and 5th will be dropped, the 6th executed under the action, ... and so on. Note:
 
29
this setting is automatically re-set when the actual action is defined.</li>
 
30
<li><i><b>$ActionExecOnlyEveryNthTimeTimeout</b> &lt;number-of-seconds&gt;</i> - has a meaning only if
 
31
$ActionExecOnlyEveryNthTime is also configured for the same action. If so, the timeout
 
32
setting specifies after which period the counting of "previous actions" expires and
 
33
a new action count is begun. Specify 0 (the default) to disable timeouts.
 
34
<br>
 
35
<i>Why is this option needed?</i> Consider this case: a message comes in at, eg., 10am. That's
 
36
count 1. Then, nothing happens for the next 10 hours. At 8pm, the next
 
37
one occurs. That's count 2. Another 5 hours later, the next message
 
38
occurs, bringing the total count to 3. Thus, this message now triggers
 
39
the rule.
 
40
<br>
 
41
The question is if this is desired behavior? Or should the rule only be
 
42
triggered if the messages occur within an e.g. 20 minute window? If the
 
43
later is the case, you need a
 
44
<br>
 
45
$ActionExecOnlyEveryNthTimeTimeout 1200
 
46
<br>
 
47
This directive will timeout previous messages seen if they are older
 
48
than 20 minutes. In the example above, the count would now be always 1
 
49
and consequently no rule would ever be triggered.
 
50
 
 
51
<li>$ActionFileDefaultTemplate [templateName] - sets a new default template for file actions</li>
 
52
<li>$ActionFileEnableSync [on/<span style="font-weight: bold;">off</span>] - enables file
 
53
syncing capability of omfile</li>
 
54
<li>$ActionForwardDefaultTemplate [templateName] - sets a new
 
55
default template for UDP and plain TCP forwarding action</li>
 
56
<li>$ActionGSSForwardDefaultTemplate [templateName] - sets a
 
57
new default template for GSS-API forwarding action</li>
 
58
<li>$ActionQueueCheckpointInterval &lt;number&gt;</li>
 
59
<li>$ActionQueueDequeueSlowdown &lt;number&gt; [number
 
60
is timeout in <i> micro</i>seconds (1000000us is 1sec!),
 
61
default 0 (no delay). Simple rate-limiting!]</li>
 
62
<li>$ActionQueueDiscardMark &lt;number&gt; [default
 
63
9750]</li>
 
64
<li>$ActionQueueDiscardSeverity &lt;number&gt;
 
65
[*numerical* severity! default 4 (warning)]</li>
 
66
<li>$ActionQueueFileName &lt;name&gt;</li>
 
67
<li>$ActionQueueHighWaterMark &lt;number&gt; [default
 
68
8000]</li>
 
69
<li>$ActionQueueImmediateShutdown [on/<b>off</b>]</li>
 
70
<li>$ActionQueueSize &lt;number&gt;</li>
 
71
<li>$ActionQueueLowWaterMark &lt;number&gt; [default
 
72
2000]</li>
 
73
<li>$ActionQueueMaxFileSize &lt;size_nbr&gt;, default 1m</li>
 
74
<li>$ActionQueueTimeoutActionCompletion &lt;number&gt;
 
75
[number is timeout in ms (1000ms is 1sec!), default 1000, 0 means
 
76
immediate!]</li>
 
77
<li>$ActionQueueTimeoutEnqueue &lt;number&gt; [number
 
78
is timeout in ms (1000ms is 1sec!), default 2000, 0 means indefinite]</li>
 
79
<li>$ActionQueueTimeoutShutdown &lt;number&gt; [number
 
80
is timeout in ms (1000ms is 1sec!), default 0 (indefinite)]</li>
 
81
<li>$ActionQueueWorkerTimeoutThreadShutdown
 
82
&lt;number&gt; [number is timeout in ms (1000ms is 1sec!),
 
83
default 60000 (1 minute)]</li>
 
84
<li>$ActionQueueType [FixedArray/LinkedList/<b>Direct</b>/Disk]</li>
 
85
<li>$ActionQueueSaveOnShutdown&nbsp; [on/<b>off</b>]
 
86
</li>
 
87
<li>$ActionQueueWorkerThreads &lt;number&gt;, num worker threads, default 1, recommended 1</li>
 
88
<li>$ActionQueueWorkerThreadMinumumMessages &lt;number&gt;, default 100</li>
 
89
<li><a href="rsconf1_actionresumeinterval.html">$ActionResumeInterval</a></li>
 
90
<li>$ActionResumeRetryCount &lt;number&gt; [default 0, -1 means eternal]</li>
 
91
<li>$ActionSendResendLastMsgOnReconn &lt;[on/<b>off</b>]&gt; specifies if the last message is to be resend when a connecition broken and has been reconnedcted. May increase reliability, but comes at the risk of message duplication.
 
92
<li>$ActionSendStreamDriver &lt;driver basename&gt; just like $DefaultNetstreamDriver, but for the specific action
 
93
</li><li>$ActionSendStreamDriverMode &lt;mode&gt;, default 0, mode to use with the stream driver
 
94
(driver-specific)</li><li>$ActionSendStreamDriverAuthMode &lt;mode&gt;,&nbsp; authentication mode to use with the stream driver
 
95
(driver-specific)</li><li>$ActionSendStreamDriverPermittedPeer &lt;ID&gt;,&nbsp; accepted fingerprint (SHA1) or name of remote peer
 
96
(driver-specific) -<span style="font-weight: bold;"> directive may go away</span>!</li>
 
97
<li><a href="rsconf1_allowedsender.html">$AllowedSender</a></li>
 
98
<li><a href="rsconf1_controlcharacterescapeprefix.html">$ControlCharacterEscapePrefix</a></li>
 
99
<li><a href="rsconf1_debugprintcfsyslinehandlerlist.html">$DebugPrintCFSyslineHandlerList</a></li>
 
100
 
 
101
<li><a href="rsconf1_debugprintmodulelist.html">$DebugPrintModuleList</a></li>
 
102
<li><a href="rsconf1_debugprinttemplatelist.html">$DebugPrintTemplateList</a></li>
 
103
<li>$DefaultNetstreamDriver &lt;drivername&gt;, the default <a href="netstream.html">network stream driver</a> to use. Defaults to&nbsp;ptcp.$DefaultNetstreamDriverCAFile &lt;/path/to/cafile.pem&gt;</li>
 
104
<li>$DefaultNetstreamDriverCertFile &lt;/path/to/certfile.pem&gt;</li>
 
105
<li>$DefaultNetstreamDriverKeyFile &lt;/path/to/keyfile.pem&gt;</li>
 
106
<li><b>$CreateDirs</b> [<b>on</b>/off] - create directories on an as-needed basis</li>
 
107
<li><a href="rsconf1_dircreatemode.html">$DirCreateMode</a></li>
 
108
<li><a href="rsconf1_dirgroup.html">$DirGroup</a></li>
 
109
<li><a href="rsconf1_dirowner.html">$DirOwner</a></li>
 
110
<li><a href="rsconf1_dropmsgswithmaliciousdnsptrrecords.html">$DropMsgsWithMaliciousDnsPTRRecords</a></li>
 
111
<li><a href="rsconf1_droptrailinglfonreception.html">$DropTrailingLFOnReception</a></li>
 
112
<li><a href="rsconf1_dynafilecachesize.html">$DynaFileCacheSize</a></li>
 
113
<li><a href="rsconf1_escapecontrolcharactersonreceive.html">$EscapeControlCharactersOnReceive</a></li>
 
114
<li>$ErrorMessagesToStderr [<b>on</b>|off] - direct rsyslogd error message to stderr (in addition to other targets)</li>
 
115
<li><a href="rsconf1_failonchownfailure.html">$FailOnChownFailure</a></li>
 
116
<li><a href="rsconf1_filecreatemode.html">$FileCreateMode</a></li>
 
117
<li><a href="rsconf1_filegroup.html">$FileGroup</a></li>
 
118
<li><a href="rsconf1_fileowner.html">$FileOwner</a></li>
 
119
<li><a href="rsconf1_gssforwardservicename.html">$GssForwardServiceName</a></li>
 
120
<li><a href="rsconf1_gsslistenservicename.html">$GssListenServiceName</a></li>
 
121
<li><a href="rsconf1_gssmode.html">$GssMode</a></li>
 
122
<li>$HUPisRestart [<b>on</b>/off] - if set to on, a HUP is a full daemon restart. This means any queued messages are discarded (depending
 
123
on queue configuration, of course) all modules are unloaded and reloaded. This mode keeps compatible with sysklogd, but is
 
124
not recommended for use with rsyslog. To do a full restart, simply stop and start the daemon. The default is "on" for
 
125
compatibility reasons. If it is set to "off", a HUP will only close open files. This is a much quicker action and usually
 
126
the only one that is needed e.g. for log rotation. <b>It is recommended to set the setting to "off".</b></li>
 
127
<li><a href="rsconf1_includeconfig.html">$IncludeConfig</a></li><li>MainMsgQueueCheckpointInterval &lt;number&gt;</li>
 
128
<li>$MainMsgQueueDequeueSlowdown &lt;number&gt; [number
 
129
is timeout in <i> micro</i>seconds (1000000us is 1sec!),
 
130
default 0 (no delay). Simple rate-limiting!]</li>
 
131
<li>$MainMsgQueueDiscardMark &lt;number&gt; [default 9750]</li>
 
132
<li>$MainMsgQueueDiscardSeverity &lt;severity&gt;
 
133
[either a textual or numerical severity! default 4 (warning)]</li>
 
134
<li>$MainMsgQueueFileName &lt;name&gt;</li>
 
135
<li>$MainMsgQueueHighWaterMark &lt;number&gt; [default
 
136
8000]</li>
 
137
<li>$MainMsgQueueImmediateShutdown [on/<b>off</b>]</li>
 
138
<li><a href="rsconf1_mainmsgqueuesize.html">$MainMsgQueueSize</a></li>
 
139
<li>$MainMsgQueueLowWaterMark &lt;number&gt; [default
 
140
2000]</li>
 
141
<li>$MainMsgQueueMaxFileSize &lt;size_nbr&gt;, default
 
142
1m</li>
 
143
<li>$MainMsgQueueTimeoutActionCompletion
 
144
&lt;number&gt; [number is timeout in ms (1000ms is 1sec!),
 
145
default
 
146
1000, 0 means immediate!]</li>
 
147
<li>$MainMsgQueueTimeoutEnqueue &lt;number&gt; [number
 
148
is timeout in ms (1000ms is 1sec!), default 2000, 0 means indefinite]</li>
 
149
<li>$MainMsgQueueTimeoutShutdown &lt;number&gt; [number
 
150
is timeout in ms (1000ms is 1sec!), default 0 (indefinite)]</li>
 
151
<li>$MainMsgQueueWorkerTimeoutThreadShutdown
 
152
&lt;number&gt; [number is timeout in ms (1000ms is 1sec!),
 
153
default 60000 (1 minute)]</li>
 
154
<li>$MainMsgQueueType [<b>FixedArray</b>/LinkedList/Direct/Disk]</li>
 
155
<li>$MainMsgQueueSaveOnShutdown&nbsp; [on/<b>off</b>]
 
156
</li>
 
157
<li>$MainMsgQueueWorkerThreads &lt;number&gt;, num
 
158
worker threads, default 1, recommended 1</li>
 
159
<li>$MainMsgQueueWorkerThreadMinumumMessages &lt;number&gt;, default 100</li>
 
160
<li><a href="rsconf1_markmessageperiod.html">$MarkMessagePeriod</a> (immark)</li>
 
161
<li><b><i>$MaxMessageSize</i></b> &lt;size_nbr&gt;, default 2k - allows to specify maximum supported message size
 
162
(both for sending and receiving). The default
 
163
should be sufficient for almost all cases. Do not set this below 1k, as it would cause
 
164
interoperability problems with other syslog implementations.<br>
 
165
Change the setting to e.g. 32768 if you would like to
 
166
support large message sizes for IHE (32k is the current maximum
 
167
needed for IHE). I was initially tempted to set the default to 32k,
 
168
but there is a some memory footprint with the current
 
169
implementation in rsyslog.
 
170
<br>If you intend to receive Windows Event Log data (e.g. via
 
171
<a href="http://www.eventreporter.com/">EventReporter</a>), you might want to
 
172
increase this number to an even higher value, as event
 
173
log messages can be very lengthy ("$MaxMessageSize 64k" is not a bad idea).
 
174
Note: testing showed that 4k seems to be
 
175
the typical maximum for <b>UDP</b> based syslog. This is an IP stack
 
176
restriction. Not always ... but very often. If you go beyond
 
177
that value, be sure to test that rsyslogd actually does what
 
178
you think it should do ;) It is highly suggested to use a TCP based transport
 
179
instead of UDP (plain TCP syslog, RELP). This resolves the UDP stack size restrictions.
 
180
<br>Note that 2k, the current default, is the smallest size that must be
 
181
supported in order to be compliant to the upcoming new syslog RFC series.
 
182
</li>
 
183
<li><a href="rsconf1_moddir.html">$ModDir</a></li>
 
184
<li><a href="rsconf1_modload.html">$ModLoad</a></li>
 
185
<li><b>$RepeatedMsgContainsOriginalMsg</b> [on/<b>off</b>] - "last message repeated n times" messages, if generated,
 
186
have a different format that contains the message that is being repeated.
 
187
Note that only the first "n" characters are included, with n to be at least 80 characters, most
 
188
probably more (this may change from version to version, thus no specific limit is given). The bottom
 
189
line is that n is large enough to get a good idea which message was repeated but it is not necessarily
 
190
large enough for the whole message. (Introduced with 4.1.5). Once set, it affects all following actions.</li>
 
191
<li><a href="rsconf1_repeatedmsgreduction.html">$RepeatedMsgReduction</a></li>
 
192
<li><a href="rsconf1_resetconfigvariables.html">$ResetConfigVariables</a></li>
 
193
<li><b>$OptimizeForUniprocessor</b> [on/<b>off</b>] - turns on optimizatons which lead to better
 
194
performance on uniprocessors. If you run on multicore-machiens, turning this off lessens CPU load. The
 
195
default may change as uniprocessor systems become less common.</li>
 
196
<li>$PreserveFQDN [on/<b>off</b>) - if set to off (legacy default to remain compatible
 
197
to sysklogd), the domain part from a name that is within the same domain as the receiving
 
198
system is stripped. If set to on, full names are always used.</li>
 
199
<li>$WorkDirectory &lt;name&gt; (directory for spool and other work files)</li>
 
200
<li>$UDPServerAddress &lt;IP&gt; (imudp) -- local IP
 
201
address (or name) the UDP listens should bind to</li>
 
202
<li>$UDPServerRun &lt;port&gt; (imudp) -- former
 
203
-r&lt;port&gt; option, default 514, start UDP server on this
 
204
port, "*" means all addresses</li>
 
205
<li>$UDPServerTimeRequery &lt;nbr-of-times&gt; (imudp) -- this is a performance
 
206
optimization. Getting the system time is very costly. With this setting, imudp can
 
207
be instructed to obtain the precise time only once every n-times. This logic is
 
208
only activated if messages come in at a very fast rate, so doing less frequent
 
209
time calls should usually be acceptable. The default value is two, because we have
 
210
seen that even without optimization the kernel often returns twice the identical time.
 
211
You can set this value as high as you like, but do so at your own risk. The higher
 
212
the value, the less precise the timestamp.
 
213
<li><a href="droppriv.html">$PrivDropToGroup</a></li>
 
214
<li><a href="droppriv.html">$PrivDropToGroupID</a></li>
 
215
<li><a href="droppriv.html">$PrivDropToUser</a></li>
 
216
<li><a href="droppriv.html">$PrivDropToUserID</a></li>
 
217
</ul>
 
218
<li><a href="rsconf1_umask.html">$UMASK</a></li>
 
219
</ul>
 
220
<p><b>Where &lt;size_nbr&gt; is specified above,</b>
 
221
modifiers can be used after the number part. For example, 1k means
 
222
1024. Supported are k(ilo), m(ega), g(iga), t(era), p(eta) and e(xa).
 
223
Lower case letters refer to the traditional binary defintion (e.g. 1m
 
224
equals 1,048,576) whereas upper case letters refer to their new
 
225
1000-based definition (e.g 1M equals 1,000,000).</p>
 
226
<p>Numbers may include '.' and ',' for readability. So you can
 
227
for example specify either "1000" or "1,000" with the same result.
 
228
Please note that rsyslogd simply ignores the punctuation. Form it's
 
229
point of view, "1,,0.0.,.,0" also has the value 1000. </p>
 
230
 
 
231
<p>[<a href="manual.html">manual index</a>]
 
232
[<a href="rsyslog_conf.html">rsyslog.conf</a>]
 
233
[<a href="http://www.rsyslog.com/">rsyslog site</a>]</p>
 
234
<p><font size="2">This documentation is part of the
 
235
<a href="http://www.rsyslog.com/">rsyslog</a> project.<br>
 
236
Copyright &copy; 2008, 2009 by <a href="http://www.gerhards.net/rainer">Rainer Gerhards</a> and
 
237
<a href="http://www.adiscon.com/">Adiscon</a>. Released under the GNU GPL
 
238
version 2 or higher.</font></p>
 
239
</body>
 
240
</html>
 
241
 
 
242