summaryrefslogtreecommitdiff
path: root/data/templates/syslog
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-05-08 21:27:14 +0200
committerChristian Breunig <christian@breunig.cc>2023-05-08 22:45:53 +0200
commit1dc79cebc6d27a8f9d2f9ca9c2e0f2fd0809d940 (patch)
tree74b294e319ebad8c046756e91ce0f17a32fdcb3e /data/templates/syslog
parent43b4d30ed0298565ce7cf891fbd72c5a7484dac6 (diff)
downloadvyos-1x-1dc79cebc6d27a8f9d2f9ca9c2e0f2fd0809d940.tar.gz
vyos-1x-1dc79cebc6d27a8f9d2f9ca9c2e0f2fd0809d940.zip
syslog: T2778: migrate to get_config_dict()
Diffstat (limited to 'data/templates/syslog')
-rw-r--r--data/templates/syslog/logrotate.j211
-rw-r--r--data/templates/syslog/rsyslog.conf.j258
2 files changed, 0 insertions, 69 deletions
diff --git a/data/templates/syslog/logrotate.j2 b/data/templates/syslog/logrotate.j2
deleted file mode 100644
index c1b951e8b..000000000
--- a/data/templates/syslog/logrotate.j2
+++ /dev/null
@@ -1,11 +0,0 @@
-{{ config_render['log-file'] }} {
- missingok
- notifempty
- create
- rotate {{ config_render['max-files'] }}
- size={{ config_render['max-size'] // 1024 }}k
- postrotate
- invoke-rc.d rsyslog rotate > /dev/null
- endscript
-}
-
diff --git a/data/templates/syslog/rsyslog.conf.j2 b/data/templates/syslog/rsyslog.conf.j2
deleted file mode 100644
index abe880283..000000000
--- a/data/templates/syslog/rsyslog.conf.j2
+++ /dev/null
@@ -1,58 +0,0 @@
-## generated by syslog.py ##
-## file based logging
-{% if files['global']['marker'] %}
-$ModLoad immark
-{% if files['global']['marker-interval'] %}
-$MarkMessagePeriod {{ files['global']['marker-interval'] }}
-{% endif %}
-{% endif %}
-{% if files['global']['preserver_fqdn'] %}
-$PreserveFQDN on
-{% endif %}
-{% for file, file_options in files.items() %}
-{% if file_options['max-size'] is vyos_defined %}
-$outchannel {{ file }},{{ file_options['log-file'] }},{{ file_options['max-size'] }},{{ file_options['action-on-max-size'] }}
-{% else %}
-$outchannel {{ file }},{{ file_options['log-file'] }}
-{% endif %}
-{{ file_options['selectors'] }} :omfile:${{ file }}
-{% endfor %}
-{% if console is defined and console is not none %}
-## console logging
-{% for con, con_options in console.items() %}
-{{ con_options['selectors'] }} /dev/console
-{% endfor %}
-{% endif %}
-{% if hosts is defined and hosts is not none %}
-## remote logging
-{% for host, host_options in hosts.items() %}
-{% if host_options.proto == 'tcp' %}
-{% if host_options.port is defined %}
-{% if host_options.oct_count is defined %}
-{{ host_options.selectors }} @@(o){{ host | bracketize_ipv6 }}:{{ host_options.port }};RSYSLOG_SyslogProtocol23Format
-{% else %}
-{{ host_options.selectors }} @@{{ host | bracketize_ipv6 }}:{{ host_options.port }}
-{% endif %}
-{% else %}
-{{ 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'] %}
-{{ host_options.selectors }} @{{ host | bracketize_ipv6 }}:{{ host_options.port }}
-{% else %}
-{{ host_options.selectors }} @{{ host | bracketize_ipv6 }}
-{% endif %}
-{% endif %}
-{% endfor %}
-{% endif %}
-{% if user is defined and user is not none %}
-{% for username, user_options in user.items() %}
-{{ user_options.selectors }} :omusrmsg:{{ username }}
-{% endfor %}
-{% endif %}