blob: b8df2d177adf9871bf6a2912412dfa07b390f130 (
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
# Generated by ${vyos_conf_scripts_dir}/service_monitoring_zabbix-agent.py
PidFile=/run/zabbix/zabbix_agent2.pid
LogFile=/var/log/zabbix/zabbix_agent2.log
ControlSocket=/run/zabbix/agent.sock
{% if log is vyos_defined %}
{% if log.size is vyos_defined %}
### Option: LogFileSize
# Maximum size of log file in MB.
# 0 - disable automatic log rotation.
#
# Range: 0-1024
LogFileSize={{ log.size }}
{% endif %}
{% if log.remote_commands is vyos_defined %}
LogRemoteCommands=1
{% endif %}
{% if log.debug_level is vyos_defined %}
{% set mapping = {
'basic': 0,
'critical': 1,
'error': 2,
'warning': 3,
'debug': 4,
'extended-debug': 5
} %}
DebugLevel={{ mapping[log.debug_level] }}
{% endif %}
{% endif %}
{% if server is vyos_defined %}
Server={{ server | bracketize_ipv6 | join(',') }}
{% endif %}
{% if server_active is vyos_defined %}
{% set servers = [] %}
{% for key, value in server_active.items() %}
{% if value.port %}
{% set serv_item = key | bracketize_ipv6 + ':' + value.port %}
{% set _ = servers.append(serv_item) %}
{% else %}
{% set _ = servers.append(key | bracketize_ipv6) %}
{% endif %}
{% endfor %}
ServerActive={{ servers | join(',') }}
{% endif %}
{% if host_name is vyos_defined %}
Hostname={{ host_name }}
{% endif %}
{% if port is vyos_defined %}
ListenPort={{ port }}
{% endif %}
{% if listen_address is vyos_defined %}
ListenIP={{ listen_address | join(',') }}
{% endif %}
{% if limits is vyos_defined %}
{% if limits.buffer_flush_interval is vyos_defined %}
BufferSend={{ limits.buffer_flush_interval }}
{% endif %}
{% if limits.buffer_size is vyos_defined %}
BufferSize={{ limits.buffer_size }}
{% endif %}
{% endif %}
{% if directory is vyos_defined %}
### Option: Include
# You may include individual files or all files in a directory in the configuration file.
Include={{ directory }}/*.conf
{% endif %}
{% if timeout is vyos_defined %}
Timeout={{ timeout }}
{% endif %}
{% if authentication is vyos_defined and authentication.mode is vyos_defined %}
{% if authentication.mode == "pre-shared-secret" %}
TLSConnect=psk
TLSAccept=psk
{% endif %}
{% if authentication.psk.secret is vyos_defined %}
TLSPSKFile={{ service_psk_file }}
{% endif %}
{% if authentication.psk.id is vyos_defined %}
TLSPSKIdentity={{ authentication.psk.id }}
{% endif %}
{% endif %}
|