-
Notifications
You must be signed in to change notification settings - Fork 0
/
rsyslog.conf
98 lines (84 loc) · 2.66 KB
/
rsyslog.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
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
$ModLoad imuxsock.so
$ModLoad imklog.so
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
# Set the default permissions for all log files.
#
$FileOwner root
$FileGroup adm
$FileCreateMode 0640
$DirCreateMode 0755
$Umask 0022
# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.* /dev/console
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
#*.info;mail.none;authpriv.none;cron.none /var/log/messages
if \
$source == 'localhost' \
and \
$syslogseverity <= '6' \
and ( \
$syslogfacility-text != 'mail' \
and \
$syslogfacility-text != 'authpriv' \
and \
$syslogfacility-text != 'cron' \
) \
then /var/log/messages
# The authpriv file has restricted access.
#authpriv.* /var/log/secure
if \
$source == 'localhost' \
and \
$syslogfacility-text == 'authpriv' \
then /var/log/secure
# Log all the mail messages in one place.
#mail.* -/var/log/maillog
if \
$source == 'localhost' \
and \
$syslogfacility-text == 'mail' \
then -/var/log/maillog
# Log cron stuff
#cron.* /var/log/cron
if \
$source == 'localhost' \
and \
$syslogfacility-text == 'cron' \
then /var/log/cron
# Everybody gets emergency messages
#*.emerg *
if \
$source == 'localhost' \
and \
$syslogseverity-text == 'emerg' \
then *
# Save news errors of level crit and higher in a special file.
#uucp,news.crit /var/log/spooler
if \
$source == 'localhost' \
and \
(\
$syslogfacility-text == 'uucp' \
or \
$syslogfacility-text == 'news' \
)\
and \
$syslogseverity-text == 'crit' \
then /var/log/spooler
# Save boot messages also to boot.log
#local7.* /var/log/boot.log
if \
$source == 'localhost' \
and \
$syslogfacility-text == 'local7' \
then /var/log/boot.log
# Remote logging
$ModLoad imudp
$UDPServerAddress 0.0.0.0
$UDPServerRun 514
$template DYNremote,"/var/log/remote/%HOSTNAME%/today.log"
if \
$source != 'localhost' \
then ?DYNremote