Installation: syslog-ng.conf

File syslog-ng.conf, 1.4 KB (added by mirek@…, 4 years ago)

syslog-ng config

Line 
1@version:3.24
2@include "scl.conf"
3
4options {
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));
11source mikrotiksyslog {
12 syslog(ip("0.0.0.0") port(20514) transport(udp));
13 };
14
15# dhcp
16source dhcpsyslog {
17 network(ip("0.0.0.0") port(20515) transport(udp));
18 };
19
20# dhcp
21source dhcpsyslog6 {
22 network(ip("0.0.0.0") port(20516) transport(udp));
23 };
24
25source s_local { internal(); };
26
27filter f_dhcp_msg {
28 message("PORTAXLEASEACK");
29 };
30
31destination d_dhcp {
32 file("/var/log/dhcpd.log" perm(0644));
33};
34
35destination d_dhcp6_file {
36 file("/var/log/dhcpd6.log" perm(0644));
37};
38
39destination d_dhcp6 {
40 network("127.0.0.1" port(5143) transport(udp));
41};
42
43destination d_local {
44 file("/var/log/syslog-ng.log");
45};
46
47destination d_portax_mt {
48 network("127.0.0.1" port(5141) transport(udp) spoof-source(yes));
49};
50
51destination 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
59log {
60 source(mikrotiksyslog);
61 destination(d_portax_mt_redis);
62};
63
64log {
65 source(dhcpsyslog); filter(f_dhcp_msg); destination(d_dhcp);
66};
67
68log {
69 source(dhcpsyslog6); filter(f_dhcp_msg);
70 destination(d_dhcp6_file);
71 destination(d_portax_dhcp6_redis);
72};
73