CentOS Stream 9
Sponsored Link

Zabbix 6.0 : Configure Zabbix Proxy2022/09/29

Configure Zabbix Proxy to reduce workload on Zabbix Server or to collect data from hosts which they can not communicate with Zabbix Server directly.
This example is based on the environment like follows.
* dlp.srv.world    [Zabbix Server (]
* prox.srv.world   [Zabbix Proxy  (,]
* node02.srv.world [Zabbix Agent  (]

[2] Install Zabbix Proxy.
[root@prox ~]#
dnf -y install https://repo.zabbix.com/zabbix/6.0/rhel/9/x86_64/zabbix-release-6.0-3.el9.noarch.rpm
[root@prox ~]#
dnf -y install zabbix-proxy-mysql zabbix-sql-scripts

[3] Create a database for Zabbix Proxy.
[root@prox ~]#

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 9
Server version: 10.5.16-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> create database zabbix_proxy character set utf8mb4 collate utf8mb4_bin; 
Query OK, 1 row affected (0.00 sec)

# replace the [password] to any password you like
MariaDB [(none)]> grant all privileges on zabbix_proxy.* to zabbix@'localhost' identified by 'password'; 
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> flush privileges; 
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> exit

[root@prox ~]#
cat /usr/share/zabbix-sql-scripts/mysql/proxy.sql | mysql -uzabbix -p zabbix_proxy

Enter password:  
# the password you set above for [zabbix_proxy] user
[4] Configure Zabbix Proxy.
[root@prox ~]#
vi /etc/zabbix/zabbix_proxy.conf
# line 14 : add proxy mode
# 0 = active mode, 1 = passive mode

# line 32 : specify Zabbix server

# line 42 : specify Zabbix Proxy hostname

# line 158 : specify DB host

# line 171 : specify DB name

# line 186 : specify DB user

# line 195 : add DB user's password

[root@prox ~]#
systemctl enable --now zabbix-proxy
[5] If SELinux is enabled, change policy.
[root@prox ~]#
setsebool -P zabbix_can_network on

[6] If Firewalld is running, allow service port.
[root@prox ~]#
firewall-cmd --add-port=10051/tcp

[root@prox ~]#
firewall-cmd --runtime-to-permanent

For the settings of Zabbix Agent node, refer to here.
Replace Zabbix server address to Zabbix Proxy address on the settings of the link.
[8] Login to Zabbix admin site with admin user and click [Administration] - [Proxies] on the left pane, and then click Create Proxy] button on the upper-right.
[9] Input Zabbix Proxy parameters and click [Add] button.
For [Active] or [Passive], set it with the same one that you set [ProxyMode] in [zabbix_proxy.conf].
[10] If successfully added, following screen is shown.
[11] Add a new Zabbix Agent node. Input basic parameters as with common. For different point from normal Agent node, specify Zabbix Proxy on [Monitored by proxy] section.
[12] After few minutes, monitoring data are collected like follows if settings are OK.
Matched Content