ca7b0972a82c566839d33ac762be914efd3d6b47
[feed/packages.git] / admin / syslog-ng / files / syslog-ng.conf
1 # Collect all local logs into a single file /var/log/messages.
2 # See https://www.syslog-ng.com/technical-documents/list/syslog-ng-open-source-edition
3
4 @version: 4.6
5 @include "scl.conf"
6
7 options {
8 chain_hostnames(no); # Enable or disable the chained hostname format.
9 create_dirs(yes);
10 keep_hostname(yes); # Enable or disable hostname rewriting.
11 log_fifo_size(256); # The number of messages that the output queue can store.
12 log_msg_size(1024); # Maximum length of a message in bytes.
13 stats(freq(0)); # The period between two STATS messages (sent by syslog-ng, containing statistics about dropped logs) in seconds.
14 flush_lines(0); # How many lines are flushed to a destination at a time.
15 use_fqdn(no); # Add Fully Qualified Domain Name instead of short hostname.
16 };
17
18 # syslog-ng gets messages from syslog-ng (internal) and from /dev/log
19
20 source src {
21 internal();
22 unix-dgram("/dev/log");
23 };
24
25 source net {
26 network_localhost();
27 };
28
29 source s_network {
30 default-network-drivers(
31 # NOTE: TLS support
32 #
33 # the default-network-drivers() source driver opens the TLS
34 # enabled ports as well, however without an actual key/cert
35 # pair they will not operate and syslog-ng would display a
36 # warning at startup.
37 #
38 #tls(key-file("/path/to/ssl-private-key") cert-file("/path/to/ssl-cert"))
39 );
40 };
41
42 source kernel {
43 file("/proc/kmsg" program_override("kernel"));
44 };
45
46 destination messages {
47 file("/var/log/messages");
48 };
49
50 log {
51 source(src);
52 source(net);
53 source(kernel);
54 destination(messages);
55
56 # uncomment this line to open port 514 to receive messages
57 #source(s_network);
58 };
59
60 # Include any user settings last so that s/he can override or
61 # supplement all "canned" settings inherited from the distribution.
62 @include "/etc/syslog-ng.d/" # Put any customization files in this directory