Server logs

De Instituto de Física - UFRGS

Voltar para página Logs

Adicionar no /etc/rsyslog.conf:

$ModLoad imudp
$UDPServerRun 514
$ModLoad imrelp
$InputRELPServerRun 4567 # colocaando a porta para 4567
$template DynKern, "/var/log/%HOSTNAME%/kernel"
$template DynMsg, "/var/log/%HOSTNAME%/messages"
$template DynAuth, "/var/log/%HOSTNAME%/secure"
$template DynMail, "/var/log/%HOSTNAME%/mail"
kern.* ?DynKern
*.info;mail.none;news.none;authpriv.none ?DynMsg
authpriv.* ?DynAuth
mail.* ?DynMail

Editar Arquivo de inicialização /etc/init.d/rsyslog:

RSYSLOGD_OPTIONS="-r -c2"

reiniciar rsyslog

/etc/init.d/rsyslog restart

Fonte: http://hackbusters.blogspot.com/2009/07/gerenciando-logs-com-o-rsyslog.html