2019-05-08 14:51:56 +03:00
|
|
|
template(name="RemoteForwardFormat" type="list") {
|
|
|
|
constant(value="<")
|
|
|
|
property(name="pri")
|
|
|
|
constant(value=">")
|
|
|
|
property(name="timestamp" dateFormat="rfc3339")
|
|
|
|
constant(value=" ")
|
|
|
|
property(name="hostname")
|
|
|
|
constant(value=" ")
|
|
|
|
property(name="syslogtag")
|
|
|
|
property(name="msg" spifno1stsp="on")
|
|
|
|
property(name="msg")
|
|
|
|
}
|
|
|
|
|
2019-07-09 18:00:12 +03:00
|
|
|
if $programname startswith 'docker' then {
|
2019-05-08 14:51:56 +03:00
|
|
|
action(
|
|
|
|
type="omfwd"
|
|
|
|
protocol="{{ syslog_server_port.split(":")[0] }}"
|
|
|
|
target="{{ (syslog_server_port.split(":")[1])[2:] }}"
|
|
|
|
port="{{ syslog_server_port.split(":")[2] }}"
|
|
|
|
template="RemoteForwardFormat"
|
|
|
|
queue.SpoolDirectory="/var/spool/rsyslog"
|
|
|
|
queue.FileName="remote"
|
|
|
|
queue.MaxDiskSpace="1g"
|
|
|
|
queue.SaveOnShutdown="on"
|
|
|
|
queue.Type="LinkedList"
|
|
|
|
ResendLastMSGOnReconnect="on"
|
|
|
|
)
|
2019-07-09 18:00:12 +03:00
|
|
|
}
|