-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrsyslog.conf
61 lines (48 loc) · 1.5 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
#################
#### MODULES ####
#################
module(load="imuxsock") # provides support for local system logging
# provide UDP syslog reception
module(load="imudp")
input(type="imudp" port="514")
# provide TCP syslog reception
module(load="imtcp")
input(type="imtcp" port="514")
###########################
#### GLOBAL DIRECTIVES ####
###########################
#
# Use traditional timestamp format.
#
# $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
# Custom timestamp format with year
# To switch back to traditional timestamp format, comment out the following two lines
# and uncomment the above RSYSLOG_TraditionalFileFormat line.
# To enable high precision timestamps, comment out the following two lines.
#
$template CustomTemplate, "%timereported:1:3:% %timereported:::date-day% %timereported:::date-year% %timereported:::date-hour%:%timereported:::date-minute%:%timereported:::date-second% %HOSTNAME% %msg%\n"
$ActionFileDefaultTemplate CustomTemplate
# Filter duplicated messages
$RepeatedMsgReduction on
#
# Set the default permissions for all log files.
#
$FileOwner root
$FileGroup root
$FileCreateMode 0644
$DirCreateMode 0755
$Umask 0022
$PrivDropToUser root
$PrivDropToGroup root
#
# Where to place spool and state files
#
$WorkDirectory /var/spool
#
# Include all config files in /etc/rsyslog.d/
#
$IncludeConfig /etc/rsyslog.d/*.conf
$template TmplMsg, "/var/log/%HOSTNAME%/all.log"
$template TmplErrMsg, "/var/log/%HOSTNAME%/errors.log"
local0.* ?TmplMsg
local0.3 ?TmplErrMsg