安装客户端
#安装zabbix源、aliyu nYUM源 curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm #安装zabbix客户端 yum install zabbix-agent -y
sed -i.ori 's#Server=127.0.0.1#Server=172.16.1.61#' /etc/zabbix/zabbix_agentd.conf
# 启动客户端 systemctl start zabbix-agent.service #写入开机自启动 chmod +x /etc/rc.d/rc.local cat >>/etc/rc.d/rc.local<<EOF systemctl start zabbix-agent.service EOF
测试客户端是否出错
服务端安装zabbix-get检测工具
# 只能在服务端操作 yum install zabbix-get
在服务端进行测试
注意:只能在服务端进行测试
zabbix_get -s 127.0.0.1 -p 10050 -k "system.cpu.load[all,avg1]" zabbix_get -s 127.0.0.1 -p 10050 -k "system.cpu.load[all,avg1]"