4 # This is the runtime configuration for log forwarding to external server.
5 # If a configuration is active, the rsyslog-master instance will forward
6 # logs to the configured external server.
8 # Last written: {{ lookup('pipe','date --rfc-3339=seconds') }}
10 {% if log_forwarding is defined %}
11 template(name="RSYSLOG_SyslogProtocol23Format_with_cloudname" type="string"
12 string="<%PRI%>1 %TIMESTAMP:::date-rfc3339% %HOSTNAME%.{{ name }} %APP-NAME% %PROCID% %MSGID% %STRUCTURED-DATA% %msg%\n")
14 {% if log_forwarding['tls'] == "on" %}
15 $DefaultNetstreamDriver gtls
16 $ActionSendStreamDriverMode 1
17 $ActionSendStreamDriverAuthMode anon
18 $DefaultNetstreamDriverCAFile /dev/null
20 *.* @@(o)[{{ log_forwarding['ip_address'] }}]:{{ log_forwarding['port'] }}; RSYSLOG_SyslogProtocol23Format_with_cloudname
22 *.* action(type="omfwd" target="{{ log_forwarding['ip_address'] }}" port="{{ log_forwarding['port'] }}" protocol="{{ log_forwarding['protocol'] }}" template="RSYSLOG_SyslogProtocol23Format_with_cloudname")
25 # No active configuration