logcheck: Add some more dovecot ignore patterns.
[matthijs/servers/drsnuggles.git] / etc / rsyslog.conf
1 #  /etc/rsyslog.conf    Configuration file for rsyslog v3.
2 #
3 #                       For more information see 
4 #                       /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html
5
6
7 #################
8 #### MODULES ####
9 #################
10
11 $ModLoad imuxsock # provides support for local system logging
12 $ModLoad immark   # provides --MARK-- message capability
13 $MarkMessagePeriod  900 # mark messages appear every 15 Minutes
14 $ModLoad imtcp
15 $InputTCPServerRun 514 # Accept TCP connections on the default syslog port
16
17 ###########################
18 #### GLOBAL DIRECTIVES ####
19 ###########################
20
21 #
22 # Use traditional timestamp format.
23 # To enable high precision timestamps, comment out the following line.
24 #
25 $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
26
27 #
28 # Set the default permissions for all log files.
29 #
30 $FileOwner root
31 $FileGroup adm
32 $FileCreateMode 0640
33 $DirCreateMode 0755
34
35 # Store any queues here. This directory is not created automatically, so it
36 # must already exist!
37 $WorkDirectory /var/spool/rsyslog
38
39 # Use a (disk-assisted) main queue
40 # Use a linked list for queueing
41 $MainMsgQueueType LinkedList
42 # Name to use for the queue file
43 $MainMsgQueueFileName main
44 # save in-memory data if rsyslog shuts down
45 $MainMsgQueueSaveOnShutdown on
46
47 #
48 # Include all config files in /etc/rsyslog.d/
49 #
50 $IncludeConfig /etc/rsyslog.d/*.conf
51
52 ########################
53 #### Remote logging ####
54 ########################
55
56 # Log lines received from other servers (as well as our own logs) centrally.
57 $template HostFacilityLog,"/data/log/rsyslog/hosts/%fromhost%/facilities/%syslogfacility-text%.log"
58 $template HostSeverityLog,"/data/log/rsyslog/hosts/%fromhost%/severities/%syslogseverity-text%.log"
59 $template HostAppLog,"/data/log/rsyslog/hosts/%fromhost%/apps/%app-name%.log"
60
61 # Use a verbose logging format
62 $template LogFormat, "%TIMESTAMP:::date-rfc3339% %HOSTNAME% %syslogtag% %syslogfacility-text%.%syslogseverity-text%%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\n"
63
64 # Log by facility, severity and appname
65 *.*                             ?HostFacilityLog;LogFormat
66 *.*                             ?HostSeverityLog;LogFormat
67 *.*                             ?HostAppLog;LogFormat
68 # Log all entries in a single file, which is meant to be parsed by logcheck
69 # (hence the traditional format).
70 *.*                             -/data/log/rsyslog/all.log;RSYSLOG_TraditionalFileFormat
71
72 # Debugging format. Based on RSYSLOG_DebugFormat, available in later versions
73 # of rsyslogd, with some variations.
74 $template DebugFormat,"Debug line with all properties:\nFROMHOST: '%FROMHOST%', HOSTNAME: '%HOSTNAME%', PRI: %PRI%,\nsyslogtag '%syslogtag%', programname: '%programname%', APP-NAME: '%APP-NAME%', PROCID: '%PROCID%', MSGID: '%MSGID%',\nTIMESTAMP: '%TIMESTAMP%', STRUCTURED-DATA: '%STRUCTURED-DATA%', syslogtag: '%syslogtag%'\nmsg: '%msg%'\nescaped msg: '%msg:::drop-cc%'\nrawmsg: '%rawmsg%'\n\n"
75 # Uncomment this to have detailed logging for debugging
76 #*.*                            -/data/log/rsyslog/debug.log;DebugFormat
77
78
79 #######################
80 #### Local logging ####
81 #######################
82
83 # Discard all log entries not locally generated. Newer versions of rsyslogd
84 # have the $fromhost-ip property which can be checked against 127.0.0.1, which
85 # is probably slightly more reliable, but this will work for now.
86 if $fromhost != 'log' then ~
87
88 # Log each facility into its own log
89 auth,authpriv.*                 /var/log/rsyslog/auth.log
90 cron.*                          -/var/log/rsyslog/user.log
91 daemon.*                        -/var/log/rsyslog/daemon.log
92 kern.*                          -/var/log/rsyslog/kern.log
93 lpr.*                           -/var/log/rsyslog/lpr.log
94 mail.*                          -/var/log/rsyslog/mail.log
95 user.*                          -/var/log/rsyslog/user.log
96 local0,local1,local2,\
97         local3,local4,local5,\
98         local6,local7.*         -/var/log/rsyslog/local.log
99
100 # Omitted facilities: syslog, news, uucp, ftp
101
102 # All logs end up in syslog as weel as the corresponding facility log above
103 # (except for auth, mail which only end up in the facility log for privacy
104 # reasons and debug which only ends up in the debug log below to prevent
105 # flooding).
106 *.*;\
107         *.!=debug;\
108         auth,authpriv.none;\
109         mail.none               -/var/log/rsyslog/syslog
110
111 # Debug entries end up in debug.log as well as the corresponding facility log
112 # above (except for auth and mail, which only end up in the facility logs for
113 # privacy reasons).
114 *.=debug;\
115         auth,authpriv.none;\
116         news.none;mail.none     -/var/log/rsyslog/debug.log
117 #
118 # Emergencies are sent to everybody logged in.
119 #
120 *.emerg                         *