zabbix-agent 安装
1、下载安装包-对应的版本
http://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/
zabbix-agent-4.0.9-3.el7.x86_64.rpm zabbix-sender-4.0.9-3.el7.x86_64.rpm
2、上传到服务器:
3、安装zabbix-agent
[root@yuan zabbix]# rpm -ivh zabbix-agent-4.0.9-3.el7.x86_64.rpm zabbix-sender-4.0.9-3.el7.x86_64.rpm
warning: zabbix-agent-4.0.9-3.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID a14fe591: NOKEY
Preparing... ################################# [100%]
package zabbix-agent-4.0.9-3.el7.x86_64 is already installed
[root@yuan zabbix]# rpm -ivh zabbix-sender-4.0.9-3.el7.x86_64.rpm
warning: zabbix-sender-4.0.9-3.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID a14fe591: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:zabbix-sender-4.0.9-3.el7 ################################# [100%]
4、安装后进行配置
[root@yuan zabbix]# vi /etc/zabbix/zabbix_agentd.conf
[root@yuan zabbix]# grep -n "^[a-Z]" /etc/zabbix/zabbix_agentd.conf
13:PidFile=/var/run/zabbix/zabbix_agentd.pid
32:LogFile=/var/log/zabbix/zabbix_agentd.log
43:LogFileSize=0
98:Server=10.0.77.143
139:ServerActive=10.0.77.143
150:Hostname=yuan # 最好使用ip
268:Include=/etc/zabbix/zabbix_agentd.d/*.conf
287:UnsafeUserParameters=1
5、启动 zabbix-agent
[root@yuan zabbix]# systemctl start zabbix-agent.service
[root@yuan zabbix]# systemctl enable zabbix-agent.service
Created symlink from /etc/systemd/system/multi-user.target.wants/zabbix-agent.service to /usr/lib/systemd/system/zabbix-agent.service.
6、查看zabbix-agent 状态
[root@yuan zabbix]# systemctl status zabbix-agent
● zabbix-agent.service - Zabbix Agent
Loaded: loaded (/usr/lib/systemd/system/zabbix-agent.service; enabled; vendor preset: disabled)
Active: active (running) since Sat 2020-08-15 14:55:47 CST; 2min 9s ago
Main PID: 1764 (zabbix_agentd)
CGroup: /system.slice/zabbix-agent.service
├─1764 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
├─1765 /usr/sbin/zabbix_agentd: collector [idle 1 sec]
├─1766 /usr/sbin/zabbix_agentd: listener #1 [waiting for connection]
├─1767 /usr/sbin/zabbix_agentd: listener #2 [waiting for connection]
├─1768 /usr/sbin/zabbix_agentd: listener #3 [waiting for connection]
└─1769 /usr/sbin/zabbix_agentd: active checks #1 [idle 1 sec]
Aug 15 14:55:47 yuan systemd[1]: Starting Zabbix Agent...
Aug 15 14:55:47 yuan systemd[1]: Started Zabbix Agent.
7、在zabbix-server上进行配置:
然后添加监控模板