1 | @version:3.24
|
---|
2 | @include "scl.conf"
|
---|
3 |
|
---|
4 | options {
|
---|
5 | chain_hostnames(off); keep-timestamp(yes); keep-hostname(yes);
|
---|
6 | threaded(yes); time_reopen(5); use-dns(no); dns-cache(no);
|
---|
7 | };
|
---|
8 |
|
---|
9 | # mikrotik-syslog
|
---|
10 | # network(ip("0.0.0.0") port(20514) transport(udp));
|
---|
11 | source mikrotiksyslog {
|
---|
12 | syslog(ip("0.0.0.0") port(20514) transport(udp));
|
---|
13 | };
|
---|
14 |
|
---|
15 | # dhcp
|
---|
16 | source dhcpsyslog {
|
---|
17 | network(ip("0.0.0.0") port(20515) transport(udp));
|
---|
18 | };
|
---|
19 |
|
---|
20 | # dhcp
|
---|
21 | source dhcpsyslog6 {
|
---|
22 | network(ip("0.0.0.0") port(20516) transport(udp));
|
---|
23 | };
|
---|
24 |
|
---|
25 | source s_local { internal(); };
|
---|
26 |
|
---|
27 | filter f_dhcp_msg {
|
---|
28 | message("PORTAXLEASEACK");
|
---|
29 | };
|
---|
30 |
|
---|
31 | destination d_dhcp {
|
---|
32 | file("/var/log/dhcpd.log" perm(0644));
|
---|
33 | };
|
---|
34 |
|
---|
35 | destination d_dhcp6_file {
|
---|
36 | file("/var/log/dhcpd6.log" perm(0644));
|
---|
37 | };
|
---|
38 |
|
---|
39 | destination d_dhcp6 {
|
---|
40 | network("127.0.0.1" port(5143) transport(udp));
|
---|
41 | };
|
---|
42 |
|
---|
43 | destination d_local {
|
---|
44 | file("/var/log/syslog-ng.log");
|
---|
45 | };
|
---|
46 |
|
---|
47 | destination d_portax_mt {
|
---|
48 | network("127.0.0.1" port(5141) transport(udp) spoof-source(yes));
|
---|
49 | };
|
---|
50 |
|
---|
51 | destination d_portax_dhcp6_redis {
|
---|
52 | redis(
|
---|
53 | host("127.0.0.1")
|
---|
54 | persist-name("redis-dhcp6")
|
---|
55 | command("RPUSH", "dhcp6syslog", "${S_DATE}|${SOURCEIP}|${HOST}|${MSGHDR}${MESSAGE}")
|
---|
56 | );
|
---|
57 | };
|
---|
58 |
|
---|
59 | log {
|
---|
60 | source(mikrotiksyslog);
|
---|
61 | destination(d_portax_mt_redis);
|
---|
62 | };
|
---|
63 |
|
---|
64 | log {
|
---|
65 | source(dhcpsyslog); filter(f_dhcp_msg); destination(d_dhcp);
|
---|
66 | };
|
---|
67 |
|
---|
68 | log {
|
---|
69 | source(dhcpsyslog6); filter(f_dhcp_msg);
|
---|
70 | destination(d_dhcp6_file);
|
---|
71 | destination(d_portax_dhcp6_redis);
|
---|
72 | };
|
---|
73 |
|
---|