|
| 1 | +# rsyslog configuration file |
| 2 | + |
| 3 | +# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html |
| 4 | +# If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html |
| 5 | + |
| 6 | +#### MODULES #### |
| 7 | + |
| 8 | +#$ModLoad imuxsock # provides support for local system logging (e.g. via logger command) |
| 9 | +# $ModLoad imjournal # provides access to the systemd journal |
| 10 | +$ModLoad imklog # provides kernel logging support (previously done by rklogd) |
| 11 | +#$ModLoad immark # provides --MARK-- message capability |
| 12 | +# OpenShift plugin module |
| 13 | +module(load="imuxsock" SysSock.Annotate="on" SysSock.ParseTrusted="on" SysSock.UsePIDFromSystem="on") |
| 14 | +module(load="mmopenshift") |
| 15 | + |
| 16 | +# Provides UDP syslog reception |
| 17 | +#$ModLoad imudp |
| 18 | +#$UDPServerRun 514 |
| 19 | + |
| 20 | +# Provides TCP syslog reception |
| 21 | +#$ModLoad imtcp |
| 22 | +#$InputTCPServerRun 514 |
| 23 | + |
| 24 | + |
| 25 | +#### GLOBAL DIRECTIVES #### |
| 26 | + |
| 27 | +# Use default timestamp format |
| 28 | +$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat |
| 29 | + |
| 30 | +# File syncing capability is disabled by default. This feature is usually not required, |
| 31 | +# not useful and an extreme performance hit |
| 32 | +#$ActionFileEnableSync on |
| 33 | + |
| 34 | +# Include all config files in /etc/rsyslog.d/ |
| 35 | +$IncludeConfig /etc/rsyslog.d/*.conf |
| 36 | + |
| 37 | + |
| 38 | +#### RULES #### |
| 39 | + |
| 40 | +# Log all kernel messages to the console. |
| 41 | +# Logging much else clutters up the screen. |
| 42 | +#kern.* /dev/console |
| 43 | + |
| 44 | +# Log anything (except mail) of level info or higher. |
| 45 | +# Don't log private authentication messages! |
| 46 | +*.info;mail.none;authpriv.none;cron.none /var/log/messages |
| 47 | + |
| 48 | +# The authpriv file has restricted access. |
| 49 | +authpriv.* /var/log/secure |
| 50 | + |
| 51 | +# Log all the mail messages in one place. |
| 52 | +mail.* -/var/log/maillog |
| 53 | + |
| 54 | + |
| 55 | +# Log cron stuff |
| 56 | +cron.* /var/log/cron |
| 57 | + |
| 58 | +# Everybody gets emergency messages |
| 59 | +*.emerg :omusrmsg:* |
| 60 | + |
| 61 | +# Save news errors of level crit and higher in a special file. |
| 62 | +uucp,news.crit /var/log/spooler |
| 63 | + |
| 64 | +# Save boot messages also to boot.log |
| 65 | +local7.* /var/log/boot.log |
| 66 | + |
| 67 | + |
| 68 | +# ### begin forwarding rule ### |
| 69 | +# The statement between the begin ... end define a SINGLE forwarding |
| 70 | +# rule. They belong together, do NOT split them. If you create multiple |
| 71 | +# forwarding rules, duplicate the whole block! |
| 72 | +# Remote Logging (we use TCP for reliable delivery) |
| 73 | +# |
| 74 | +# An on-disk queue is created for this action. If the remote host is |
| 75 | +# down, messages are spooled to disk and sent when it is up again. |
| 76 | +#$WorkDirectory /var/lib/rsyslog # where to place spool files |
| 77 | +#$ActionQueueFileName fwdRule1 # unique name prefix for spool files |
| 78 | +#$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible) |
| 79 | +#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown |
| 80 | +#$ActionQueueType LinkedList # run asynchronously |
| 81 | +#$ActionResumeRetryCount -1 # infinite retries if host is down |
| 82 | +# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional |
| 83 | +#*.* @@remote-host:514 |
| 84 | +# ### end of the forwarding rule ### |
0 commit comments