From 29e5fe8f9ff47024961a8ce52dfd975a2018ffff Mon Sep 17 00:00:00 2001 From: Alexey Pustovalov Date: Fri, 24 Jul 2026 22:39:53 +0900 Subject: [PATCH] Added missing ZBX_SERVER for Java Gateway --- Dockerfiles/java-gateway/README.md | 4 ++++ Dockerfiles/java-gateway/rhel/README.html | 2 ++ env_vars/.env_java | 1 + templates/entrypoints/java-gateway.sh | 1 + 4 files changed, 8 insertions(+) diff --git a/Dockerfiles/java-gateway/README.md b/Dockerfiles/java-gateway/README.md index 8307792c..8abb6d6e 100644 --- a/Dockerfiles/java-gateway/README.md +++ b/Dockerfiles/java-gateway/README.md @@ -60,6 +60,10 @@ $ docker logs some-zabbix-java-gateway When you start the `zabbix-java-gateway` image, you can adjust the configuration of the Zabbix Java Gateway by passing one or more environment variables on the `docker run` command line. +### `ZBX_SERVER` + +Comma-delimited list of IP addresses, CIDR networks or DNS names of Zabbix servers and proxies allowed to connect to Java Gateway. If unset or empty, connections are accepted from all hosts. + ### `ZBX_START_POLLERS` This variable is specified amount of pollers. By default, value is `5`. diff --git a/Dockerfiles/java-gateway/rhel/README.html b/Dockerfiles/java-gateway/rhel/README.html index 7c3d87f5..67602ccd 100644 --- a/Dockerfiles/java-gateway/rhel/README.html +++ b/Dockerfiles/java-gateway/rhel/README.html @@ -29,6 +29,8 @@

Environment Variables

When you start the zabbix-java-gateway image, you can adjust the configuration of the Zabbix Java Gateway by passing one or more environment variables on the podman run command line.

+

ZBX_SERVER

+

Comma-delimited list of IP addresses, CIDR networks or DNS names of Zabbix servers and proxies allowed to connect to Java Gateway. If unset or empty, connections are accepted from all hosts.

ZBX_START_POLLERS

This variable is specified amount of pollers. By default, value is 5.

ZBX_TIMEOUT

diff --git a/env_vars/.env_java b/env_vars/.env_java index edd71468..2ee75f06 100644 --- a/env_vars/.env_java +++ b/env_vars/.env_java @@ -1,5 +1,6 @@ # ZBX_LISTEN_IP= # ZBX_LISTEN_PORT=10052 +ZBX_SERVER=zabbix-server # ZBX_START_POLLERS=5 # ZBX_TIMEOUT=3 # Possible values: trace, debug, info, warn, error, all, off diff --git a/templates/entrypoints/java-gateway.sh b/templates/entrypoints/java-gateway.sh index 97a51de3..ea1b713c 100644 --- a/templates/entrypoints/java-gateway.sh +++ b/templates/entrypoints/java-gateway.sh @@ -36,6 +36,7 @@ run_service() { "-Dzabbix.timeout=${ZBX_TIMEOUT}" ) + [[ -n "${ZBX_SERVER:-}" ]] && zabbix_opts+=("-Dzabbix.server=${ZBX_SERVER}") [[ -n "${ZBX_LISTEN_IP:-}" ]] && zabbix_opts+=("-Dzabbix.listenIP=${ZBX_LISTEN_IP}") [[ -n "${ZBX_START_POLLERS:-}" ]] && zabbix_opts+=("-Dzabbix.startPollers=${ZBX_START_POLLERS}") [[ -n "${ZBX_PROPERTIES_FILE:-}" ]] && zabbix_opts+=("-Dzabbix.propertiesFile=${ZBX_PROPERTIES_FILE}")