Skip to content

Commit

Permalink
Allow custom DB name for Proxy SQLite3 variant
Browse files Browse the repository at this point in the history
  • Loading branch information
dotneft committed Aug 4, 2021
1 parent be3c3c0 commit 3d24636
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions proxy-sqlite3/ol/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,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 && \
Expand Down
4 changes: 4 additions & 0 deletions proxy-sqlite3/ol/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion proxy-sqlite3/ol/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions proxy-sqlite3/rhel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ RUN set -eux && INSTALL_PKGS="bash \
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 /usr/lib/zabbix/externalscripts && \
mkdir -p /var/lib/zabbix/mibs && \
Expand Down
6 changes: 5 additions & 1 deletion proxy-sqlite3/rhel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -248,7 +252,7 @@ To minimize image size, it's uncommon for additional related tools (such as `git

This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of.

## `zabbix-agent:ol-<version>`
## `zabbix-proxy-sqlite3:ol-<version>`

Oracle Linux is an open-source operating system available under the GNU General Public License (GPLv2). Suitable for general purpose or Oracle workloads, it benefits from rigorous testing of more than 128,000 hours per day with real-world workloads and includes unique innovations such as Ksplice for zero-downtime kernel patching, DTrace for real-time diagnostics, the powerful Btrfs file system, and more.

Expand Down
2 changes: 1 addition & 1 deletion proxy-sqlite3/rhel/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 3d24636

Please sign in to comment.