zl程序教程

您现在的位置是:首页 >  云平台

当前栏目

Zabbix监控(十七):巧妙使用Simple check

监控 使用 Zabbix check 巧妙 十七 Simple
2023-06-13 09:15:50 时间

Zabbix安装(四):Zabbix Agent For Linux

Zabbix安装(五):Zabbix Agent For Windows

Zabbix监控(一):添加主机Host和监控项Items

Zabbix监控(二):添加触发器Triggers

Zabbix监控(三):动作Actions、告警方式Medias和用户Users

Zabbix监控(四):添加图像Graphs

Zabbix监控(五):添加展示屏Screens

Zabbix监控(六):添加拓朴图Maps

Zabbix监控(七):手动监控Windows端口

Zabbix监控(八):自动监控Windows端口

Zabbix监控(九):自动监控Windows服务

Zabbix安装(十):监控Windows进程

Zabbix监控(十一):解决中文字体显示乱码问题

Zabbix监控(十二):自动监控Linux端口

Zabbix监控(十三):监控网络设备

Zabbix监控(十四):添加网页监控WEB Monitorings

Zabbix监控(十五):心跳检测Zabbix Server的存活状态

Zabbix监控(十六):分布式监控-Zabbix Proxy

Zabbix监控(十七):巧妙使用Simple Check

说明:Simple check一般用于被监控的对象上无法安装客户端的情况,通过检测网络通讯状态及端口状态来监控对象的存活情况。

1、Simple check的几个KEY


icmpping[ target , packets , interval , size , timeout ] Checks if server is accessible by ICMP ping. 0   ICMP ping fails. 1   ICMP ping successful. One of zabbix_server processes performs ICMP pings once per PingerFrequency seconds.

使用PING命令检测通讯状态,返回0表示不通,返回1表示通过icmppingloss[ target , packets , interval , size , timeout ]Returns percentage of lost ICMP ping packets.

返回丢失包占的比例icmppingsec[ target , packets , interval , size , timeout , mode ]Returns ICMP ping response time in seconds. Example: 0.02

返回PING影响时间net.tcp.service.perf[service, ip , port ]Check performance of service. 0   service is down, sec   number of seconds spent on connection to the service. If  ip  is missing, IP or DNS name is taken from host definition. If  port  is missing, default service port is used.

检查服务性能net.tcp.service[service, ip , port ]Check if service is available. 0   service is down, 1   service is running. If  ip  is missing, IP or DNS name is taken from host definition. If  port  is missing, default service port is used.

检查服务是否运行

返回值为0表示ping失败,返回值为1表示可以ping通

target:  主机名或ip地址

packets: 数据包的数量

interval:两个连续数据包发送的时间间隔,以毫秒为单位

size:    包的大小,以字节为单位

timeout: 超时时间,以毫秒为单位

2、安装 fping (可装可不装)

说明:zabbix 可以使用fping替代ping作为icmp的工具


[root@zabbix ~]# cd /home/zabbix [root@zabbix zabbix]# wget http://repo.zabbix.com/non-supported/rhel/6/x86_64/fping-2.4b2-16.el6.x86_64.rpm [root@zabbix zabbix]# rpm -ivh fping-2.4b2-16.el6.x86_64.rpm [root@zabbix zabbix]# vi /usr/local/zabbix/etc/zabbix_server.conf FpingLocation=/usr/sbin/fping [root@zabbix zabbix]# service zabbix_server restart

说明:上图是用icmpping来检测测试服务器10.188.1.23是否能PING通,4表示发送4个数据包,1000表示间隔1秒发送,32表示包的大小,10000表示10秒没响应就超时。

4、查看Latest data

结论:本节讲的比较简单,Simple check本身就是一个简单检查,主要是通过ping对象的IP地址来确认对象的存活状态;常用来监控网络打印机、宽带的公网网关地址、网络监控设备、不支持SNMP的交换机和无线路由器、无法安装客户端的电脑等;将监控最大化的横向扩展。

56321.html

linuxwindows