diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-10-17 11:19:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-17 11:19:57 +0200 |
commit | fcf90cd860ba806c9a06526b5e1d88ca18d6f575 (patch) | |
tree | 4929e65e276c456ce8147941e7317b133be4e37e /data/templates/syslog | |
parent | aa844567456504c5026a9c49d5c4cf590c7cf08b (diff) | |
parent | 0eecfabd74f1f8dec96bf4bb64609eaa609edaef (diff) | |
download | vyos-1x-fcf90cd860ba806c9a06526b5e1d88ca18d6f575.tar.gz vyos-1x-fcf90cd860ba806c9a06526b5e1d88ca18d6f575.zip |
Merge pull request #573 from sever-sever/T2938
conf-mode: T2938: Add format octet-counted for syslog
Diffstat (limited to 'data/templates/syslog')
-rw-r--r-- | data/templates/syslog/rsyslog.conf.tmpl | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/data/templates/syslog/rsyslog.conf.tmpl b/data/templates/syslog/rsyslog.conf.tmpl index bc3f7667b..a610d132f 100644 --- a/data/templates/syslog/rsyslog.conf.tmpl +++ b/data/templates/syslog/rsyslog.conf.tmpl @@ -22,19 +22,23 @@ $outchannel {{file}},{{files[file]['log-file']}},{{files[file]['max-size']}},{{f {% if hosts %} ## remote logging {% for host in hosts %} -{% if hosts[host]['proto'] == 'tcp' %} -{% if hosts[host]['port'] %} +{% if hosts[host]['proto'] == 'tcp' %} +{% if hosts[host]['port'] %} +{% if hosts[host]['oct_count'] %} +{{hosts[host]['selectors']}} @@(o){{host}}:{{hosts[host]['port']}};RSYSLOG_SyslogProtocol23Format +{% else %} {{hosts[host]['selectors']}} @@{{host}}:{{hosts[host]['port']}} -{% else %} +{% endif %} +{% else %} {{hosts[host]['selectors']}} @@{{host}} -{% endif %} -{% else %} -{% if hosts[host]['port'] %} +{% endif %} +{% else %} +{% if hosts[host]['port'] %} {{hosts[host]['selectors']}} @{{host}}:{{hosts[host]['port']}} -{% else %} +{% else %} {{hosts[host]['selectors']}} @{{host}} -{% endif %} -{% endif %} +{% endif %} +{% endif %} {% endfor %} {% endif %} {% if user %} |