Page Menu
Home
VyOS Platform
Search
Configure Global Search
Log In
Files
F119894264
rsyslog.conf.j2
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
rsyslog.conf.j2
View Options
### Autogenerated by system_syslog.py ###
{% if global.marker is vyos_defined %}
$ModLoad immark
{% if global.marker.interval is vyos_defined %}
$MarkMessagePeriod {{ global.marker.interval }}
{% endif %}
{% endif %}
{% if global.preserve_fqdn is vyos_defined %}
$PreserveFQDN on
{% endif %}
{% if global.local_host_name is vyos_defined %}
$LocalHostName {{ global.local_host_name }}
{% endif %}
# We always log to /var/log/messages
$outchannel global,/var/log/messages,262144,/usr/sbin/logrotate {{ logrotate }}
{% if global.facility is vyos_defined %}
{% set tmp = [] %}
{% for facility, facility_options in global.facility.items() %}
{% set _ = tmp.append(facility.replace('all', '*') + '.' + facility_options.level.replace('all', '*')) %}
{% endfor %}
{{ tmp | join(';') }} :omfile:$global
{% endif %}
{% if file is vyos_defined %}
# File based configuration section
{% for file_name, file_options in file.items() %}
{% set tmp = [] %}
$outchannel {{ file_name }},/var/log/user/{{ file_name }},{{ file_options.archive.size }},/usr/sbin/logrotate {{ logrotate }}
{% if file_options.facility is vyos_defined %}
{% for facility, facility_options in file_options.facility.items() %}
{% set _ = tmp.append(facility.replace('all', '*') + '.' + facility_options.level.replace('all', '*')) %}
{% endfor %}
{% endif %}
{{ tmp | join(';') }} :omfile:${{ file }}
{% endfor %}
{% endif %}
{% if console.facility is vyos_defined %}
# Console logging
{% set tmp = [] %}
{% for facility, facility_options in console.facility.items() %}
{% set _ = tmp.append(facility.replace('all', '*') + '.' + facility_options.level.replace('all', '*')) %}
{% endfor %}
{{ tmp | join(';') }} /dev/console
{% endif %}
{% if host is vyos_defined %}
# Remote logging
{% for host_name, host_options in host.items() %}
{% set tmp = [] %}
{% if host_options.facility is vyos_defined %}
{% for facility, facility_options in host_options.facility.items() %}
{% set _ = tmp.append(facility.replace('all', '*') + '.' + facility_options.level.replace('all', '*')) %}
{% endfor %}
{% endif %}
{% if host_options.protocol is vyos_defined('tcp') %}
{% if host_options.format.octet_counted is vyos_defined %}
{{ tmp | join(';') }} @@{{ '(o)' if host_options.format.octet_counted is vyos_defined }}{{ host_name | bracketize_ipv6 }}:{{ host_options.port }}{{ ';RSYSLOG_SyslogProtocol23Format' if host_options.format.include_timezone is vyos_defined }}
{% endif %}
{% else %}
{{ tmp | join(';') }} @{{ host_name | bracketize_ipv6 }}:{{ host_options.port }}{{ ';RSYSLOG_SyslogProtocol23Format' if host_options.format.include_timezone is vyos_defined }}
{% endif %}
{% endfor %}
{% endif %}
{% if user is defined and user is not none %}
# Log to user terminal
{% for username, user_options in user.items() %}
{% set tmp = [] %}
{% if user_options.facility is vyos_defined %}
{% for facility, facility_options in user_options.facility.items() %}
{% set _ = tmp.append(facility.replace('all', '*') + '.' + facility_options.level.replace('all', '*')) %}
{% endfor %}
{% endif %}
{{ tmp | join(';') }} :omusrmsg:{{ username }}
{% endfor %}
{% endif %}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 26, 7:26 PM (15 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4984354
Default Alt Text
rsyslog.conf.j2 (3 KB)
Attached To
Mode
rVYOSONEX vyos-1x
Attached
Detach File
Event Timeline
Log In to Comment