Zabbix-proxy deployment & running
The premise
Version: Zabbix-Server 5.4
Task: To monitor network devices using SNMP, the device is sent to zabbix-server through Zabbix-proxy.
Install the Zabbix – Proxy
- Install the Zabbix repository
DPKG wget https://repo.zabbix.com/zabbix/5.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.4-1+ubuntu20.04_all.deb -i zabbix - release_5. 4-1 + ubuntu20.04 _all. Deb apt updateCopy the code
- Install Zabbix-proxy & mysql
Here I chose mysql as the database
apt install mysql-server
apt install zabbix-proxy-mysql
- Import data
zcat /usr/share/doc/zabbix-proxy-mysql/schema.sql.gz | mysql -uzabbix -p zabbix
I don’t think we can get through here. I installed it twice and found no schema.sql.gz file. If you are, you need to look for this SQL file.
Download 5.4 source package:Wget HTTP: / / https://cdn.zabbix.com/zabbix/sources/stable/5.4/zabbix-5.4.1.tar.gz
After decompression, inZabbix - 5.4.1 / databases/mysql / /
中
Through the cat schema. SQL | mysql – uzabbix – p import into the database.
4. Configuration zabbix – proxy
vim /etc/zabbix/zabbix_proxy.conf
Change the Zabbix Server address,Hostname, in the Server add, this name should be the same as here.
Change the database name, user name, and password to correct.
Other configurations can be configured as required. For example, server configuration frequency, log location, local cache time, active/passive, listening port, etc.
- Start the zabbix – proxy
systemctl start zabbix-proxy && systemctl enable zabbix-proxy
- Add proxy to zabbix-server and select proxy on the corresponding host.
zabbix-proxy log
The default location is /var/log/zabbix/zabbix_proxy.log
I wish good! End of this article.