Zabbix监控——Agent部署

Agent部署

配置yum源

[root@server02 ~]# vi /etc/yum.repos.d/zabbix.repo
[zabbix]
name=Zabbix Official Repository - $basearch
baseurl=http://repo.zabbix.com/zabbix/3.0/rhel/6/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX

[zabbix-non-supported]
name=Zabbix Official Repository non-supported - $basearch
baseurl=http://repo.zabbix.com/non-supported/rhel/6/$basearch/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
gpgcheck=1
[root@server02 ~]# yum -y install zabbix-agent
[root@server02 ~]# rpm -i http://repo.zabbix.com/zabbix/3.0/rhel/6/x86_64/zabbix-release-3.0-1.el6.noarch.rpm
warning: /var/tmp/rpm-tmp.HEsYuT: Header V4 DSA/SHA1 Signature, key ID 79ea5ed4: NOKEY

 编辑agent配置文件

[root@server02 ~]#  vi /etc/zabbix/zabbix_agentd.conf 
#修改被动的Server,主动的ServerActive
Server=zabbix-server服务端ip,两个用逗号隔开
ServerActive=zabbix-server服务端ip,两个用逗号隔开
Hostname=本机主机名
HostMetadataItem=system.uname
[root@server02 ~]# /etc/init.d/zabbix-agent start 
# 检查一下
[root@server02 ~]# cat /etc/zabbix/zabbix_agentd.conf | grep -v "^#" | grep -v "^$"

等待一段时间主机以监控上

 

原文地址:https://www.cnblogs.com/Wshile/p/12870055.html