Deployment Overview of Zabbix proxy on Server¶
Prerequisites and Basic Requirements¶
To ensure a successful deployment, the following requirements must be met:
-
Operating System: Ubuntu (version compatibility depends on the repository release).
-
Privileges: Root or sudo access is required for package installation and service management.
-
Dependencies: The system must have
ca-certificates,curl,gnupg, andapt-transport-httpsinstalled. -
Network Connectivity: Access to
repo.zabbix.comis required to fetch the Zabbix release packages.
FQDN of the final panel on the hostkey.in domain¶
The application uses a specific domain template for its web interface configuration:
| Parameter | Value |
|---|---|
| Prefix | zabbixproxy |
| Domain | hostkey.in |
| Full template | zabbixproxy{Server_ID_from_Invapi}.hostkey.in |
File and Directory Structure¶
The following directories are used for configuration, data, and SSL management:
-
/etc/zabbix/: Contains the main Zabbix Proxy configuration file (zabbix_proxy.conf). -
/var/lib/zabbix/: Data directory for the SQLite database. -
/root/nginx/: Contains the Docker Compose configuration for the Nginx reverse proxy. -
/data/nginx/user_conf.d/: Stores custom Nginx configuration files and SSL certificates.
Application installation process¶
The application is installed using a combination of the apt package manager and manual configuration:
-
Repository Setup: The Zabbix release repository is added to the system by downloading and installing the appropriate
.debpackage from the official Zabbix repository based on the OS version. -
Package Installation: Depending on the configured backend, one of the following packages is installed via
apt: -
For SQLite:
zabbix-proxy-sqlite3andzabbix-sql-scripts. -
For MySQL/MariaDB:
zabbix-proxy-mysql. -
For PostgreSQL:
zabbix-proxy-pgsql. -
Database Initialization:
-
If using SQLite, the directory
/var/lib/zabbixis created with ownership assigned to thezabbixuser. -
The configuration file
/etc/zabbix/zabbix_proxy.confis updated to point to the local SQLite database file:/var/lib/zabbix/zabbix_proxy.db. -
Service Configuration: Common parameters such as
ServerandHostnameare injected into the configuration file, and ownership of/etc/zabbixis recursively set to thezabbixuser.
Access Rights and Security¶
-
User Permissions: The application runs under the
zabbixsystem user for security isolation. -
Directory Permissions:
-
/var/lib/zabbixis restricted with mode0750. -
/etc/zabbixis owned by thezabbixgroup to ensure proper service access.
Databases¶
The application supports multiple database backends. Based on the current configuration, it uses SQLite:
| Parameter | Value |
|---|---|
| Backend Type | sqlite |
| Database File | /var/lib/zabbix/zabbix_proxy.db |
Docker Containers and Their Deployment¶
The deployment utilizes a Docker container to handle SSL termination and reverse proxying via Nginx:
-
Nginx Certbot Container
-
Image:
jonasal/nginx-certbot:latest -
Ports: Uses
hostnetwork mode. -
Volumes:
-
nginx_secrets:/etc/letsencrypt(External volume for SSL certificates) -
/data/nginx/user_conf.d:/etc/nginx/user_conf.d(Custom configuration mappings) -
Environment Variables:
[email protected] -
Restart Policy:
unless-stopped
Application Update Instructions¶
To update the Zabbix Proxy application, perform the following steps:
-
Update the local package index:
-
Upgrade the installed packages:
-
Restart the service to apply changes:
Location of configuration files and data¶
-
Main Configuration:
/etc/zabbix/zabbix_proxy.conf -
SQLite Database:
/var/lib/zabbix/zabbix_proxy.db -
Nginx Compose File:
/root/nginx/compose.yml
Available ports for connection¶
| Port | Service | Description |
|---|---|---|
| 443 | HTTPS | External access via Nginx Proxy |
| 8083 | Internal App | Local communication between Nginx and Zabbix |
Starting and Stopping the application¶
The service can be managed using systemctl:
-
Start Zabbix Proxy:
systemctl start zabbix-proxy -
Stop Zabbix Proxy:
systemctl stop zabbix-proxy -
Enable on Boot:
systemctl enable zabbix-proxy
Proxy Servers¶
The application uses an Nginx container (managed via Docker Compose) to provide SSL termination. It utilizes Certbot for automated certificate management and routes traffic from the external HTTPS port to the internal service running on port 8083. Custom domain configurations are managed within /data/nginx/user_conf.d/.