The filename in rsyslog can be either static or dynamic. The later is useful if you would automatically split messages into different files based on some message criteria. I need split logs depend on IP -like: 10.10.10.10.log Why doesn't it work? Can I use something different to create it? Maybe python/bash script?
My config file look like this: [rsyslog v5]
#### RULES ####
local6,local5.* /var/log/systems/device-all.log
<=15.info;mail.none;authpriv.none;cron.none /var/log/messages
authpriv.* /var/log/secure
mail.* -/var/log/maillog
cron.* /var/log/cron
*.emerg *
uucp,news.crit /var/log/spooler
local7.* /var/log/boot.log
$template DynamicFile,"/var/log/systems/host-%HOSTNAME%.log"
*.* -?DynamicFile
local6,local5.* /var/log/systems/device-all.log