-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsyslog-ng.conf
53 lines (46 loc) · 1.19 KB
/
syslog-ng.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#############################################################################
# Default syslog-ng.conf file which collects all local logs into a
# single file called /var/log/messages tailored to container usage.
#
# The changes from the stock, default syslog-ng.conf file is that we've
# dropped the system() source that is not needed and that we enabled network
# connections using default-network-drivers(). Customize as needed and
# override using the -v option to docker, such as:
#
# docker run ... -v "$PWD/syslog-ng.conf":/etc/syslog-ng/syslog-ng.conf
#
@version: 3.13
#@include "scl.conf"
options {
# use_dns(no);
# use_fqdn (no);
keep_hostname(yes);
create_dirs(yes);
ts_format(iso);
time_reopen (10);
chain_hostnames (no);
};
source s_local {
internal();
};
source s_net {
tcp(
ip("0.0.0.0")
);
udp(
ip("0.0.0.0")
);
syslog(
ip("0.0.0.0")
);
unix-stream("/var/run/syslog-ng/syslog-ng.sock");
};
destination d_local {
file("/var/log/messages");
file("/var/log/messages-kv.log" template("$ISODATE $HOST $(format-welf --scope all-nv-pairs)\n") frac-digits(3));
};
log {
source(s_local);
source(s_net);
destination(d_local);
};