Инструменты пользователя

Инструменты сайта


linux:rsyslog

Работа с rsyslog

Обычный конфиг

Обычный, но слегка модифицированный конфиг

# Вываливаем все на консоль
*.*         /dev/tty12;RSYSLOG_TraditionalFileFormat
 
#iptables
:msg, contains, "DROP1"                 /var/log/firewall/drop.log;RSYSLOG_TraditionalFileFormat
& ~
:msg, contains, "REJECT1"                       /var/log/firewall/reject.log;RSYSLOG_TraditionalFileFormat
& ~
 
# сообщения ядра в kernel
kern.*                  /var/log/kernel;RSYSLOG_TraditionalFileFormat
& ~
# Логи упса
:programname, isequal, "upsmon"                         /var/log/ups/upsmon.log;RSYSLOG_TraditionalFileFormat
& ~
# Логи демона упса
:programname, isequal, "upsd"                   /var/log/ups/upsd.log;RSYSLOG_TraditionalFileFormat
& ~
:programname, isequal, "megatec"                        /var/log/ups/upsdriver.log;RSYSLOG_TraditionalFileFormat
& ~
# OpenVPN
:programname, isequal, "openvpn"                        /var/log/openvpn.log;RSYSLOG_TraditionalFileFormat
& ~
 
:programname, isequal, "freshclam"                      /var/log/clamav/freshclam.log;RSYSLOG_TraditionalFileFormat
& ~
:programname, isequal, "clamd"                  /var/log/clamav/clamd.log;RSYSLOG_TraditionalFileFormat
& ~
:programname, isequal, "MailScanner"                    /var/log/mailscanner.log;RSYSLOG_TraditionalFileFormat
& ~
*.info;mail.none;authpriv.none;cron.none                        /var/log/messages;RSYSLOG_TraditionalFileFormat
& ~
 
auth,authpriv.*                 /var/log/secure.log;RSYSLOG_TraditionalFileFormat
& ~
 
mail.*                  /var/log/mail.log;RSYSLOG_TraditionalFileFormat
& ~
 
cron.*                  /var/log/cron;RSYSLOG_TraditionalFileFormat
& ~
 
daemon.*                        /var/log/daemon;RSYSLOG_TraditionalFileFormat
& ~
 
user.*                  /var/log/user.log;RSYSLOG_TraditionalFileFormat
& ~
 
#Display using wall to all logged in users
*.emerg *
& ~
 
uucp,news.crit                  /var/log/spooler;RSYSLOG_TraditionalFileFormat
& ~
 
#Finally log everything else
*.*                     /var/log/uncategorized.log;RSYSLOG_TraditionalFileFormat
linux/rsyslog.txt · Последнее изменение: 2011/10/26 09:59 — linko22@gmail.com