diff --git a/proxy-sqlite3/alpine/Dockerfile b/proxy-sqlite3/alpine/Dockerfile index 0107167bb..e5ebd6df5 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 590a16714..ef783bc63 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 7d7381b6d..81625d540 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 590a16714..ef783bc63 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 dc82e13d1..e8f5eefa5 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 5c9dd67b0..b316091db 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"