1.应用场景:
Zabbix监控系统提供两种监控Linux主机的方法,一种是启用主机上的SNMP协议,另一种是在主机上安装Zabbix Agent服务,本篇介绍Linux系统下Zabbix Agent的安装与使用。
2.添加Repository:
本文使用yum方式安装Zabbix Agent,在安装前首先添加对应的yum repository,以下列出了CentOS/RHEL版本的添加地址:
CentOS/RHEL 7:
# rpm -Uvh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
CentOS/RHEL 6:
# rpm -Uvh http://repo.zabbix.com/zabbix/3.2/rhel/6/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
CentOS/RHEL 5:
# rpm -Uvh http://repo.zabbix.com/zabbix/3.2/rhel/5/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
3.安装Zabbix Agent
yum install zabbix-agent
4.编辑Zabbix Agent 配置文件
vim /etc/zabbix/zabbix_agentd.conf
Server=[zabbix server ip]
ServerActive=[zabbix server ip]
Hostname=[ Hostname of client system ]
5.重启Zabbix Agent
service zabbix-agent restart
6.添加开机启动
chkconfig zabbix-agent on