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

By penoi on Sunday, September 30, 2012 | A comment?
0 responses to “Separating logs per hostname on a Central rsyslog server”