diff --git a/proxy-sqlite3/alpine/Dockerfile b/proxy-sqlite3/alpine/Dockerfile index f5ff19ec2..c55607c09 100644 --- a/proxy-sqlite3/alpine/Dockerfile +++ b/proxy-sqlite3/alpine/Dockerfile @@ -22,6 +22,7 @@ RUN set -eux && \ adduser zabbix root && \ mkdir -p /etc/zabbix && \ mkdir -p /var/lib/zabbix && \ + mkdir -p /var/lib/zabbix/db_data && \ mkdir -p /var/lib/zabbix/enc && \ mkdir -p /var/lib/zabbix/mibs && \ mkdir -p /var/lib/zabbix/modules && \ diff --git a/proxy-sqlite3/alpine/README.md b/proxy-sqlite3/alpine/README.md index 79b7319e4..72cce7e2d 100644 --- a/proxy-sqlite3/alpine/README.md +++ b/proxy-sqlite3/alpine/README.md @@ -199,6 +199,10 @@ Please use official documentation for [``zabbix_proxy.conf``](https://www.zabbix The volume is used by External checks (type of items). It is `ExternalScripts` parameter in ``zabbix_proxy.conf``. +### ``/var/lib/zabbix/db_data`` + +The volume stores SQLite3 database file and could be used for external database file storage. + ### ``/var/lib/zabbix/modules`` The volume allows load additional modules and extend Zabbix proxy using ``LoadModule`` feature. diff --git a/proxy-sqlite3/alpine/docker-entrypoint.sh b/proxy-sqlite3/alpine/docker-entrypoint.sh index 7e933ec53..ee04cdd17 100755 --- a/proxy-sqlite3/alpine/docker-entrypoint.sh +++ b/proxy-sqlite3/alpine/docker-entrypoint.sh @@ -139,7 +139,7 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "LogRemoteCommands" "${ZBX_LOGREMOTECOMMANDS}" update_config_var $ZBX_CONFIG "DBHost" - update_config_var $ZBX_CONFIG "DBName" "/var/lib/zabbix/zabbix_proxy_db" + update_config_var $ZBX_CONFIG "DBName" "/var/lib/zabbix/db_data/${ZBX_HOSTNAME:-"zabbix-proxy-sqlite3"}.sqlite" update_config_var $ZBX_CONFIG "DBUser" update_config_var $ZBX_CONFIG "DBPort" update_config_var $ZBX_CONFIG "DBPassword" diff --git a/proxy-sqlite3/centos/Dockerfile b/proxy-sqlite3/centos/Dockerfile index 9256bf0d2..77288eb79 100644 --- a/proxy-sqlite3/centos/Dockerfile +++ b/proxy-sqlite3/centos/Dockerfile @@ -32,6 +32,7 @@ RUN set -eux && \ zabbix && \ mkdir -p /etc/zabbix && \ mkdir -p /var/lib/zabbix && \ + mkdir -p /var/lib/zabbix/db_data && \ mkdir -p /var/lib/zabbix/enc && \ mkdir -p /var/lib/zabbix/mibs && \ mkdir -p /var/lib/zabbix/modules && \ diff --git a/proxy-sqlite3/centos/README.md b/proxy-sqlite3/centos/README.md index 79b7319e4..72cce7e2d 100644 --- a/proxy-sqlite3/centos/README.md +++ b/proxy-sqlite3/centos/README.md @@ -199,6 +199,10 @@ Please use official documentation for [``zabbix_proxy.conf``](https://www.zabbix The volume is used by External checks (type of items). It is `ExternalScripts` parameter in ``zabbix_proxy.conf``. +### ``/var/lib/zabbix/db_data`` + +The volume stores SQLite3 database file and could be used for external database file storage. + ### ``/var/lib/zabbix/modules`` The volume allows load additional modules and extend Zabbix proxy using ``LoadModule`` feature. diff --git a/proxy-sqlite3/centos/docker-entrypoint.sh b/proxy-sqlite3/centos/docker-entrypoint.sh index 7e933ec53..ee04cdd17 100755 --- a/proxy-sqlite3/centos/docker-entrypoint.sh +++ b/proxy-sqlite3/centos/docker-entrypoint.sh @@ -139,7 +139,7 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "LogRemoteCommands" "${ZBX_LOGREMOTECOMMANDS}" update_config_var $ZBX_CONFIG "DBHost" - update_config_var $ZBX_CONFIG "DBName" "/var/lib/zabbix/zabbix_proxy_db" + update_config_var $ZBX_CONFIG "DBName" "/var/lib/zabbix/db_data/${ZBX_HOSTNAME:-"zabbix-proxy-sqlite3"}.sqlite" update_config_var $ZBX_CONFIG "DBUser" update_config_var $ZBX_CONFIG "DBPort" update_config_var $ZBX_CONFIG "DBPassword" diff --git a/proxy-sqlite3/ubuntu/Dockerfile b/proxy-sqlite3/ubuntu/Dockerfile index ba4e677cb..5dc61bee5 100644 --- a/proxy-sqlite3/ubuntu/Dockerfile +++ b/proxy-sqlite3/ubuntu/Dockerfile @@ -31,6 +31,7 @@ RUN set -eux && \ zabbix && \ mkdir -p /etc/zabbix && \ mkdir -p /var/lib/zabbix && \ + mkdir -p /var/lib/zabbix/db_data && \ mkdir -p /var/lib/zabbix/enc && \ mkdir -p /var/lib/zabbix/mibs && \ mkdir -p /var/lib/zabbix/modules && \ diff --git a/proxy-sqlite3/ubuntu/README.md b/proxy-sqlite3/ubuntu/README.md index 79b7319e4..72cce7e2d 100644 --- a/proxy-sqlite3/ubuntu/README.md +++ b/proxy-sqlite3/ubuntu/README.md @@ -199,6 +199,10 @@ Please use official documentation for [``zabbix_proxy.conf``](https://www.zabbix The volume is used by External checks (type of items). It is `ExternalScripts` parameter in ``zabbix_proxy.conf``. +### ``/var/lib/zabbix/db_data`` + +The volume stores SQLite3 database file and could be used for external database file storage. + ### ``/var/lib/zabbix/modules`` The volume allows load additional modules and extend Zabbix proxy using ``LoadModule`` feature. diff --git a/proxy-sqlite3/ubuntu/docker-entrypoint.sh b/proxy-sqlite3/ubuntu/docker-entrypoint.sh index ff5a0f763..02f3e972f 100755 --- a/proxy-sqlite3/ubuntu/docker-entrypoint.sh +++ b/proxy-sqlite3/ubuntu/docker-entrypoint.sh @@ -139,7 +139,7 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "LogRemoteCommands" "${ZBX_LOGREMOTECOMMANDS}" update_config_var $ZBX_CONFIG "DBHost" - update_config_var $ZBX_CONFIG "DBName" "/var/lib/zabbix/zabbix_proxy_db" + update_config_var $ZBX_CONFIG "DBName" "/var/lib/zabbix/db_data/${ZBX_HOSTNAME:-"zabbix-proxy-sqlite3"}.sqlite" update_config_var $ZBX_CONFIG "DBUser" update_config_var $ZBX_CONFIG "DBPort" update_config_var $ZBX_CONFIG "DBPassword"