Set up Zabbix 7 distributed monitoring with proxy servers for scalable infrastructure oversight

Intermediate 45 min Apr 20, 2026
Ubuntu 24.04 Debian 12 AlmaLinux 9 Rocky Linux 9

Configure Zabbix proxy servers to distribute monitoring loads across multiple network segments with encrypted communication, automated discovery, and centralized management for enterprise-scale infrastructure monitoring.

Prerequisites

  • Existing Zabbix 7 server installation
  • Network connectivity between proxy and server
  • Administrative access to proxy servers
  • Basic understanding of network monitoring concepts

What this solves

Zabbix proxy servers distribute monitoring loads across network segments, reducing bandwidth usage and enabling monitoring of isolated networks. This setup scales monitoring beyond single-server limitations while maintaining centralized control and reporting through encrypted PSK communication.

Step-by-step installation

Update system packages

Start by updating your package manager to ensure you get the latest versions of all components.

sudo apt update && sudo apt upgrade -y
sudo dnf update -y

Install Zabbix repository

Add the official Zabbix 7 repository to access the latest stable packages.

wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest+ubuntu24.04_all.deb
sudo dpkg -i zabbix-release_latest+ubuntu24.04_all.deb
sudo apt update
sudo rpm -Uvh https://repo.zabbix.com/zabbix/7.0/rocky/9/x86_64/zabbix-release-latest.el9.noarch.rpm
sudo dnf clean all
sudo dnf update

Install Zabbix proxy server

Install the Zabbix proxy package with SQLite3 support for local data storage and caching.

sudo apt install -y zabbix-proxy-sqlite3 zabbix-sql-scripts
sudo dnf install -y zabbix-proxy-sqlite3 zabbix-sql-scripts

Create proxy database directory

Set up the directory structure for the SQLite database with proper permissions for the Zabbix user.

sudo mkdir -p /var/lib/zabbix
sudo chown zabbix:zabbix /var/lib/zabbix
sudo chmod 755 /var/lib/zabbix

Generate PSK encryption key

Create a pre-shared key for encrypted communication between proxy and server. Store this securely as you'll need it on the Zabbix server.

sudo mkdir -p /etc/zabbix/keys
sudo openssl rand -hex 32 | sudo tee /etc/zabbix/keys/proxy.psk
sudo chown zabbix:zabbix /etc/zabbix/keys/proxy.psk
sudo chmod 400 /etc/zabbix/keys/proxy.psk

Configure Zabbix proxy

Configure the proxy with server connection details, encryption settings, and local cache parameters.

Server=203.0.113.10
Hostname=proxy-site1
ListenPort=10051
SourceIP=203.0.113.20
DBName=/var/lib/zabbix/zabbix_proxy.db
ProxyOfflineBuffer=24
ConfigFrequency=300
DataSenderFrequency=1

PSK Encryption

TLSConnect=psk TLSAccept=psk TLSPSKIdentity=proxy-site1 TLSPSKFile=/etc/zabbix/keys/proxy.psk

Cache settings

CacheSize=32M HistoryCacheSize=64M HistoryIndexCacheSize=16M TrendCacheSize=16M

Process settings

StartPollers=10 StartPollersUnreachable=5 StartTrappers=10 StartPingers=5 StartDiscoverers=3

Set configuration file permissions

Secure the configuration file to prevent unauthorized access to sensitive connection details.

sudo chown root:zabbix /etc/zabbix/zabbix_proxy.conf
sudo chmod 640 /etc/zabbix/zabbix_proxy.conf

Configure firewall rules

Open the necessary ports for proxy communication with the Zabbix server and monitored devices.

sudo ufw allow 10051/tcp comment "Zabbix Proxy"
sudo ufw allow 162/udp comment "SNMP Traps"
sudo ufw reload
sudo firewall-cmd --permanent --add-port=10051/tcp
sudo firewall-cmd --permanent --add-port=162/udp
sudo firewall-cmd --reload

Enable and start Zabbix proxy

Start the proxy service and enable it to automatically start on system boot.

sudo systemctl enable --now zabbix-proxy
sudo systemctl status zabbix-proxy

Configure Zabbix server for proxy

Add proxy to Zabbix server

Configure the proxy on your main Zabbix server through the web interface or database. Access Administration > Proxies in the Zabbix web interface.

SettingValueDescription
Proxy nameproxy-site1Must match Hostname in proxy config
Proxy modeActiveProxy initiates connection to server
Proxy address203.0.113.20IP address of proxy server
EncryptionPSKEnable PSK encryption
PSK identityproxy-site1Must match proxy configuration
PSK[key from file]Copy content from proxy.psk file

Configure network discovery

Set up network discovery rules to automatically find and monitor devices through the proxy. Go to Configuration > Discovery in the Zabbix interface.

Name: Site1-Network-Discovery
IP ranges: 192.168.1.1-254
Proxy: proxy-site1
Checks:
  - SNMP v2 community: public
  - ICMP ping
  - HTTP/HTTPS
  - SSH
Update interval: 1h
Device uniqueness criteria: IP address

Configure proxy monitoring and templates

Apply host templates through proxy

Assign monitoring templates to hosts that will be monitored through the proxy. This enables distributed monitoring while maintaining centralized template management.

1. Go to Configuration > Hosts
  1. Create new host or edit existing
  2. Set 'Monitored by proxy' to 'proxy-site1'
  3. Assign appropriate templates:
- Template OS Linux by SNMP - Template Net Network Devices - Template App HTTP Service
  1. Configure host interface with proxy settings

Configure proxy health monitoring

Set up monitoring for the proxy itself to ensure it remains healthy and connected to the main server.

zabbix[proxy,proxy-site1,lastaccess]
zabbix[proxy,proxy-site1,delay]
zabbix[proxy,proxy-site1,items]
zabbix[proxy,proxy-site1,hosts]
zabbix[proxy,proxy-site1,triggers]

Set up multiple proxy deployment

Deploy additional proxies

For large environments, deploy multiple proxies to distribute load across network segments. Each proxy needs unique configuration.

# Proxy 2 configuration differences
Hostname=proxy-site2
SourceIP=203.0.113.30
TLSPSKIdentity=proxy-site2
TLSPSKFile=/etc/zabbix/keys/proxy2.psk

Proxy 3 configuration differences

Hostname=proxy-datacenter1 SourceIP=10.0.1.50 TLSPSKIdentity=proxy-datacenter1 TLSPSKFile=/etc/zabbix/keys/proxy3.psk

Configure proxy load balancing

Distribute monitoring loads across multiple proxies by assigning different network segments or device types to each proxy.

ProxyNetwork SegmentDevice TypesMax Hosts
proxy-site1192.168.1.0/24Network devices, servers100
proxy-site2192.168.2.0/24Workstations, printers200
proxy-datacenter110.0.1.0/24Critical servers, storage50

Advanced proxy configuration

Configure passive proxy mode

For environments where proxies cannot initiate outbound connections, configure passive mode where the server connects to proxies.

# On proxy server - disable active mode
Server=203.0.113.10
ListenIP=0.0.0.0
ListenPort=10051

Server must be configured to connect to proxy

In Zabbix interface:

Proxy mode: Passive

Interface IP: 203.0.113.20

Interface Port: 10051

Configure proxy data retention

Set appropriate data retention policies to manage local storage and prevent disk space issues during network outages.

ProxyLocalBuffer=168
ProxyOfflineBuffer=720
HeartbeatFrequency=60
ConfigFrequency=300
DataSenderFrequency=1

Local database maintenance

HousekeepingFrequency=1 MaxHousekeeperDelete=5000

Monitor proxy performance

Set up proxy performance monitoring

Monitor key proxy metrics to ensure optimal performance and identify potential bottlenecks.

# Queue sizes
zabbix[queue,10m]
zabbix[queue,overview]

Process utilization

zabbix[process,poller,avg,busy] zabbix[process,trapper,avg,busy] zabbix[process,discoverer,avg,busy]

Cache utilization

zabbix[rcache,buffer,pused] zabbix[wcache,values] zabbix[dcache,buffer,pused]

Verify your setup

# Check proxy status
sudo systemctl status zabbix-proxy

Verify proxy log for successful connection

sudo tail -f /var/log/zabbix/zabbix_proxy.log

Check database creation

sudo ls -la /var/lib/zabbix/

Verify PSK file exists and has correct permissions

sudo ls -la /etc/zabbix/keys/proxy.psk

Test proxy connectivity

sudo netstat -tlnp | grep 10051

Check proxy registration on server

zabbix_get -s 203.0.113.10 -k zabbix[proxy,proxy-site1,lastaccess]

Common issues

SymptomCauseFix
Proxy won't startDatabase path not writablesudo chown zabbix:zabbix /var/lib/zabbix
PSK connection failsKey mismatch or permissionsVerify PSK content matches on server, check file permissions 400
Discovery not workingFirewall blocking SNMPOpen port 161/udp: sudo ufw allow 161/udp
High proxy queueInsufficient pollersIncrease StartPollers in configuration
Database lock errorsMultiple proxy instancessudo pkill zabbix_proxy && sudo systemctl start zabbix-proxy
Proxy shows offlineNetwork connectivity issuesCheck firewall rules and network routing

Next steps

Running this in production?

Need this managed? Setting this up once is straightforward. Keeping it patched, monitored, backed up and performant across environments is the harder part. See how we run infrastructure like this for European teams who need reliable monitoring at scale.

Automated install script

Run this to automate the entire setup

Need help?

Don't want to manage this yourself?

We handle managed devops services for businesses that depend on uptime. From initial setup to ongoing operations.