Skip to content

Install and Configure Zabbix Proxy

Video Lecture

Install and Configure Zabbix Proxy Install and Configure Zabbix Proxy

Description

I start with a brand-new installation of Raspberry Pi OS Lite. I use the 64 Bit version without the Desktop GUI.

You can get the installer from https://www.raspberrypi.com/software/

Raspberry Pi OS Lite doesn't enable SSH by default so it is important to enable it using the installer interface before you continue.

After creating the install media, I insert it into my Raspberry Pi, power it up and then SSH onto it.

Next,

I install Zabbix Proxy to manage communication between the Server and Agents on my local network.

Note

It is important to know which operating system you intend to use for your proxy. To find which operating system you are using, at the prompt, type one of these commands,

hostnamectl

cat /etc/os-release

lsb_release -a

On my raspberry pi, hostnamectl returns Operating System: Debian GNU/Linux 12 (bookworm)

I select Raspberry Pi OS for the OS distribution and 12 (Bookworm) for the OS version on the Zabbix download page.

My Raspberry Pi is running Raspbian PI OS Lite (64 Bit) (No desktop GUI).

The commands used in this lecture are,

#
wget https://repo.zabbix.com/zabbix/7.0/raspbian/pool/main/z/zabbix-release/zabbix-release_latest+debian12_all.deb

Note

Remember that if you are not a root user, then prefix your commands with sudo

#
dpkg -i zabbix-release_latest+debian12_all.deb
#
apt update
#
apt install zabbix-proxy-sqlite3

Other database options for Zabbix proxy are MySQL and PostgreSQL.

They can be installed by using

#
apt install zabbix-proxy-mysql

or

#
apt install zabbix-proxy-pgsql

Note that with the sqlite3 version, you won't need to install the database schema since it will be automatically created if it doesn't already exist.

If you use MySQL or PostgreSQL then you also need to install the schema.

Edit Proxy Configuration file

Edit the Server, Hostname and DBName parameters.

#
nano /etc/zabbix/zabbix_proxy.conf

zabbix_proxy.conf

Key Value Notes
Proxymode 0 0 = Active. This is the default already.
Server domain name or IP The DNS name or IP address of your Zabbix server.
Hostname raspberrypi Use whatever hostname you desire.
DBName /tmp/zabbix_proxy.db I am using the SQLite3 database option.

I save, then I enter

#
service zabbix-proxy start

To ensure that Zabbix Proxy auto starts after reboot then enter,

#
systemctl enable zabbix-proxy.service

Add Proxy to Zabbix Server UI

I then create the proxy in Zabbix Server UI, then after several seconds, I refresh the proxy config screen and it will show that the proxy is now in communication with the server.

Zabbix UI ⇾ Administration ⇾ Proxies

Key Value Notes
Proxy name raspberrypi (see notes below)
Proxy mode Active The is the same as is set on the configuration file on the proxy server.

Note

The Proxy name must be the same name you configured in the Hostname parameter in the proxy configuration file /etc/zabbix/zabbix_proxy.conf on your proxy server. In my example, it doesn't matter that my Zabbix server is on a different network than the proxy. All messages received on the Zabbix Server from the external Proxy will contain this hostname in the payload, so the Zabbix Server process will reject anything that doesn't match.

Also note that the Proxy name is the only required parameter on this form. You don't need anything else to make it work.

For extra security also use PSK encryption, but that is discussed later on the course in the section Enable PSK Encryption. The process is conceptually the same for the Proxy, except, you add your PSK values to the /etc/zabbix/zabbix_proxy.conf on your proxy server, rather than the agent configs /etc/zabbix/zabbix_agentd.conf as discussed in the example. You also configure this on the Zabbix UI in the Administration ⇾ proxies ⇾ [Your proxy] ⇾ Encryption. This method is for communications between the Zabbix server and the Proxy only. I advise doing the Agent example of setting up PSK before trying to do PSK encryption for the Zabbix Server<-->Proxy communications unless you are totally confident you know what you are doing. Make sure all your communications between all your hosts, proxies, server are working before adding encryption to any parts of the communications between any components, since it wil make problem solving much harder. Solve one problem at a time.

Troubleshooting

Proxy Configuration

Check the output of

#
service zabbix-proxy status

Check the output of

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

Also be sure that the name of your proxy in the Zabbix User Interface, Administration ⇾ Proxies is the same as your Hostname setting in the Zabbix proxy config in /etc/zabbix/zabbix_proxy.conf

Proxies

Comments