zabbix代理安装
环境介绍
操作系统:Centos 6.* ( 双核4G、硬盘至少20G)
zabbix server版本:3.2.6
zabbix agentd版本:3.0.3
zabbix_server IP : 192.168.1.127
zabbix_agentd IP : 192.168.1.101
zabbix agentd下载地址:http://repo.zabbix.com/zabbix/3.0/rhel/6/x86_64/
安装
yum -y install unixODBC
rpm -ivh zabbix-agent-3.0.3-1.el6.x86_64.rpm

修改zabbix_agentd配置文件
配置文件路径:/etc/zabbix/zabbix_agentd.conf
sed -i 's/Server=127.0.0.1/Server=192.168.1.127/g' /etc/zabbix/zabbix_agentd.conf
sed -i 's/ServerActive=127.0.0.1/ServerActive=192.168.1.127/g' /etc/zabbix/zabbix_agentd.conf
sed -i 's/Hostname=Zabbix server/Hostname=192.168.1.101/g' /etc/zabbix/zabbix_agentd.conf
grep "Server" /etc/zabbix/zabbix_agentd.conf | grep -v '^#'

zabbix_agentd服务启动
/etc/init.d/zabbix-agent start #启动
/etc/init.d/zabbix-agent restart #重启
对zabbix_server 开放10050端口
vim /etc/sysconfig/iptables
-A INPUT -s 192.168.1.127/32 -p tcp -m tcp --dport 10050 -j ACCEPT
:wq
重启防火墙生效
service iptables restart
zabbix web端配置
web端登录:http://192.168.1.127
1:1(配置)-》2(主机)-》3(添加主机)

2:填写主机相关信息

1: 主机名称必须是zabbix_agentd.conf中hostname指定得名称
2: 可见名称可以任意
3:主机必须放在群组当中否则创建不成功,在此放在了zabbix默认的群组中
4:指定接口地址,将ip地址修改成zabbix_agentd端服务器ip地址即可
5:已启用必须选中,当不需要监控此代理端可不选
6:以上填写完后必须添加才可生效

1:点击已创建的主机名
2:选中模板
3:选择需链接的模板
4:添加(一定记得点添加)
5:更新(同上)

完成zabbix agentd安装
注意
1:zabbix_agentd报错

解决方法
yum update #更新源

2:zabbix_agentd启动失败,查看selinux是否已关。
vim /etc/selinux/config
修改成SELINUX=disabled
setenforce 0 #关闭下
网友评论