blob: e25ef48d4b1923c705aa2e40e4acca074d7be0e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
## 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() %}
$outchannel {{ file }},{{ file_options['log-file'] }},{{ file_options['max-size'] }},{{ file_options['action-on-max-size'] }}
{{ 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 }}:{{ host_options.port }};RSYSLOG_SyslogProtocol23Format
{% else %}
{{ host_options.selectors }} @@{{ host }}:{{ host_options.port }}
{% endif %}
{% else %}
{{ host_options.selectors }} @@{{ host }}
{% 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 %}
|