Skip to content

Commit c160757

Browse files
committed
Improved syslog
Add marker for configuration Add filter for auth messages
1 parent 6310ce1 commit c160757

File tree

13 files changed

+480
-138
lines changed

13 files changed

+480
-138
lines changed
Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,48 @@
11
@version: 3.5
22

3-
template t_isostamp { template("[SYSLOG] $MSGHDR$MSG\n"); };
4-
5-
options { file-template(t_isostamp); };
3+
template t_isostamp {
4+
# syslog-t_isostamp START
5+
template("[SYSLOG] $MSGHDR$MSG\n");
6+
# syslog-t_isostamp END
7+
};
68

7-
options { chain_hostnames(off); flush_lines(0); use_dns(no); use_fqdn(no);
8-
owner("root"); group("adm"); perm(0640); stats_freq(0);
9-
bad_hostname("^gconfd$");
9+
options {
10+
# syslog-options START
11+
file-template(t_isostamp);
12+
chain_hostnames(off);
13+
flush_lines(0);
14+
use-dns(no);
15+
use_fqdn(no);
16+
owner("root");
17+
group("adm");
18+
perm(0640);
19+
stats_freq(0);
20+
# syslog-options START
1021
};
1122

1223
source s_src {
13-
unix-stream("/dev/log");
14-
internal();
24+
# syslog-s_src START
25+
unix-stream("/dev/log");
26+
internal();
27+
# syslog-s_src END
28+
};
29+
30+
filter f_filter {
31+
# syslog-f_filter START
32+
not facility(auth, authpriv);
33+
# syslog-f_filter END
1534
};
1635

17-
destination d_all { pipe("/docker.stdout"); };
18-
log { source(s_src); destination(d_all); };
36+
destination d_all {
37+
# syslog-d_all START
38+
file("/docker.stdout");
39+
# syslog-d_all END
40+
};
41+
42+
log {
43+
# syslog-log START
44+
source(s_src);
45+
filter(f_filter);
46+
destination(d_all);
47+
# syslog-log START
48+
};
Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,48 @@
11
@version: 3.5
22

3-
template t_isostamp { template("[SYSLOG] $MSGHDR$MSG\n"); };
4-
5-
options { file-template(t_isostamp); };
3+
template t_isostamp {
4+
# syslog-t_isostamp START
5+
template("[SYSLOG] $MSGHDR$MSG\n");
6+
# syslog-t_isostamp END
7+
};
68

7-
options { chain_hostnames(off); flush_lines(0); use_dns(no); use_fqdn(no);
8-
owner("root"); group("adm"); perm(0640); stats_freq(0);
9-
bad_hostname("^gconfd$");
9+
options {
10+
# syslog-options START
11+
file-template(t_isostamp);
12+
chain_hostnames(off);
13+
flush_lines(0);
14+
use-dns(no);
15+
use_fqdn(no);
16+
owner("root");
17+
group("adm");
18+
perm(0640);
19+
stats_freq(0);
20+
# syslog-options START
1021
};
1122

1223
source s_src {
13-
unix-stream("/dev/log");
14-
internal();
24+
# syslog-s_src START
25+
unix-stream("/dev/log");
26+
internal();
27+
# syslog-s_src END
28+
};
29+
30+
filter f_filter {
31+
# syslog-f_filter START
32+
not facility(auth, authpriv);
33+
# syslog-f_filter END
1534
};
1635

17-
destination d_all { pipe("/docker.stdout"); };
18-
log { source(s_src); destination(d_all); };
36+
destination d_all {
37+
# syslog-d_all START
38+
file("/docker.stdout");
39+
# syslog-d_all END
40+
};
41+
42+
log {
43+
# syslog-log START
44+
source(s_src);
45+
filter(f_filter);
46+
destination(d_all);
47+
# syslog-log START
48+
};
Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,48 @@
11
@version: 3.5
22

3-
template t_isostamp { template("[SYSLOG] $MSGHDR$MSG\n"); };
4-
5-
options { file-template(t_isostamp); };
3+
template t_isostamp {
4+
# syslog-t_isostamp START
5+
template("[SYSLOG] $MSGHDR$MSG\n");
6+
# syslog-t_isostamp END
7+
};
68

7-
options { chain_hostnames(off); flush_lines(0); use_dns(no); use_fqdn(no);
8-
owner("root"); group("adm"); perm(0640); stats_freq(0);
9-
bad_hostname("^gconfd$");
9+
options {
10+
# syslog-options START
11+
file-template(t_isostamp);
12+
chain_hostnames(off);
13+
flush_lines(0);
14+
use-dns(no);
15+
use_fqdn(no);
16+
owner("root");
17+
group("adm");
18+
perm(0640);
19+
stats_freq(0);
20+
# syslog-options START
1021
};
1122

1223
source s_src {
13-
unix-stream("/dev/log");
14-
internal();
24+
# syslog-s_src START
25+
unix-stream("/dev/log");
26+
internal();
27+
# syslog-s_src END
28+
};
29+
30+
filter f_filter {
31+
# syslog-f_filter START
32+
not facility(auth, authpriv);
33+
# syslog-f_filter END
1534
};
1635

17-
destination d_all { pipe("/docker.stdout"); };
18-
log { source(s_src); destination(d_all); };
36+
destination d_all {
37+
# syslog-d_all START
38+
file("/docker.stdout");
39+
# syslog-d_all END
40+
};
41+
42+
log {
43+
# syslog-log START
44+
source(s_src);
45+
filter(f_filter);
46+
destination(d_all);
47+
# syslog-log START
48+
};
Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,48 @@
11
@version: 3.5
22

3-
template t_isostamp { template("[SYSLOG] $MSGHDR$MSG\n"); };
4-
5-
options { file-template(t_isostamp); };
3+
template t_isostamp {
4+
# syslog-t_isostamp START
5+
template("[SYSLOG] $MSGHDR$MSG\n");
6+
# syslog-t_isostamp END
7+
};
68

7-
options { chain_hostnames(off); flush_lines(0); use_dns(no); use_fqdn(no);
8-
owner("root"); group("adm"); perm(0640); stats_freq(0);
9-
bad_hostname("^gconfd$");
9+
options {
10+
# syslog-options START
11+
file-template(t_isostamp);
12+
chain_hostnames(off);
13+
flush_lines(0);
14+
use-dns(no);
15+
use_fqdn(no);
16+
owner("root");
17+
group("adm");
18+
perm(0640);
19+
stats_freq(0);
20+
# syslog-options START
1021
};
1122

1223
source s_src {
13-
unix-stream("/dev/log");
14-
internal();
24+
# syslog-s_src START
25+
unix-stream("/dev/log");
26+
internal();
27+
# syslog-s_src END
28+
};
29+
30+
filter f_filter {
31+
# syslog-f_filter START
32+
not facility(auth, authpriv);
33+
# syslog-f_filter END
1534
};
1635

17-
destination d_all { pipe("/docker.stdout"); };
18-
log { source(s_src); destination(d_all); };
36+
destination d_all {
37+
# syslog-d_all START
38+
file("/docker.stdout");
39+
# syslog-d_all END
40+
};
41+
42+
log {
43+
# syslog-log START
44+
source(s_src);
45+
filter(f_filter);
46+
destination(d_all);
47+
# syslog-log START
48+
};
Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,48 @@
11
@version: 3.5
22

3-
template t_isostamp { template("[SYSLOG] $MSGHDR$MSG\n"); };
4-
5-
options { file-template(t_isostamp); };
3+
template t_isostamp {
4+
# syslog-t_isostamp START
5+
template("[SYSLOG] $MSGHDR$MSG\n");
6+
# syslog-t_isostamp END
7+
};
68

7-
options { chain_hostnames(off); flush_lines(0); use_dns(no); use_fqdn(no);
8-
owner("root"); group("adm"); perm(0640); stats_freq(0);
9-
bad_hostname("^gconfd$");
9+
options {
10+
# syslog-options START
11+
file-template(t_isostamp);
12+
chain_hostnames(off);
13+
flush_lines(0);
14+
use-dns(no);
15+
use_fqdn(no);
16+
owner("root");
17+
group("adm");
18+
perm(0640);
19+
stats_freq(0);
20+
# syslog-options START
1021
};
1122

1223
source s_src {
13-
unix-stream("/dev/log");
14-
internal();
24+
# syslog-s_src START
25+
unix-stream("/dev/log");
26+
internal();
27+
# syslog-s_src END
28+
};
29+
30+
filter f_filter {
31+
# syslog-f_filter START
32+
not facility(auth, authpriv);
33+
# syslog-f_filter END
1534
};
1635

17-
destination d_all { pipe("/docker.stdout"); };
18-
log { source(s_src); destination(d_all); };
36+
destination d_all {
37+
# syslog-d_all START
38+
file("/docker.stdout");
39+
# syslog-d_all END
40+
};
41+
42+
log {
43+
# syslog-log START
44+
source(s_src);
45+
filter(f_filter);
46+
destination(d_all);
47+
# syslog-log START
48+
};
Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,48 @@
11
@version: 3.5
22

3-
template t_isostamp { template("[SYSLOG] $MSGHDR$MSG\n"); };
4-
5-
options { file-template(t_isostamp); };
3+
template t_isostamp {
4+
# syslog-t_isostamp START
5+
template("[SYSLOG] $MSGHDR$MSG\n");
6+
# syslog-t_isostamp END
7+
};
68

7-
options { chain_hostnames(off); flush_lines(0); use_dns(no); use_fqdn(no);
8-
owner("root"); group("adm"); perm(0640); stats_freq(0);
9-
bad_hostname("^gconfd$");
9+
options {
10+
# syslog-options START
11+
file-template(t_isostamp);
12+
chain_hostnames(off);
13+
flush_lines(0);
14+
use-dns(no);
15+
use_fqdn(no);
16+
owner("root");
17+
group("adm");
18+
perm(0640);
19+
stats_freq(0);
20+
# syslog-options START
1021
};
1122

1223
source s_src {
13-
unix-stream("/dev/log");
14-
internal();
24+
# syslog-s_src START
25+
unix-stream("/dev/log");
26+
internal();
27+
# syslog-s_src END
28+
};
29+
30+
filter f_filter {
31+
# syslog-f_filter START
32+
not facility(auth, authpriv);
33+
# syslog-f_filter END
1534
};
1635

17-
destination d_all { pipe("/docker.stdout"); };
18-
log { source(s_src); destination(d_all); };
36+
destination d_all {
37+
# syslog-d_all START
38+
file("/docker.stdout");
39+
# syslog-d_all END
40+
};
41+
42+
log {
43+
# syslog-log START
44+
source(s_src);
45+
filter(f_filter);
46+
destination(d_all);
47+
# syslog-log START
48+
};

0 commit comments

Comments
 (0)