Linux 下zabbix-agent免安装版配置
检查服务器端zabbix-server的版本
[root@zabbix ~]# zabbix_server -V
登录官网,选择对应版本的zabbix-agent版本
https://www.zabbix.com/download_agents?version=5.0+LTS&release=5.0.0&os=Linux&os_version=3.0&hardware=i386&encryption=No+encryption&packaging=Archive
[root@test-server src]# wget https://cdn.zabbix.com/zabbix/binaries/stable/5.0/5.0.10/zabbix_agent-5.0.10-linux-3.0-i386-static.tar.gz
解压缩后,看到有三个文件夹:
[root@test-server src]# tar -xvf zabbix_agent-5.0.10-linux-3.0-i386-static.tar.gz -C zabbix_agent/
[root@test-server src]# mv zabbix_agent /usr/local/
[root@test-server src]# cd /usr/local/zabbix_agent/conf/
[root@test-server conf]# vi zabbix_agentd.conf
[root@test-server conf]# egrep -v "#|^$" zabbix_agentd.conf
[root@test-server system]# systemctl daemon-reload
[root@test-server conf]# systemctl start zabbix-agent.service
检查启动的服务:
[root@test-server ~]# netstat -nutpl |grep zabbix
设置为开机自启动:
[root@test-server ~]# systemctl enable zabbix-agent
配置防火墙
配置防火墙放通10050端口:
[root@test-server ~]# firewall-cmd --zone=public --add-port=10050/tcp --permanent
[root@test-server ~]# firewall-cmd --reload
[root@test-server ~]# firewall-cmd --list-ports
连接模板:
配置好后,稍等会儿刷新就能看到已连接成功:
Zabbix5.0企业级分布式监控系统:精讲与企业应用