Skip to content

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, and apt-transport-https installed.

  • Network Connectivity: Access to repo.zabbix.com is 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:

  1. Repository Setup: The Zabbix release repository is added to the system by downloading and installing the appropriate .deb package from the official Zabbix repository based on the OS version.

  2. Package Installation: Depending on the configured backend, one of the following packages is installed via apt:

  3. For SQLite: zabbix-proxy-sqlite3 and zabbix-sql-scripts.

  4. For MySQL/MariaDB: zabbix-proxy-mysql.

  5. For PostgreSQL: zabbix-proxy-pgsql.

  6. Database Initialization:

  7. If using SQLite, the directory /var/lib/zabbix is created with ownership assigned to the zabbix user.

  8. The configuration file /etc/zabbix/zabbix_proxy.conf is updated to point to the local SQLite database file: /var/lib/zabbix/zabbix_proxy.db.

  9. Service Configuration: Common parameters such as Server and Hostname are injected into the configuration file, and ownership of /etc/zabbix is recursively set to the zabbix user.

Access Rights and Security

  • User Permissions: The application runs under the zabbix system user for security isolation.

  • Directory Permissions:

  • /var/lib/zabbix is restricted with mode 0750.

  • /etc/zabbix is owned by the zabbix group 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 host network 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:

  1. Update the local package index:

    apt update
    

  2. Upgrade the installed packages:

    apt upgrade zabbix-proxy-sqlite3
    

  3. Restart the service to apply changes:

    systemctl restart zabbix-proxy
    

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/.

question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×