Skip to main content

Setting up a Zabbix Proxy

Zabbix is a great monitoring tool with tons of capabilities. One such capability is the use of proxies. These allow you to monitor other networks in addition to the network that your Zabbix server resides on. For example, if you run Zabbix on a VPS or dedicated server, proxies would allow you to monitor devices on your home or work network.

Preparing the Zabbix server

Installing GNU Utilities

A Pre-Shared key is required for encrypted communications between the Zabbix server and the Zabbix proxy. We will generate one using psktool. This isn't usually included on Ubuntu Server, so install it with the following command:

sudo apt install gnutls-bin
Generating the PSK

Once installed, we will generate a new Pre-Shared Key (PSK). If you plan on setting up multiple proxies, it is best to generate a new PSK for each proxy.

psktool -u psk_identity -p zabbix002.psk -s 32

Copying the key

Due to the Pre-Shared nature of PSKs, the keyfile will need to be present on the Zabbix proxy in addition to the Zabbix server. Rsync is great for doing this.

This guide will assume that your Zabbix proxy is not accessible over the internet, so we will be using rsync to pull the zabbix002.psk from the Zabbix server.

sam@zabbix-proxy:~$ rsync "ZABBIX-SERVER-IP":zabbix002.psk zabbix002.psk

If your Zabbix server can connect to the Zabbix proxy via SSH, you can push the PSK instead:

sam@zabbix-server:~$ rsync zabbix002.psk "ZABBIX-PROXY-IP":zabbix002.psk