Skip to content

Commit d0f67ae

Browse files
authored
Merge pull request #167 from xenadmin/patch-3
feat(proxy_conf): Reworked jinja Template for Zabbix Proxy 6.0 LTS
2 parents 14c9523 + 6c1b8be commit d0f67ae

File tree

1 file changed

+78
-3
lines changed

1 file changed

+78
-3
lines changed

zabbix/files/default/etc/zabbix/zabbix_proxy.conf.jinja

Lines changed: 78 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323

2424
### Option: Server
2525
# If ProxyMode is set to active mode:
26-
# IP address or DNS name of Zabbix server to get configuration data from and send data to.
26+
# IP address or DNS name (address:port) or cluster (address:port;address2:port) of Zabbix server to get configuration data from and send data to.
27+
# If port is not specified, default port is used.
28+
# Cluster nodes need to be separated by semicolon.
2729
# If ProxyMode is set to passive mode:
2830
# List of comma delimited IP addresses, optionally in CIDR notation, or DNS names of Zabbix server.
2931
# Incoming connections will be accepted only from the addresses listed here.
@@ -174,7 +176,7 @@
174176
{% if zabbix.version_repo|float >= 3.4 -%}
175177
### Option: SocketDir
176178
# IPC socket directory.
177-
# Directory to store IPC sockets used by internal Zabbix services.
179+
# Directory to store IPC sockets used by internal Zabbix services.
178180
#
179181
# Mandatory: no
180182
# Default:
@@ -186,6 +188,8 @@
186188
# Database host name.
187189
# If set to localhost, socket is used for MySQL.
188190
# If set to empty string, socket is used for PostgreSQL.
191+
# If set to empty string, the Net Service Name connection method is used to connect to Oracle database; also see
192+
# the TNS_ADMIN environment variable to specify the directory where the tnsnames.ora file is located.
189193
#
190194
# Mandatory: no
191195
# Default:
@@ -195,6 +199,9 @@
195199
### Option: DBName
196200
# Database name.
197201
# For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored.
202+
# If the Net Service Name connection method is used to connect to Oracle database, specify the service name from
203+
# the tnsnames.ora file or set to empty string; also see the TWO_TASK environment variable if DBName is set to
204+
# empty string.
198205
# Warning: do not attempt to use the same database Zabbix server is using.
199206
#
200207
# Mandatory: yes
@@ -236,12 +243,26 @@
236243

237244
# Option: DBPort
238245
# Database port when not using local socket. Ignored for SQLite.
246+
# If the Net Service Name connection method is used to connect to Oracle database, the port number from the
247+
# tnsnames.ora file will be used. The port number set here will be ignored.
239248
#
240249
# Mandatory: no
241250
# Default:
242251
# DBPort=
243252
{% if settings.get('dbport', defaults.get('dbport', False)) %}DBPort={{ settings.get('dbport', defaults.dbport) }}{% endif %}
244253

254+
{% if zabbix.version_repo|float >= 6.0 -%}
255+
### Option: AllowUnsupportedDBVersions
256+
# Allow proxy to work with unsupported database versions.
257+
# 0 - do not allow
258+
# 1 - allow
259+
#
260+
# Mandatory: no
261+
# Default:
262+
# AllowUnsupportedDBVersions=0
263+
{% if settings.get('allowunsupporteddbversions', defaults.get('allowunsupporteddbversions', False)) %}AllowUnsupportedDBVersions={{ settings.get('allowunsupporteddbversions', defaults.allowunsupporteddbversions) }}{% endif %}
264+
{% endif %}
265+
245266
######### PROXY SPECIFIC PARAMETERS #############
246267

247268
### Option: ProxyLocalBuffer
@@ -340,6 +361,19 @@
340361
# StartPollersUnreachable=1
341362
{% if settings.get('startpollersunreachable', defaults.get('startpollersunreachable', False)) %}StartPollersUnreachable={{ settings.get('startpollersunreachable', defaults.startpollersunreachable) }}{% endif %}
342363

364+
{% if zabbix.version_repo|float >= 6.0 -%}
365+
### Option: StartHistoryPollers
366+
# Number of pre-forked instances of history pollers.
367+
# Only required for internal checks.
368+
# A database connection is required for each history poller instance.
369+
#
370+
# Mandatory: no
371+
# Range: 0-1000
372+
# Default:
373+
# StartHistoryPollers=1
374+
{% if settings.get('starthistorypollers', defaults.get('starthistorypollers', False)) %}StartHistoryPollers={{ settings.get('starthistorypollers', defaults.starthistorypollers) }}{% endif %}
375+
{% endif %}
376+
343377
### Option: StartTrappers
344378
# Number of pre-forked instances of trappers.
345379
# Trappers accept incoming connections from Zabbix sender and active agents.
@@ -605,6 +639,17 @@ StartJavaPollers={{ settings.get('startjavapollers', defaults.startjavapollers)
605639
# UnreachableDelay=15
606640
{% if settings.get('unreachabedelay', defaults.get('unreachabedelay', False)) %}UnreachableDelay={{ settings.get('unreachabedelay', defaults.unreachabedelay) }}{% endif %}
607641

642+
{% if zabbix.version_repo|float >= 6.0 -%}
643+
## Option: StartODBCPollers
644+
# Number of pre-forked ODBC poller instances.
645+
#
646+
# Mandatory: no
647+
# Range: 0-1000
648+
# Default:
649+
# StartODBCPollers=1
650+
{% if settings.get('startodbcpollers', defaults.get('startodbcpollers', False)) %}StartODBCPollers={{ settings.get('startodbcpollers', defaults.startodbcpollers) }}{% endif %}
651+
{% endif %}
652+
608653
### Option: ExternalScripts
609654
# Full path to location of external scripts.
610655
# Default depends on compilation options.
@@ -724,7 +769,7 @@ Include={{ include }}
724769
### Option: SSLCALocation
725770
# Location of certificate authority (CA) files for SSL server certificate verification.
726771
# If not set, system-wide directory will be used.
727-
# This parameter is used only in web monitoring.
772+
# This parameter is used in web monitoring, HTTP agent items and for communication with Vault.
728773
#
729774
# Mandatory: no
730775
# Default:
@@ -1005,6 +1050,36 @@ LoadModule={{ loadmodule }}
10051050
# DBTLSCipher13=
10061051
{% if settings.get('dbtlscipher13', defaults.get('dbtlscipher13', False)) %}DBTLSCipher13={{ settings.get('dbtlscipher13', defaults.dbtlscipher13) }}{% endif %}
10071052

1053+
{% if zabbix.version_repo|float >= 6.0 -%}
1054+
### Option: VaultToken
1055+
# Vault authentication token that should have been generated exclusively for Zabbix proxy with read only permission to path
1056+
# specified in optional VaultDBPath configuration parameter.
1057+
# It is an error if VaultToken and VAULT_TOKEN environment variable are defined at the same time.
1058+
#
1059+
# Mandatory: no
1060+
# Default:
1061+
# VaultToken=
1062+
{% if settings.get('vaulttoken', defaults.get('vaulttoken', False)) %}VaultToken={{ settings.get('vaulttoken', defaults.vaulttoken) }}{% endif %}
1063+
1064+
### Option: VaultURL
1065+
# Vault server HTTP[S] URL. System-wide CA certificates directory will be used if SSLCALocation is not specified.
1066+
#
1067+
# Mandatory: no
1068+
# Default:
1069+
# VaultURL=https://127.0.0.1:8200
1070+
{% if settings.get('vaulturl', defaults.get('vaulturl', False)) %}VaultURL={{ settings.get('vaulturl', defaults.vaulturl) }}{% endif %}
1071+
1072+
### Option: VaultDBPath
1073+
# Vault path from where credentials for database will be retrieved by keys 'password' and 'username'.
1074+
# Example: secret/zabbix/database
1075+
# This option can only be used if DBUser and DBPassword are not specified.
1076+
#
1077+
# Mandatory: no
1078+
# Default:
1079+
# VaultDBPath=
1080+
{% if settings.get('vaultdbpath', defaults.get('vaultdbpath', False)) %}VaultDBPath={{ settings.get('vaultdbpath', defaults.vaultdbpath) }}{% endif %}
1081+
{% endif %}
1082+
10081083
####### For advanced users - TCP-related fine-tuning parameters #######
10091084

10101085
## Option: ListenBacklog

0 commit comments

Comments
 (0)