diff --git a/java-gateway/alpine/README.md b/java-gateway/alpine/README.md index a0fa06119..c4c803dde 100644 --- a/java-gateway/alpine/README.md +++ b/java-gateway/alpine/README.md @@ -80,6 +80,14 @@ This variable is used to specify timeout for outgoing connections. By default, v This variable is used to specify log level. By default, value is `info`. The variable allows next values: ``trace``, ``debug``, ``info``, ``want``, ``error``, ``all``, ``off`` +### `ZBX_PROPERTIES_FILE` + +Name of properties file. Can be used to set additional properties using a key-value format in such a way that they are not visible on a command line or to overwrite existing ones. Available since 5.2.3. + +### `ZABBIX_OPTIONS` + +Additional arguments for Zabbix Java Gateway. Useful to enable additional libraries and features. + ## Allowed volumes for the Zabbix Java Gateway container ### ``/usr/sbin/zabbix_java/ext_lib`` @@ -114,7 +122,7 @@ Please see [the Docker installation documentation](https://docs.docker.com/insta ## Documentation -Documentation for this image is stored in the [`java-gateway/` directory](https://github.com/zabbix/zabbix-docker/tree/3.0/java-gateway) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. +Documentation for this image is stored in the [`java-gateway/` directory](https://github.com/zabbix/zabbix-docker/tree/current/java-gateway) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. ## Issues diff --git a/java-gateway/alpine/conf/usr/sbin/zabbix_java_gateway b/java-gateway/alpine/conf/usr/sbin/zabbix_java_gateway index e77d407f6..00bab5546 100755 --- a/java-gateway/alpine/conf/usr/sbin/zabbix_java_gateway +++ b/java-gateway/alpine/conf/usr/sbin/zabbix_java_gateway @@ -1,26 +1,34 @@ + JAVA=${JAVA:-"/usr/bin/java"} -DAEMON=${DAEMON:-"/usr/sbin/zabbix_java"} JAVA_OPTIONS="-server $JAVA_OPTIONS" JAVA_OPTIONS="$JAVA_OPTIONS -Dlogback.configurationFile=/etc/zabbix/zabbix_java_gateway_logback.xml" -cd $DAEMON +cd /usr/sbin/zabbix_java -CLASSPATH="$DAEMON/lib" +CLASSPATH="lib" for jar in `find lib bin ext_lib -name "*.jar"`; do - if [ $jar != *junit* ]; then - CLASSPATH="$CLASSPATH:$DAEMON/$jar" - fi + CLASSPATH="$CLASSPATH:$jar" done -ZABBIX_OPTIONS="" +if [ -n "$ZBX_LISTEN_IP" ]; then + ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.listenIP=$ZBX_LISTEN_IP" +fi +if [ -n "$ZBX_LISTEN_PORT" ]; then + ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.listenPort=$ZBX_LISTEN_PORT" +fi if [ -n "$ZBX_START_POLLERS" ]; then ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.startPollers=$ZBX_START_POLLERS" fi if [ -n "$ZBX_TIMEOUT" ]; then - ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.timeout=$ZBX_TIMEOUT -Dsun.rmi.transport.tcp.responseTimeout=${ZBX_TIMEOUT}000" + ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.timeout=$ZBX_TIMEOUT" +fi +if [ -n "$ZBX_PROPERTIES_FILE" ]; then + ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.propertiesFile=$ZBX_PROPERTIES_FILE" fi +tcp_timeout=${ZBX_TIMEOUT:=3}000 +ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dsun.rmi.transport.tcp.responseTimeout=$tcp_timeout" COMMAND_LINE="$JAVA $JAVA_OPTIONS -classpath $CLASSPATH $ZABBIX_OPTIONS com.zabbix.gateway.JavaGateway" diff --git a/java-gateway/centos/README.md b/java-gateway/centos/README.md index a0fa06119..c4c803dde 100644 --- a/java-gateway/centos/README.md +++ b/java-gateway/centos/README.md @@ -80,6 +80,14 @@ This variable is used to specify timeout for outgoing connections. By default, v This variable is used to specify log level. By default, value is `info`. The variable allows next values: ``trace``, ``debug``, ``info``, ``want``, ``error``, ``all``, ``off`` +### `ZBX_PROPERTIES_FILE` + +Name of properties file. Can be used to set additional properties using a key-value format in such a way that they are not visible on a command line or to overwrite existing ones. Available since 5.2.3. + +### `ZABBIX_OPTIONS` + +Additional arguments for Zabbix Java Gateway. Useful to enable additional libraries and features. + ## Allowed volumes for the Zabbix Java Gateway container ### ``/usr/sbin/zabbix_java/ext_lib`` @@ -114,7 +122,7 @@ Please see [the Docker installation documentation](https://docs.docker.com/insta ## Documentation -Documentation for this image is stored in the [`java-gateway/` directory](https://github.com/zabbix/zabbix-docker/tree/3.0/java-gateway) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. +Documentation for this image is stored in the [`java-gateway/` directory](https://github.com/zabbix/zabbix-docker/tree/current/java-gateway) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. ## Issues diff --git a/java-gateway/centos/conf/usr/sbin/zabbix_java_gateway b/java-gateway/centos/conf/usr/sbin/zabbix_java_gateway index e77d407f6..00bab5546 100755 --- a/java-gateway/centos/conf/usr/sbin/zabbix_java_gateway +++ b/java-gateway/centos/conf/usr/sbin/zabbix_java_gateway @@ -1,26 +1,34 @@ + JAVA=${JAVA:-"/usr/bin/java"} -DAEMON=${DAEMON:-"/usr/sbin/zabbix_java"} JAVA_OPTIONS="-server $JAVA_OPTIONS" JAVA_OPTIONS="$JAVA_OPTIONS -Dlogback.configurationFile=/etc/zabbix/zabbix_java_gateway_logback.xml" -cd $DAEMON +cd /usr/sbin/zabbix_java -CLASSPATH="$DAEMON/lib" +CLASSPATH="lib" for jar in `find lib bin ext_lib -name "*.jar"`; do - if [ $jar != *junit* ]; then - CLASSPATH="$CLASSPATH:$DAEMON/$jar" - fi + CLASSPATH="$CLASSPATH:$jar" done -ZABBIX_OPTIONS="" +if [ -n "$ZBX_LISTEN_IP" ]; then + ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.listenIP=$ZBX_LISTEN_IP" +fi +if [ -n "$ZBX_LISTEN_PORT" ]; then + ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.listenPort=$ZBX_LISTEN_PORT" +fi if [ -n "$ZBX_START_POLLERS" ]; then ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.startPollers=$ZBX_START_POLLERS" fi if [ -n "$ZBX_TIMEOUT" ]; then - ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.timeout=$ZBX_TIMEOUT -Dsun.rmi.transport.tcp.responseTimeout=${ZBX_TIMEOUT}000" + ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.timeout=$ZBX_TIMEOUT" +fi +if [ -n "$ZBX_PROPERTIES_FILE" ]; then + ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.propertiesFile=$ZBX_PROPERTIES_FILE" fi +tcp_timeout=${ZBX_TIMEOUT:=3}000 +ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dsun.rmi.transport.tcp.responseTimeout=$tcp_timeout" COMMAND_LINE="$JAVA $JAVA_OPTIONS -classpath $CLASSPATH $ZABBIX_OPTIONS com.zabbix.gateway.JavaGateway" diff --git a/java-gateway/ubuntu/README.md b/java-gateway/ubuntu/README.md index a0fa06119..c4c803dde 100644 --- a/java-gateway/ubuntu/README.md +++ b/java-gateway/ubuntu/README.md @@ -80,6 +80,14 @@ This variable is used to specify timeout for outgoing connections. By default, v This variable is used to specify log level. By default, value is `info`. The variable allows next values: ``trace``, ``debug``, ``info``, ``want``, ``error``, ``all``, ``off`` +### `ZBX_PROPERTIES_FILE` + +Name of properties file. Can be used to set additional properties using a key-value format in such a way that they are not visible on a command line or to overwrite existing ones. Available since 5.2.3. + +### `ZABBIX_OPTIONS` + +Additional arguments for Zabbix Java Gateway. Useful to enable additional libraries and features. + ## Allowed volumes for the Zabbix Java Gateway container ### ``/usr/sbin/zabbix_java/ext_lib`` @@ -114,7 +122,7 @@ Please see [the Docker installation documentation](https://docs.docker.com/insta ## Documentation -Documentation for this image is stored in the [`java-gateway/` directory](https://github.com/zabbix/zabbix-docker/tree/3.0/java-gateway) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. +Documentation for this image is stored in the [`java-gateway/` directory](https://github.com/zabbix/zabbix-docker/tree/current/java-gateway) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. ## Issues diff --git a/java-gateway/ubuntu/conf/usr/sbin/zabbix_java_gateway b/java-gateway/ubuntu/conf/usr/sbin/zabbix_java_gateway index e77d407f6..00bab5546 100755 --- a/java-gateway/ubuntu/conf/usr/sbin/zabbix_java_gateway +++ b/java-gateway/ubuntu/conf/usr/sbin/zabbix_java_gateway @@ -1,26 +1,34 @@ + JAVA=${JAVA:-"/usr/bin/java"} -DAEMON=${DAEMON:-"/usr/sbin/zabbix_java"} JAVA_OPTIONS="-server $JAVA_OPTIONS" JAVA_OPTIONS="$JAVA_OPTIONS -Dlogback.configurationFile=/etc/zabbix/zabbix_java_gateway_logback.xml" -cd $DAEMON +cd /usr/sbin/zabbix_java -CLASSPATH="$DAEMON/lib" +CLASSPATH="lib" for jar in `find lib bin ext_lib -name "*.jar"`; do - if [ $jar != *junit* ]; then - CLASSPATH="$CLASSPATH:$DAEMON/$jar" - fi + CLASSPATH="$CLASSPATH:$jar" done -ZABBIX_OPTIONS="" +if [ -n "$ZBX_LISTEN_IP" ]; then + ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.listenIP=$ZBX_LISTEN_IP" +fi +if [ -n "$ZBX_LISTEN_PORT" ]; then + ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.listenPort=$ZBX_LISTEN_PORT" +fi if [ -n "$ZBX_START_POLLERS" ]; then ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.startPollers=$ZBX_START_POLLERS" fi if [ -n "$ZBX_TIMEOUT" ]; then - ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.timeout=$ZBX_TIMEOUT -Dsun.rmi.transport.tcp.responseTimeout=${ZBX_TIMEOUT}000" + ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.timeout=$ZBX_TIMEOUT" +fi +if [ -n "$ZBX_PROPERTIES_FILE" ]; then + ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.propertiesFile=$ZBX_PROPERTIES_FILE" fi +tcp_timeout=${ZBX_TIMEOUT:=3}000 +ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dsun.rmi.transport.tcp.responseTimeout=$tcp_timeout" COMMAND_LINE="$JAVA $JAVA_OPTIONS -classpath $CLASSPATH $ZABBIX_OPTIONS com.zabbix.gateway.JavaGateway" diff --git a/proxy-mysql/alpine/docker-entrypoint.sh b/proxy-mysql/alpine/docker-entrypoint.sh index 9082bfd81..c92026ec0 100755 --- a/proxy-mysql/alpine/docker-entrypoint.sh +++ b/proxy-mysql/alpine/docker-entrypoint.sh @@ -318,6 +318,7 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "HostnameItem" "${ZBX_HOSTNAMEITEM}" fi + update_config_var $ZBX_CONFIG "ListenIP" "${ZBX_LISTENIP}" update_config_var $ZBX_CONFIG "ListenPort" "${ZBX_LISTENPORT}" update_config_var $ZBX_CONFIG "SourceIP" "${ZBX_SOURCEIP}" diff --git a/proxy-mysql/centos/docker-entrypoint.sh b/proxy-mysql/centos/docker-entrypoint.sh index 202a662ac..3d6bfd48c 100755 --- a/proxy-mysql/centos/docker-entrypoint.sh +++ b/proxy-mysql/centos/docker-entrypoint.sh @@ -315,6 +315,7 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "HostnameItem" "${ZBX_HOSTNAMEITEM}" fi + update_config_var $ZBX_CONFIG "ListenIP" "${ZBX_LISTENIP}" update_config_var $ZBX_CONFIG "ListenPort" "${ZBX_LISTENPORT}" update_config_var $ZBX_CONFIG "SourceIP" "${ZBX_SOURCEIP}" diff --git a/proxy-mysql/ubuntu/docker-entrypoint.sh b/proxy-mysql/ubuntu/docker-entrypoint.sh index 00d0916e9..214cea411 100755 --- a/proxy-mysql/ubuntu/docker-entrypoint.sh +++ b/proxy-mysql/ubuntu/docker-entrypoint.sh @@ -315,6 +315,7 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "HostnameItem" "${ZBX_HOSTNAMEITEM}" fi + update_config_var $ZBX_CONFIG "ListenIP" "${ZBX_LISTENIP}" update_config_var $ZBX_CONFIG "ListenPort" "${ZBX_LISTENPORT}" update_config_var $ZBX_CONFIG "SourceIP" "${ZBX_SOURCEIP}" diff --git a/proxy-sqlite3/alpine/docker-entrypoint.sh b/proxy-sqlite3/alpine/docker-entrypoint.sh index 5a068a347..bce53c036 100755 --- a/proxy-sqlite3/alpine/docker-entrypoint.sh +++ b/proxy-sqlite3/alpine/docker-entrypoint.sh @@ -124,6 +124,7 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "HostnameItem" "${ZBX_HOSTNAMEITEM}" fi + update_config_var $ZBX_CONFIG "ListenIP" "${ZBX_LISTENIP}" update_config_var $ZBX_CONFIG "ListenPort" "${ZBX_LISTENPORT}" update_config_var $ZBX_CONFIG "SourceIP" "${ZBX_SOURCEIP}" diff --git a/proxy-sqlite3/centos/docker-entrypoint.sh b/proxy-sqlite3/centos/docker-entrypoint.sh index 5a068a347..bce53c036 100755 --- a/proxy-sqlite3/centos/docker-entrypoint.sh +++ b/proxy-sqlite3/centos/docker-entrypoint.sh @@ -124,6 +124,7 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "HostnameItem" "${ZBX_HOSTNAMEITEM}" fi + update_config_var $ZBX_CONFIG "ListenIP" "${ZBX_LISTENIP}" update_config_var $ZBX_CONFIG "ListenPort" "${ZBX_LISTENPORT}" update_config_var $ZBX_CONFIG "SourceIP" "${ZBX_SOURCEIP}" diff --git a/proxy-sqlite3/ubuntu/docker-entrypoint.sh b/proxy-sqlite3/ubuntu/docker-entrypoint.sh index e9a88482a..12d18e685 100755 --- a/proxy-sqlite3/ubuntu/docker-entrypoint.sh +++ b/proxy-sqlite3/ubuntu/docker-entrypoint.sh @@ -124,6 +124,7 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "HostnameItem" "${ZBX_HOSTNAMEITEM}" fi + update_config_var $ZBX_CONFIG "ListenIP" "${ZBX_LISTENIP}" update_config_var $ZBX_CONFIG "ListenPort" "${ZBX_LISTENPORT}" update_config_var $ZBX_CONFIG "SourceIP" "${ZBX_SOURCEIP}" diff --git a/server-mysql/alpine/docker-entrypoint.sh b/server-mysql/alpine/docker-entrypoint.sh index 5d05994b1..6f82044e0 100755 --- a/server-mysql/alpine/docker-entrypoint.sh +++ b/server-mysql/alpine/docker-entrypoint.sh @@ -302,6 +302,7 @@ update_zbx_config() { ZBX_CONFIG=$ZABBIX_ETC_DIR/zabbix_server.conf + update_config_var $ZBX_CONFIG "ListenIP" "${ZBX_LISTENIP}" update_config_var $ZBX_CONFIG "ListenPort" "${ZBX_LISTENPORT}" update_config_var $ZBX_CONFIG "SourceIP" "${ZBX_SOURCEIP}" diff --git a/server-mysql/centos/docker-entrypoint.sh b/server-mysql/centos/docker-entrypoint.sh index fc1a18e05..b00ebcbf5 100755 --- a/server-mysql/centos/docker-entrypoint.sh +++ b/server-mysql/centos/docker-entrypoint.sh @@ -299,6 +299,7 @@ update_zbx_config() { ZBX_CONFIG=$ZABBIX_ETC_DIR/zabbix_server.conf + update_config_var $ZBX_CONFIG "ListenIP" "${ZBX_LISTENIP}" update_config_var $ZBX_CONFIG "ListenPort" "${ZBX_LISTENPORT}" update_config_var $ZBX_CONFIG "SourceIP" "${ZBX_SOURCEIP}" diff --git a/server-mysql/ubuntu/docker-entrypoint.sh b/server-mysql/ubuntu/docker-entrypoint.sh index fa199fdb1..b8e2962f8 100755 --- a/server-mysql/ubuntu/docker-entrypoint.sh +++ b/server-mysql/ubuntu/docker-entrypoint.sh @@ -299,6 +299,7 @@ update_zbx_config() { ZBX_CONFIG=$ZABBIX_ETC_DIR/zabbix_server.conf + update_config_var $ZBX_CONFIG "ListenIP" "${ZBX_LISTENIP}" update_config_var $ZBX_CONFIG "ListenPort" "${ZBX_LISTENPORT}" update_config_var $ZBX_CONFIG "SourceIP" "${ZBX_SOURCEIP}" diff --git a/server-pgsql/alpine/docker-entrypoint.sh b/server-pgsql/alpine/docker-entrypoint.sh index 568562bff..24757c93c 100755 --- a/server-pgsql/alpine/docker-entrypoint.sh +++ b/server-pgsql/alpine/docker-entrypoint.sh @@ -335,6 +335,7 @@ update_zbx_config() { ZBX_CONFIG=$ZABBIX_ETC_DIR/zabbix_server.conf + update_config_var $ZBX_CONFIG "ListenIP" "${ZBX_LISTENIP}" update_config_var $ZBX_CONFIG "ListenPort" "${ZBX_LISTENPORT}" update_config_var $ZBX_CONFIG "SourceIP" "${ZBX_SOURCEIP}" diff --git a/server-pgsql/centos/docker-entrypoint.sh b/server-pgsql/centos/docker-entrypoint.sh index 568562bff..24757c93c 100755 --- a/server-pgsql/centos/docker-entrypoint.sh +++ b/server-pgsql/centos/docker-entrypoint.sh @@ -335,6 +335,7 @@ update_zbx_config() { ZBX_CONFIG=$ZABBIX_ETC_DIR/zabbix_server.conf + update_config_var $ZBX_CONFIG "ListenIP" "${ZBX_LISTENIP}" update_config_var $ZBX_CONFIG "ListenPort" "${ZBX_LISTENPORT}" update_config_var $ZBX_CONFIG "SourceIP" "${ZBX_SOURCEIP}" diff --git a/server-pgsql/ubuntu/docker-entrypoint.sh b/server-pgsql/ubuntu/docker-entrypoint.sh index 27acf0933..480141f6e 100755 --- a/server-pgsql/ubuntu/docker-entrypoint.sh +++ b/server-pgsql/ubuntu/docker-entrypoint.sh @@ -335,6 +335,7 @@ update_zbx_config() { ZBX_CONFIG=$ZABBIX_ETC_DIR/zabbix_server.conf + update_config_var $ZBX_CONFIG "ListenIP" "${ZBX_LISTENIP}" update_config_var $ZBX_CONFIG "ListenPort" "${ZBX_LISTENPORT}" update_config_var $ZBX_CONFIG "SourceIP" "${ZBX_SOURCEIP}"