centos7安装zabbix4.4(zabbix-agent)

1 centos7安装zabbix4.4(zabbix-server)

《centos7安装zabbix4.4(zabbix-server)》:https://clevercode.blog.csdn.net/article/details/104229415

2 更新源

# rpm -Uvh https://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/zabbix-release-4.4-1.el7.noarch.rpm
# yum clean all

3 安装agent

# yum -y install zabbix-agent

4 配置agent

vim /etc/zabbix/zabbix_agentd.conf
172.16.159.131是zabbix-server端的ip,Hostname是zabbix-agent的hostname

Server=172.16.159.131
ServerActive=172.16.159.131
Hostname=php1.web

5 启动

# systemctl start zabbix-agent

6 开机启动

# systemctl enable zabbix-agent

7 查看日志

cat /var/log/zabbix/zabbix_agentd.log

[root@php1 ~]# cat /var/log/zabbix/zabbix_agentd.log
  1426:20200210:033159.439 Starting Zabbix Agent [php1.web]. Zabbix 4.4.5 (revision b93f5c4fc0).
  1426:20200210:033159.440 **** Enabled features ****
  1426:20200210:033159.440 IPv6 support:          YES
  1426:20200210:033159.440 TLS support:           YES
  1426:20200210:033159.440 **************************
  1426:20200210:033159.440 using configuration file: /etc/zabbix/zabbix_agentd.conf
  1426:20200210:033159.442 agent #0 started [main process]
  1430:20200210:033159.451 agent #4 started [listener #3]
  1431:20200210:033159.453 agent #5 started [active checks #1]
  1427:20200210:033159.456 agent #1 started [collector]
  1428:20200210:033159.462 agent #2 started [listener #1]
  1429:20200210:033159.464 agent #3 started [listener #2]
  1431:20200210:033202.456 active check configuration update from [172.16.159.131:10051] started to fail (ZBX_TCP_READ() timed out)
  1431:20200210:033302.564 active check configuration update from [172.16.159.131:10051] is working again
  1431:20200210:033302.565 no active checks on server [172.16.159.131:10051]: host [php1.web] not found
[root@php1 ~]#

8 在zabbix-server上添加agent主机

8.1 添加主机

在这里插入图片描述
刚添加的主机是没有应用集,监控项,触发器等都是空。
在这里插入图片描述

8.2 使用模板

选择主机
在这里插入图片描述
选择模板
在这里插入图片描述

主机列表发现,模板,监控项都有了
在这里插入图片描述

8.3 如果图形没有数据集

如果发现zabbix Get value from agent failed: cannot connect to [[10.2.72.132]:10050]: [113] No route to host 报错
在这里插入图片描述

在zabbix-agent机器上面开启10050端
[root@php1 ~]# firewall-cmd --add-port=10050/tcp
success
[root@php1 ~]# service iptables status

查看图形即可发现有数据了。
在这里插入图片描述

参考文档

《Zabbix使用agent监控》:
https://www.cnblogs.com/Jackie-Chen/articles/10824139.html
《zabbix server无法访问agent服务器的10050端口》:https://www.cnblogs.com/cq90/p/8985172.html

技术交流

CleverCode是一名架构师,技术交流,咨询问题,请加CleverCode创建的qq群(架构师俱乐部):517133582。加群和腾讯,阿里,百度,新浪等公司的架构师交流。【架构师俱乐部】宗旨:帮助你成长为架构师!
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值