赞
踩
#### MODULES #### $ModLoad imuxsock # provides support for local system logging (e.g. via logger command) $ModLoad imjournal # provides access to the systemd journal #$ModLoad imklog # reads kernel messages (the same are read from journald) #$ModLoad immark # provides --MARK-- message capability #$ModLoad imudp #$UDPServerRun 514 #$ModLoad imtcp #$InputTCPServerRun 514 #### GLOBAL DIRECTIVES #### $WorkDirectory /var/lib/rsyslog $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat #$ActionFileEnableSync on $IncludeConfig /etc/rsyslog.d/*.conf $OmitLocalLogging on $IMJournalStateFile imjournal.state #### RULES #### #kern.* /dev/console *.info;mail.none;authpriv.none;cron.none /var/log/messages authpriv.* /var/log/secure mail.* /var/log/maillog cron.* /var/log/cron *.emerg :omusrmsg:* uucp,news.crit /var/log/spooler local7.* /var/log/boot.log
这是一个典型的 rsyslog 配置文件,其中包含了一些基本的配置项和规则。下面我将梳理一下其中的配置项
$ModLoad imuxsock
logger
命令记录的日志。$ModLoad imjournal
$WorkDirectory /var/lib/rsyslog
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。