rsyslog server: add rule to log each host to it's own logfile

This commit is contained in:
Johan Björklund 2025-02-21 12:13:48 +01:00
parent a9ac62d9e2
commit 43bebb8332
Signed by: bjorklund
GPG key ID: 5E8401339C7F5037

View file

@ -19,3 +19,9 @@ input(
maxDataSize="10k"
oversizeMode="truncate")
<% end -%>
# Split remote hosts to separate logs for easier reading
# make sure local logs still are sent to default files
$template RemoteHost,"/var/log/remote/%HOSTNAME%/syslog.log
if ($fromhost-ip != "127.0.0.1") then ?RemoteHost
& ~