File: syslog-ng.conf

package info (click to toggle)
syslog-ng 4.8.1-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 20,456 kB
  • sloc: ansic: 177,631; python: 13,035; cpp: 11,611; makefile: 7,012; sh: 5,147; java: 3,651; xml: 3,344; yacc: 1,377; lex: 599; perl: 193; awk: 190; objc: 162
file content (126 lines) | stat: -rw-r--r-- 4,386 bytes parent folder | download | duplicates (2)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# syslog-ng configuration file for OpenBSD.
# This should provide behavior similar to OpenBSD's syslog.conf(5).
# 2021-05-24 millert@openbsd.org

@version: 4.8
@requires openbsd

options { 
	use_dns(no);
	dns_cache(no);
	create_dirs(no);
	keep_hostname(yes);
};

source s_local {
	openbsd();
	unix-dgram ("/dev/log");
	internal();
};

#source s_net {
#	udp(port(514));
#};

destination d_console	{ file("/dev/console");		};
destination d_messages	{ file("/var/log/messages" owner(root) group(wheel) perm(0644));	};
destination d_authlog	{ file("/var/log/authlog" owner(root) group(wheel) perm(0640));	};
destination d_secure	{ file("/var/log/secure" owner(root) group(wheel) perm(0600));	};
destination d_cronlog	{ file("/var/cron/log" owner(root) group(wheel) perm(0600));	};
destination d_daemon	{ file("/var/log/daemon" owner(root) group(wheel) perm(0640));	};
destination d_xferlog	{ file("/var/log/xferlog" owner(root) group(wheel) perm(0640));	};
destination d_lpderrs	{ file("/var/log/lpd-errs" owner(root) group(wheel) perm(0640));	};
destination d_maillog	{ file("/var/log/maillog" owner(root) group(wheel) perm(0600));	};
destination d_doaslog	{ file("/var/log/doas");	};
destination d_ttyall	{ usertty("*");			};
destination d_ttyroot	{ usertty("root");		};
destination d_loghost	{ udp("loghost" port(514));	};

filter f_notice {
	level(notice .. emerg)
	and not(facility(auth,authpriv,cron,ftp,kern,lpr,mail,user));
};
filter f_kerndebug {
	level(debug .. emerg) and facility(kern);
};
filter f_msginfo {
	level(info .. emerg) and facility(syslog,user);
};
filter f_authinfo {
	level(info .. emerg) and facility(auth);
};
filter f_authprivdebug {
	level(debug .. emerg) and facility(authpriv);
};
filter f_croninfo {
	level(info .. emerg) and facility(cron);
};
filter f_daemoninfo {
	level(info .. emerg) and facility(daemon);
};
filter f_ftpinfo {
	level(info .. emerg) and facility(ftp);
};
filter f_lprdebug {
	level(debug .. emerg) and facility(lpr);
};
filter f_mailinfo {
	level(info .. emerg) and facility(mail);
};
filter f_emerg {
	level(emerg);
};
filter f_to_console {
	not (facility(authpriv)) and
	((level(notice .. emerg) and facility(auth))
	or (level(debug .. emerg) and facility(kern))
	or (level(crit .. emerg) and facility(mail))
	or level(err .. emerg));
};
filter f_to_root {
	(level(debug .. emerg) and facility(auth))
	or (level(notice .. emerg));
};
filter f_to_loghost {
	(level(notice .. emerg) and
	  not (facility(auth,authpriv,cron,ftp,kern,lpr,mail,user)))
	or (level(info .. emerg) and facility(auth,daemon,syslog,user))
	or (level(debug .. emerg) and facility(authpriv,kern));
};
filter f_prog_doas {
	program("doas");
};

log { source(s_local); filter(f_notice);	destination(d_messages);};
log { source(s_local); filter(f_kerndebug);	destination(d_messages);};
log { source(s_local); filter(f_msginfo);	destination(d_messages);};
log { source(s_local); filter(f_authinfo);	destination(d_authlog);	};
log { source(s_local); filter(f_authprivdebug);	destination(d_secure);	};
log { source(s_local); filter(f_croninfo);	destination(d_cronlog);	};
log { source(s_local); filter(f_daemoninfo);	destination(d_daemon);	};
log { source(s_local); filter(f_ftpinfo);	destination(d_xferlog);	};
log { source(s_local); filter(f_lprdebug);	destination(d_lpderrs);	};
log { source(s_local); filter(f_mailinfo);	destination(d_maillog);	};

# Uncomment this line to send "important" messages to the system
# console: be aware that this could create lots of output.
#log { source(s_local); filter(f_to_console);	destination(d_console);	};

# Uncomment this to have all messages of notice level and higher
# as well as all authentication messages sent to root.
#log { source(s_local); filter(f_to_root);	destination(d_ttyroot);	};

# Uncomment if you want everyone to get emergency messages.
#log { source(s_local); filter(f_emerg);	destination(d_ttyall);	};

# Uncomment to log to a central host named "loghost".
#log { source(s_local); filter(f_to_loghost);	destination(d_loghost);	};

# Uncomment to log messages from doas(1) to its own log file.  Matches are done
# based on the program name.
# Program-specific logs:
#log { source(s_local); filter(f_prog_doas);	destination(d_doaslog);	};

# Uncomment to log messages from the network.
# Note: it is recommended to specify a different destination here.
#log { source(s_net); destination(d_messages); };