GNU/Linux |
Debian 6.0.0(Squeeze) |
|
![]() |
syslog-ng.conf(5) |
![]() |
syslog-ng.conf - syslog-ng configuration file
syslog−ng.conf |
NOTE: This manual page covers both editions of syslog−ng: syslog−ng Open Source Edition and the commercial syslog−ng Premium Edition. Features that are only included in the Premium Edition are marked with an asterisk (*). For details, see the official syslog−ng website: http://www.balabit.com/network−security/syslog−ng/.
This manual
page is only an abstract; for the complete documentation of
syslog−ng, see
The syslog−ng Administrator Guide [1].
The syslog−ng application is a flexible and highly scalable system logging application. Typically, syslog−ng is used to manage log messages and implement centralized logging, where the aim is to collect the log messages of several devices on a single, central log server. The different devices − called syslog−ng clients − all run syslog−ng, and collect the log messages from the various applications, files, and other sources. The clients send all important log messages to the remote syslog−ng server, where the server sorts and stores them.
The syslog−ng application reads incoming messages and forwards them to the selected destinations. The syslog−ng application can receive messages from files, remote hosts, and other sources.
Log messages enter syslog−ng in one of the defined sources, and are sent to one or more destinations.
Sources and destinations are independent objects; log paths define what syslog−ng does with a message, connecting the sources to the destinations. A log path consists of one or more sources and one or more destinations; messages arriving to a source are sent to every destination listed in the log path. A log path defined in syslog−ng is called a log statement.
Optionally, log paths can include filters. Filters are rules that select only certain messages, for example, selecting only messages sent by a specific application. If a log path includes filters, syslog−ng sends only the messages satisfying the filter rules to the destinations set in the log path.
Global objects (e.g., sources, destinations, log paths, or filters) are defined in the syslog−ng configuration file. Object definitions consist of the following elements:
• Type of the object: One of source, destination, log, filter, parser, rewrite rule, or template.
• Identifier of the object: A unique name identifying the object. When using a reserved word as an identifier, enclose the identifier in quotation marks.
Tip
Use identifiers that refer to the type of the object they
identify. For example, prefix source objects with s_,
destinations with d_, and so on.
• Parameters: The parameters of the object, enclosed in braces {parameters}.
• Semicolon: Object definitions end with a semicolon (;).
The syntax is summarized as follows:
The syntax of log statements is as follows:
log {
source(s1); source(s2); ...
optional_element(filter1|parser1|rewrite1);
optional_element(filter2|parser2|rewrite2);...
destination(d1); destination(d2); ...
flags(flag1[, flag2...]);
};
The following log statement sends all messages arriving to the localhost to a remote server.
source
s_localhost { tcp(ip(127.0.0.1) port(1999) ); };
destination d_tcp { tcp("10.1.2.3" port(1999);
localport(999)); };
log { source(s_localhost); destination(d_tcp); };
The syslog−ng application has a number of global options governing DNS usage, the timestamp format used, and other general points. Each option may have parameters, similarly to driver specifications. To set global options, add an option statement to the syslog−ng configuration file using the following syntax:
options { option1(params); option2(params); ... };
The sources,
destinations, and filters available in syslog−ng are
listed below. For details, see
The syslog−ng Administrator Guide [1].
Table 1. Source drivers available in syslog-ng
Table 2. Destination drivers available in syslog-ng
Table 3. Filter functions in syslog-ng
/opt/syslog−ng/etc/syslog−ng/
/opt/syslog−ng/etc/syslog−ng/syslog−ng.conf
syslog−ng(8)
The syslog−ng Administrator Guide [1]
If you
experience any problems or need help with syslog−ng,
visit the
syslog−ng mailing list [2]
For news and notifications about the documentation of syslog−ng, visit the BalaBit Documentation Blog[3].
This manual page was written by the BalaBit Documentation Team <documentation@balabit.com>.
Copyright © 2000−2009 BalaBit IT Security Ltd. Published under the Creative Commons Attribution−Noncommercial−No Derivative Works (by−nc−nd) 3.0 license. See http://creativecommons.org/ for details. The latest version is always available at http://www.balabit.com/support/documentation.
1. |
The syslog-ng Administrator Guide |
http://www.balabit.com/support/documentation/
2. |
syslog-ng mailing list |
https://lists.balabit.hu/mailman/listinfo/syslog-ng
3. |
BalaBit Documentation Blog |
http://robert.blogs.balabit.com
![]() |
syslog-ng.conf(5) | ![]() |