2025-02-20 14:55:47 +01:00
|
|
|
# Local udp/tcp syslog configuration managed by Puppet (soc::rsyslog)
|
2025-02-20 13:49:00 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
<% if @udp_port -%>
|
|
|
|
module(load="imudp")
|
|
|
|
input(type="imudp" port="<%= @udp_port %>")
|
|
|
|
<% end -%>
|
|
|
|
|
|
|
|
<% if @tcp_port -%>
|
|
|
|
module(load="imtcp")
|
|
|
|
input(type="imtcp" port="<%= @tcp_port %>")
|
|
|
|
<% end -%>
|
2025-02-20 14:19:17 +01:00
|
|
|
|
|
|
|
<% if @relp_port -%>
|
|
|
|
module(load="imrelp")
|
|
|
|
input(
|
|
|
|
type="imrelp"
|
2025-02-21 11:08:53 +01:00
|
|
|
port="<%= @relp_port %>"
|
2025-02-20 14:19:17 +01:00
|
|
|
maxDataSize="10k"
|
2025-02-21 11:08:53 +01:00
|
|
|
oversizeMode="truncate")
|
2025-02-20 14:19:17 +01:00
|
|
|
<% end -%>
|
2025-02-21 12:13:48 +01:00
|
|
|
|
|
|
|
# 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
|
|
|
|
& ~
|