Would you like to learn how to do a Zabbix Proxy installation on Ubuntu Linux? In this tutorial, we are going to show you how to install and configure a Zabbix proxy on a computer running Ubuntu Linux version 18.

In our example, the Zabbix Server IP address is: 200.200.200.200

In our example, the Zabbix Proxy IP address is: 200.100.100.100

Hardware List:

The following section presents the list of equipment used to create this Zabbix tutorial.

Every piece of hardware listed above can be found at Amazon website.

Zabbix Playlist:

On this page, we offer quick access to a list of videos related to Zabbix installation.

Don’t forget to subscribe to our youtube channel named FKIT.

Tutorial – NTP on Ubuntu Linux

First, we are going to configure the system to use the correct date and time using NTP.

On the Linux console, use the following commands to set the correct timezone.

# dpkg-reconfigure tzdata

Install the Ntpdate package and set the correct date and time immediately.

# apt-get update
# apt-get install ntpdate
# ntpdate pool.ntp.br

The Ntpdate command was used to set the correct date and time using the server: pool.ntp.br

Let’s install the NTP service.

# apt-get install ntp

NTP is the service that will keep our server updated.

Use the command date to check the date and time configured on your Ubuntu Linux.

# date

If the system shown the correct date and time, this means that you followed all the steps correctly.

Tutorial – MySQL Ubuntu Linux

Now, we can proceed to the installation of the database service.

On the Linux console, use the following commands to install the required packages.

# apt-get update
# apt-get install mysql-server mysql-client

The installation wizard will ask you for a password to the root user.

If the installation wizard does not ask you for a password, it means that your root password is empty.

After finishing the installation, use the following command to access the MySQL database server.

To access the database server, enter the password set on the MySQL server installation wizard.

# mysql -u root -p

Use the following SQL command to create a database named zabbix.

CREATE DATABASE zabbix CHARACTER SET UTF8 COLLATE UTF8_BIN;

Use the following SQL command to create a database user named zabbix.

CREATE USER ‘zabbix’@’%’ IDENTIFIED BY ‘kamisama123’;

Give the SQL user named zabbix permission over the database named zabbix.

GRANT ALL PRIVILEGES ON zabbix.* TO ‘zabbix’@’%’;
quit;

On the Linux console, use the following commands to download the Zabbix installation package.

# mkdir /downloads
# cd /downloads
# wget https://ufpr.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.4.12/zabbix-3.4.12.tar.gz

Now, we need to import Zabbix database template inside MySQL.

Extract the Zabbix installation package and import the database template inside MySQL.

The system will request the password of the Zabbix SQL user everytime you try to import a file.

# tar -zxvf zabbix-3.4.12.tar.gz
# cd zabbix-3.4.12/database/mysql
# mysql -u zabbix -p zabbix < schema.sql

You have finished the database installation.

You have imported the Zabbix database schema on the MySQL Server.

Tutorial – Zabbix Proxy Installation on Ubuntu

Now, we need to install the Zabbix Proxy on Ubuntu Linux.

On the Linux console, use the following commands to install the required packages.

# groupadd zabbix
# useradd -g zabbix -s /bin/bash zabbix
# apt-get update
# apt-get install build-essential libmysqlclient-dev libssl-dev libsnmp-dev libevent-dev
# apt-get install libopenipmi-dev libcurl4-openssl-dev libxml2-dev libssh2-1-dev libpcre3-dev
# apt-get install libldap2-dev libiksemel-dev libcurl4-openssl-dev libgnutls28-dev fping

On the Linux console, use the following commands to access the Zabbix package folder.

# cd /downloads/zabbix-3.4.12
# ls
aclocal.m4 build conf configure database include m4 man NEWS src
AUTHORS ChangeLog config.guess configure.ac depcomp INSTALL Makefile.am misc README upgrades
bin compile config.sub COPYING frontends install-sh Makefile.in missing sass

Compile and install the Zabbix Proxy using the following commands:

# ./configure –enable-proxy –enable-agent –with-mysql –with-openssl –with-net-snmp –with-openipmi –with-libcurl –with-libxml2 –with-ssh2 –with-ldap
# make
# make install

Now, you should find the location of the zabbix_proxy.conf file on your system.

After finding, you need to edit the zabbix_proxy.conf file.

# updatedb
# locate zabbix_proxy.conf
# vi /usr/local/etc/zabbix_proxy.conf

Here is the original file, before our configuration.

Server=127.0.0.1
Hostname=Zabbix proxy
LogFile=/tmp/zabbix_proxy.log
DBName=zabbix_proxy
DBUser=zabbix
Timeout=4
LogSlowQueries=3000

Here is the new file with our configuration.

ProxyMode=0
Server=200.200.200.200
Hostname=zabbix-my-proxy
LogFile=/tmp/zabbix_proxy.log
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=kamisama123
Timeout=4
LogSlowQueries=3000
StartVMwareCollectors=5
StartPingers=5
FpingLocation=/usr/bin/fping

In our example, the Zabbix proxy is configured to allow the connection from the Zabbix server 200.200.200.200.

The server with the IP address 200.200.200.200 is allowed to request and receive information from the proxy.

Now, you should find the location of the zabbix_agentd.conf file on your system.

After finding, you need to edit the zabbix_agentd.conf file.

# updatedb
# locate zabbix_agentd.conf
# vi /usr/local/etc/zabbix_agentd.conf

Here is the original file, before our configuration.

LogFile=/tmp/zabbix_agentd.log
Server=127.0.0.1
ServerActive=127.0.0.1
Hostname=Zabbix server

Here is the new file with our configuration.

LogFile=/tmp/zabbix_agentd.log
Server=127.0.0.1,200.200.200.200
ServerActive=200.200.200.200
Hostname=zabbix-my-proxy

In our example, the Zabbix agent is configured to allow the connection of the Zabbix server 200.200.200.200.

The server with the IP address 200.200.200.200 is allowed to request and receive information from the agent.

The Localhost, 127.0.0.1, is allowed to request and receive information from the agent.

After finishing the configuration, use the following command to start the Zabbix proxy:

# /usr/local/sbin/zabbix_proxy

After finishing the configuration, use the following command to start the Zabbix Agent:

# /usr/local/sbin/zabbix_agentd

Tutorial – Adding a Zabbix Proxy to Zabbix Server

Now, we need to access the Zabbix server dashboard and add a new Proxy.

Open your browser and enter the IP address of your web server plus /zabbix.

In our example, the following URL was entered in the Browser:

• http://35.162.85.57/zabbix

On the login screen, use the default username and default password.

• Default Username: Admin
• Default Password: zabbix

zabbix login

After a successful login, you will be sent to the Zabbix Dashboard.

zabbix dashboard

On the dashboard screen, access the Configuration menu and select the Host option.

zabbix proxy menu

On the top right of the screen, click on the Create proxy button.

On the Proxy configuration screen, you will have to enter the following information:

• Host Name – Enter a Hostname to monitor.
• Visible Hostname – Repeat the hostname.
• New group – Enter a name to identify a group of similar devices.
• Agent Interface – Enter the IP address of the Hostname.

Here is the original image, before our configuration.

Zabbix Proxy

Click on the Add button.

Wait 3 minutes for the Zabbix server to read the list of Proxies and update the configuration.

After 3 minutes, go back to the console of the computer running  Zabbix proxy.

After finishing the configuration, use the following command to start the Zabbix proxy service:

# /usr/local/sbin/zabbix_proxy

Wait 3 minutes for the Zabbix proxy to read the list of configurations from the Zabbix Server.

Congratulations! You have finished the Zabbix Proxy installation and configuration.

Tutorial – Monitor the Proxy Computer

Now, we are going to configure Zabbix to monitor the computer running the Proxy service.

Access the Zabbix server dashboard and add the Proxy computer as a Host.

zabbix dashboard

On the dashboard screen, access the Configuration menu and select the Host option.

zabbix add host

On the top right of the screen, click on the Create host button.

Zabbix Create Host

On the Host configuration screen, you will have to enter the following information:

• Host Name – Enter the Zabbix Proxy Hostname.
• Visible Hostname – Repeat the hostname.
• New group – Enter a name to identify a group of similar devices.
• Agent Interface – Enter the IP address of the Proxy server.

Here is the original image, before our configuration.

zabbix linux - Antes

Here is the new image with our configuration.

Zabbix Proxy Host

Next, we need to associate the host with a specific network monitor template.

By default, Zabbix comes with a large variety of monitoring templates.

Access the Templates tab on the top of the screen.

Click on the Select button and locate the template named: TEMPLATE APP ZABBIX PROXY.

Zabbix Proxy Template

Click on the Add button (1).

Click on the Add button (2).

After a few minutes, you will be able to see the initial result on the Zabbix Dashboard.

The final result will take at least one hour.

By default, Zabbix will wait 1 hour to discover the number of interfaces available on the Proxy computer.

By default, Zabbix will wait 1 hour before collect information from the network interfaces.

Congratulations! You have configured the Zabbix server to monitor the Zabbix Proxy computer.