|
| 1 | +############################################################################### |
| 2 | +# Managed by Ansible |
| 3 | +# file: ansible/roles/acs/templates/rsyslog.conf.j2 |
| 4 | +############################################################################### |
| 5 | +# |
| 6 | +# /etc/rsyslog.conf Configuration file for rsyslog. |
| 7 | +# |
| 8 | +# For more information see |
| 9 | +# /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html |
| 10 | + |
| 11 | + |
| 12 | +################# |
| 13 | +#### MODULES #### |
| 14 | +################# |
| 15 | + |
| 16 | +$ModLoad imuxsock # provides support for local system logging |
| 17 | +#$ModLoad imklog # provides kernel logging support |
| 18 | +#$ModLoad immark # provides --MARK-- message capability |
| 19 | + |
| 20 | +# provides UDP syslog reception |
| 21 | +#$ModLoad imudp |
| 22 | +#$UDPServerRun 514 |
| 23 | + |
| 24 | +# provides TCP syslog reception |
| 25 | +#$ModLoad imtcp |
| 26 | +#$InputTCPServerRun 514 |
| 27 | + |
| 28 | + |
| 29 | +########################### |
| 30 | +#### GLOBAL DIRECTIVES #### |
| 31 | +########################### |
| 32 | +#Set remote syslog server |
| 33 | +*.* @127.0.0.1:514 |
| 34 | + |
| 35 | +# |
| 36 | +# Use traditional timestamp format. |
| 37 | +# To enable high precision timestamps, comment out the following line. |
| 38 | +# |
| 39 | +#$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat |
| 40 | + |
| 41 | +# Define a custom template |
| 42 | +$template ACSFileFormat,"%TIMESTAMP% %HOSTNAME% %syslogseverity-text:::uppercase% %syslogtag%%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\n" |
| 43 | +$ActionFileDefaultTemplate ACSFileFormat |
| 44 | + |
| 45 | +# |
| 46 | +# Set the default permissions for all log files. |
| 47 | +# |
| 48 | +$FileOwner root |
| 49 | +$FileGroup adm |
| 50 | +$FileCreateMode 0640 |
| 51 | +$DirCreateMode 0755 |
| 52 | +$Umask 0022 |
| 53 | + |
| 54 | +# |
| 55 | +# Where to place spool and state files |
| 56 | +# |
| 57 | +$WorkDirectory /var/spool/rsyslog |
| 58 | + |
| 59 | +# |
| 60 | +# Include all config files in /etc/rsyslog.d/ |
| 61 | +# |
| 62 | +$IncludeConfig /etc/rsyslog.d/*.conf |
| 63 | + |
| 64 | + |
| 65 | +############### |
| 66 | +#### RULES #### |
| 67 | +############### |
| 68 | + |
0 commit comments