Zabbix4.0 zabbix 快速监控主机

1.安装zabbix-agent

[root@web01 ~]# rpm -ivh https://mirror.tuna.tsinghua.edu.cn/zabbix/zabbix/4.0/rhel/7/x86_64/zabbix-agent-4.0.11-1.el7.x86_64.rpm

2.配置zabbix-agent

[root@web01 ~]#vim  /etc/zabbix/zabbix_agentd.conf    
PidFile=/var/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=0
Server=10.0.1.61      #zabbix-server 地址
ServerActive=127.0.0.1  # zabbix-server 地址
Hostname=yxg   #被监控主机的名字
Include=/etc/zabbix/zabbix_agentd.d/*.con

3.启动zabbix-agent并检查

[root@web01 ~]# systemctl start zabbix-agent.service 
[root@web01 ~]# systemctl enable zabbix-agent.service
[root@web01 ~]# netstat -lntup|grep 10050
tcp        0      0 0.0.0.0:10050           0.0.0.0:*               LISTEN      10351/zabbix_agentd 
tcp6       0      0 :::10050                :::*                    LISTEN      10351/zabbix_agentd 

备注:检查监控端与被监控端是否可以正常通信

1、关闭防火墙
systemctl stop firewalld
2、在zabbix-server 端安装  zabbix-get
yum -y install zabbix-get
3、在zabbix-server 端获取 agent端的值

zabbix_get -s 192.168.52.131 -k system.cpu.util[,idle]
View Code

 

 别点添加,--,点模板

Zabbix-web-  模板:将一类的监控项汇总在一起,单独保存成一个模板,可以被其他主机调用

 

人生苦短,我用Python
原文地址:https://www.cnblogs.com/sunjinchao/p/12762574.html