diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2022-08-16 14:56:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-16 14:56:33 +0300 |
commit | 4d845cc368220b509faa91e61260eab1b4c38517 (patch) | |
tree | 18f3350da79002311faef266fbf46cb1140e1341 /data/templates | |
parent | a8793122bb22ae7b6131a623f1d88bd309263d85 (diff) | |
parent | 8f63565add6b5848e0161437e1ee0d3799178a8b (diff) | |
download | vyos-1x-4d845cc368220b509faa91e61260eab1b4c38517.tar.gz vyos-1x-4d845cc368220b509faa91e61260eab1b4c38517.zip |
Merge pull request #1473 from dmbaturin/T4039-equ
syslog: T4039: Add protocol23format logging for UDP
Diffstat (limited to 'data/templates')
-rw-r--r-- | data/templates/syslog/rsyslog.conf.tmpl | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/data/templates/syslog/rsyslog.conf.tmpl b/data/templates/syslog/rsyslog.conf.tmpl index e25ef48d4..2fb621760 100644 --- a/data/templates/syslog/rsyslog.conf.tmpl +++ b/data/templates/syslog/rsyslog.conf.tmpl @@ -25,12 +25,18 @@ $outchannel {{ file }},{{ file_options['log-file'] }},{{ file_options['max-size' {% if host_options.proto == 'tcp' %} {% if host_options.port is defined %} {% if host_options.oct_count is defined %} -{{ host_options.selectors }} @@(o){{ host }}:{{ host_options.port }};RSYSLOG_SyslogProtocol23Format +{{ host_options.selectors }} @@(o){{ host | bracketize_ipv6 }}:{{ host_options.port }};RSYSLOG_SyslogProtocol23Format {% else %} -{{ host_options.selectors }} @@{{ host }}:{{ host_options.port }} +{{ host_options.selectors }} @@{{ host | bracketize_ipv6 }}:{{ host_options.port }} {% endif %} {% else %} -{{ host_options.selectors }} @@{{ host }} +{{ host_options.selectors }} @@{{ host | bracketize_ipv6 }} +{% endif %} +{% elif host_options.proto == 'udp' %} +{% if host_options.port is defined %} +{{ host_options.selectors }} @{{ host | bracketize_ipv6 }}:{{ host_options.port }}{{ ';RSYSLOG_SyslogProtocol23Format' if host_options.oct_count is sameas true }} +{% else %} +{{ host_options.selectors }} @{{ host | bracketize_ipv6 }} {% endif %} {% else %} {% if host_options['port'] %} |