Howto Configure Zabbix Proxy for External Monitoring on CentOS 7

Zabbix is one the best Open Source network monitoring tool for monitoring an infrastructure. It has many features to monitor services and hosts from low level to high level. So among its all features, we are going to discuss and setup its one the most important and useful feature to provision Zabbix Proxy. To implement Zabbix Proxy for centralized and distributed monitoring is good for your remote host monitoring. When all agents and proxies reports to one Zabbix server and all data is being collected at central location.

How it Works

Zabbix Proxies are useful when a server is is not able to communicate directly to the monitored machines. This is common when Organizations have to be monitored, or when there are some restrictions in a large corporate network. Once we had done with Zabbix Proxy setup then connections to the Zabbix Server come from the Proxy Server which will do all the monitoring on the behalf of Zabbix server.

zabbix proxy

Setting up Proxy Server

We will be using a separate Linux server with CentOS 7 as the base operating system with MySQL database server installed on it that will be used as a local database for Proxy server. So in this article we assume that you already had setup your Zabbix Server, if not you can follow our Zabbix Server Installation Tutorial.

Zabbix Proxy Installation Setup

Different options are available to install zabbix proxy by using Zabbix RPMs, Creating your own Repo or from the source.

So in this tutorial we will follow the installation process by using its available RPMs.

Configure the ZabbixZone package repository and GPG key

Let’s import Zabbix GPG key and its latest available repository by using the below commands.

[root@centos-007 ~]# rpm --import
[root@centos-007 ~]# rpm -Uv
Zabbix RPM

Installing Zabbix Proxy

We have to create a separate user and group that will be used for zabbix running processes.
Let's create a group and a user with name "zabbix" as:

[root@centos-007 ~]# groupadd zabbix
[root@centos-007 ~]# useradd -g zabbix zabbix

Now run the zabbix proxy installation command with yum installer.

[root@centos-007 ~]# yum install zabbix-proxy-mysql.x86_64

After the installation process starts, press "Y" to confirm installation startup.

zabbix proxy install

Install necessary packages

Now we install install the necessary server's packages that we wish to install on the proxy server including zabbix server package in case if you want to monitor this as well.

Now, execute the following yum command to start installing packages for zabbix.

[root@centos-007 ~]# yum install mysql-server zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-java-gateway

The executed command will ends up with installation of all the packages that we mentioned in the command as shown.

zabbix packages

Database Setup for Zabbix Proxy

As we had done with installation of all prerequisite packages necessary for zabbix proxy, now we will setup its database using mysql. Proceeding to the database settings first check that your mysql server is up and you can login with your root password.

[root@centos-007 ~]# service mysqld status
[root@centos-007 ~]# mysql -u root -p

Creating new database

Once your mysql server is up and you are loged into it, create a new database for zabbix proxy.

mysql> create database zabbix character set utf8;
Query OK, 1 row affected (0.00 sec)

Assigning Privileges

In order to grant user level privileges on databases to zabbix user run the following command.

mysql> grant all privileges on zabbix.* to 'zabbix'@'localhost' identified by 'zbx123';
Query OK, 0 rows affected (0.01 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

Loading Zabbix Schema

Exit from the mysql database server and from the shell we nee to import zabbix schema into newly created database for zabbix proxy. Run the below commands to load zabbix schema from the zabbix database source for its latest version.

[root@centos-007 mysql]# pwd

The above command states that we are currently in mysql directory of zabbix source, here we run the command to import its schema into the newly created database for zabbix proxy.

[root@centos-007 mysql]# ls
data.sql images.sql schema.sql
[root@centos-007 mysql]# mysql -u zabbix -p zabbix < schema.sql
Enter password:

Zabbix Proxy Configuration

We are going to configure zabbix proxy configurations now, to do so let's open up the zabbix proxy conf file placed in "/etc/zabbix/" directory with your file editor.

[root@centos-007 ~]# vim /etc/zabbix/zabbix_proxy.conf

Now configure it with following options.

Put the IP of your Zabbix Server here, if its running on another machine.


Mention the hostname here that you like to configure it here.

#Hostname=Zabbix proxy

Give the database name, its user and password, that we had created above in zabbix database proxy settings.

# DBUser=
# DBPassword=

Now save the changes to the zabbix configurations file and close it with "wq!".

Start Zabbix Proxy Services

Run the "zabbix_proxy" command to start its service and then confirm its process with "ps" or "netstat " commands to confirm if its processes are running.

[root@centos-007 ~]# zabbix_proxy
[root@centos-007 ~]# netstat -anp | grep zabbix_proxy

Here is the snapshot of all the running processes under zabbix_proxy on port "10051".

zabbix proxy services

You can also check the zabbix proxy logs by opening up its logs file zabbix_proxy.log created in "/var/log/zabbix/" directory.

[root@centos-007 ~]#cat /var/log/zabbix/zabbix_proxy.log

Here can see its logs about successfully services start up in below image.

proxy logs

Configure Zabbix Proxy on Master Server

Now we need to configure the zabbix proxy on the master server. Open its dashboard and expand the "Administration" options and click to "Proxies", then click on the top right corner to "Create Proxy".

add new proxy

Monitoring New Host with Zabbix Proxy

Zabbix Proxy has been setup and configured in Master Zabbix Server, now we can add different hosts that we need to be monitored via proxy server.

Adding Proxy Agent

Let's install the zabbix agent on the host that you want to monitor through Zabbix Proxy and configure its configurations file with following options.

[root@proxy_agent ~]# vim /usr/local/etc/zabbix_agentd.conf

Now start zabbix agent services on and then add it on the master zabbix server as shown below.

proxy agent


Cheers! In this detailed article we learnt to setup stand alone zabbix proxy server on a Linux server with CentOS 7 operating system installed on it, with its configurations on master proxy server. We can add multiple zabbix agents on it that we want to monitor through zabbix proxy. Feel to write us in comments section if you face any issue during its setup.

5 Comments... add one

  1. When you are importing the schema, you stated:
    # mysql -u zabbix -p zabbix < schema.sql

    But the database is called zbx_proxy right? Where in the command is the database specified?

    Thank you!


    • Hi Tibe,

      Me bad, the database being used here is the 'zabbix' not 'zbx_proxy'. I will make the correction.

      Thank you so much for pointing out the mistake.


  2. Hey, I want to setup 3 zabbix proxy for my zabbix master server. So should i have separate database for all the proxy servers or only one database server will work for all the three proxy servers?

  3. Hello,
    I found with much interest the post and it help me to configure my proxy zabbix. but my problem is if I do "less /var/zabbix/zabbix_proxy.log I have that 1040:20200108:135148.889 cannot send proxy data to server at "": empty string received
    1040:20200108:135150.035 cannot send proxy data to server at "": empty string received
    1040:20200108:135151.186 cannot send proxy data to server at "": empty string received
    so the 10.51 is adress of my server zabbix. and on zabbix server the proxy is not discovery.
    have you a proposition for me please.


Leave a Comment