Sunday, September 30, 2012

Separating logs per hostname on a Central rsyslog server

Under /etc/rsyslog.conf append


$FileCreateMode 0655
$DirCreateMode 0755
$Umask 0022

$template default,"/srv/logs/%HOSTNAME%/%$now%.log"
*.* ?default


this will create directories under /srv/logs//*.logs with Directory permission of 755 and file permission of 655

No comments: