~ubuntu-branches/ubuntu/feisty/syslog-ng/feisty-security

« back to all changes in this revision

Viewing changes to doc/syslog-ng.conf.5

  • Committer: Bazaar Package Importer
  • Author(s): SZALAY Attila
  • Date: 2006-05-25 11:21:50 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20060525112150-b18srkxcrz980xi9
Tags: 1.9.11-1
* New upstream version
  - Fixed log facility and priority detecting. (Closes: #350120, #350344, #357071, #367256)
* Added bison to Build-Dependency. (Closes: #368765)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH syslog-ng.conf 5
2
 
.SH NAME
3
 
/etc/syslog-ng/syslog-ng.conf - syslog-ng configuration file
4
 
.SH DESCRIPTION
5
 
.PP
6
 
 
7
 
The configuration file for \fBsyslog-ng\fP
8
 
 
9
 
A message route in syslog-ng is made up from three parts: a source, 
10
 
a destination and filtering rules. 
11
 
 
12
 
.SH SOURCES
13
 
 
14
 
You can declare source statements using the "source" keyword:
15
 
 
16
 
source <sourcename> { sourcedriver params; sourcedriver params; ... };
17
 
 
18
 
Sourcename is an identifier you'll use to refer to this group of messages. 
19
 
Sourcedriver is a method of getting a given message. The following drivers 
20
 
are available:
21
 
 
22
 
* file <filename> - reads messages from the given file
23
 
 
24
 
* unix-dgram <filename> - reads messages from the given AF_UNIX, SOCK_DGRAM socket (BSDi style)
25
 
 
26
 
* unix-stream <filename> - reads messages from the given AF_UNIX, SOCK_STREAM socket (Linux style)
27
 
 
28
 
* udp <ip>,<port> - network source using the UDP protocol. If you do not want to bind to a specific interface use 0.0.0.0.
29
 
 
30
 
* tcp <ip>,<port> - network source using the TCP protocol.
31
 
 
32
 
* sun-streams <filename> - local source used on Solaris systems
33
 
 
34
 
.SH DESTINATIONS
35
 
 
36
 
Destinations can be created using the destination keyword:
37
 
 
38
 
destination <destname> { destdriver params; destdriver params; ... ; };
39
 
 
40
 
* file <filename> - writes messages to the given file
41
 
 
42
 
* unix-dgram <filename> - writes messages to the given AF_UNIX, SOCK_DGRAM socket (BSDi style)
43
 
 
44
 
* unix-stream <filename> - writes messages to the given AF_UNIX, SOCK_STREAM socket (Linux style)
45
 
 
46
 
* udp <ip>,<port> - network destination using the UDP protocol
47
 
 
48
 
* tcp <ip>,<port> - network destination using the TCP protocol
49
 
 
50
 
* usertty <username> - sends log to the given user's terminal
51
 
 
52
 
.SH FILTERS
53
 
 
54
 
You can create filters using the filter keyword:
55
 
 
56
 
filter <filtername> { expression; };
57
 
 
58
 
Where expression is a simple boolean expression. You can use "and", "or" 
59
 
and "not" to connect builtin functions. Functions can be one of:
60
 
 
61
 
* facility(list of comma seperated facility names)
62
 
 
63
 
* level(list of comma seperated priority nammes OR a range separated by "..")
64
 
 
65
 
* program(regexp to match program name)
66
 
 
67
 
* host(regexp to match hostname)
68
 
 
69
 
* match(regexp to match message)
70
 
 
71
 
.SH LOG STATEMENTS
72
 
 
73
 
You can connect sources and destinations using the log statement:
74
 
 
75
 
log { source S1; source S2; ... filter F1; filter F2; ... destination D1; destination D2; ... };
76
 
 
77
 
Where Sx refers to one of the declared log sources, Fx one of the filters and 
78
 
Dx one of the destinations.
79
 
 
80
 
Filters are ANDed together.
81
 
 
82
 
.SH OPTIONS
83
 
 
84
 
You can specify several global options to syslog-ng in the options statement:
85
 
 
86
 
options { opt1; opt2; ... };
87
 
 
88
 
Where an option can be any of the following:
89
 
 
90
 
 
91
 
.TP
92
 
.B chain_hostnames(yes|no)
93
 
Enable or disable the chained hostname format.
94
 
 
95
 
.TP
96
 
.B long_hostnames(yes|no)
97
 
This is a deprecated alias for chain_hostnames().
98
 
 
99
 
.TP
100
 
.B keep_hostname(yes|no)
101
 
Specifies whether to trust hostname as it is included in the log message. If
102
 
keep_hostname is yes and there is a hostname in the message it is not
103
 
touched, otherwise it is always rewritten based on the information where the
104
 
message was received from.
105
 
 
106
 
.TP
107
 
.B use_dns(yes|no)
108
 
Enable or disable DNS usage.  syslog-ng blocks on DNS queries, so
109
 
enabling DNS may lead to a Denial of Service attack.  To prevent DoS,
110
 
protect your syslog-ng network endpoint with firewall rules, and make
111
 
sure that all hosts, which may get to syslog-ng is resolvable.
112
 
 
113
 
.TP
114
 
.B use_fqdn(yes|no)
115
 
Add Fully Qualified Domain Name instead of short hostname.
116
 
 
117
 
.TP
118
 
.B check_hostname(yes|no)
119
 
Enable or disable whether the hostname contains valid characters.
120
 
 
121
 
.TP
122
 
.B bad_hostname(regex)
123
 
A regexp which matches hostnames which should not be taken as such.
124
 
 
125
 
.TP
126
 
.B dns_cache(yes|no)
127
 
Enable or disable DNS cache usage.
128
 
 
129
 
.TP
130
 
.B dns_cache_expire(n)
131
 
Number of seconds while a successful lookup is cached.
132
 
 
133
 
.TP
134
 
.B dns_cache_expire_failed(n)
135
 
Number of seconds while a failed lookup is cached.
136
 
 
137
 
.TP
138
 
.B dns_cache_size(n)
139
 
Number of hostnames in the DNS cache.
140
 
 
141
 
.TP
142
 
.B create_dirs(yes|no)
143
 
Enable or disable directory creation for destination files.
144
 
 
145
 
.TP
146
 
.B dir_owner(uid)
147
 
User id.
148
 
 
149
 
.TP
150
 
.B dir_group(gid)
151
 
Group id.
152
 
 
153
 
.TP
154
 
.B dir_perm(perm)
155
 
Permission value (octal mask).
156
 
 
157
 
.TP
158
 
.B owner(uid)
159
 
User id for created files.
160
 
 
161
 
.TP
162
 
.B group(gid)
163
 
Group id for created files.
164
 
 
165
 
.TP
166
 
.B perm(perm)
167
 
Permission value for created files.
168
 
 
169
 
.TP
170
 
.B gc_busy_threshold(n)
171
 
Sets the threshold value for the garbage collector, when syslog-ng is
172
 
busy.  GC phase starts when the number of allocated objects reach this
173
 
number.  Default: 3000.
174
 
 
175
 
.TP
176
 
.B gc_idle_threshold(n)
177
 
Sets the threshold value for the garbage collector, when syslog-ng is
178
 
idle.  GC phase starts when the number of allocated objects reach this
179
 
number.  Default: 100.
180
 
 
181
 
.TP
182
 
.B log_fifo_size(n)
183
 
The number of lines fitting to the output queue. An output queue is present
184
 
for all destinations.
185
 
 
186
 
.TP
187
 
.B log_msg_size(n)
188
 
Maximum length of message in bytes (NOTE: some syslogd implementations have
189
 
a fixed limit of 1024 characters).
190
 
 
191
 
.TP
192
 
.B mark(n)
193
 
The number of seconds between two MARK lines.
194
 
NOTE: not implemented yet.
195
 
 
196
 
.TP
197
 
.B stats(n)
198
 
The number of seconds between two STATS messages.
199
 
 
200
 
.TP
201
 
.B sync(n)
202
 
The number of lines buffered before written to file
203
 
(can be overridden locally).
204
 
 
205
 
.TP
206
 
.B time_reap(n)
207
 
The time to wait before an idle destination file is closed.
208
 
 
209
 
.TP
210
 
.B time_reopen(n)
211
 
The time to wait before a died connection is reestablished.
212
 
 
213
 
.TP
214
 
.B use_time_recvd(yes|no)
215
 
This variable is used only for macro expansion where the meaning of the time
216
 
specific macros depend on this setting, however as there are separate macros
217
 
for referring to the received timestamp (R_ macros) and the log message timestamp (S_),
218
 
so using this value is not recommended.
219
 
 
220
 
.SH FILES
221
 
/etc/syslog-ng/syslog-ng.conf
222
 
.SH COPYRIGHT
223
 
syslog-ng and this file is Copyright (c) 1999-2004 BalaBit IT Ltd, portions
224
 
were contributed by Jose Pedro Oliveira.
225
 
 
226
 
.SH SEE ALSO
227
 
syslog-ng(8), syslogd(8)
228