if $programname startswith 'monitor_' then { 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" ) }