I am trying to get remote devices to into separate log files and not in the main syslog file.
I have created a filter for remote devices to go to a separate file per host, but still remote devices log contents end up in main syslog. I've tried both
& ~ and
Common problem but can't find a working answer. rsyslog 5.8.6 (Ubuntu 12 LTS)
$template PerHostLog,"/var/log/external/%HOSTNAME%.log" if $fromhost-ip != '127.0.0.1' then -?PerHostLog #& ~ & stop
All other files are the same, except for changes to
/etc/rsyslog.conf to enable remote logging.
My files per host do have contents, but they are also still coming into the main syslog file.
Whats the best way to adjust either configuration or filter to make sure they stay in the separate files, and not in the syslog file.
Any ideas what I'm doing wrong?