Zabbix监控(十七):巧妙使用Simple check
说明:Simple check一般用于被监控的对象上无法安装客户端的情况,通过检测网络通讯状态及端口状态来监控对象的存活情况。1、Simple check的几个KEY
icmpping[,,,,]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[,,,,]Returns percentage of lost ICMP ping packets.返回丢失包占的比例
icmppingsec[,,,,,]Returns ICMP ping response time in seconds. Example: 0.02返回PING影响时间
net.tcp.service.perfCheck performance of service. 0 - service is down, sec - number of seconds spent on connection to the service. Ifis missing, IP or DNS name is taken from host definition. Ifis missing, default service port is used.检查服务性能
net.tcp.serviceCheck if service is available. 0 - service is down, 1 - service is running. Ifis missing, IP or DNS name is taken from host definition. Ifis missing, default service port is used.检查服务是否运行
这里主要使用icmpping[,,,,]这个KEY:
返回值为0表示ping失败,返回值为1表示可以ping通
target:主机名或ip地址
packets: 数据包的数量
interval:两个连续数据包发送的时间间隔,以毫秒为单位
size: 包的大小,以字节为单位
timeout: 超时时间,以毫秒为单位
2、安装 fping (可装可不装)
说明:zabbix 可以使用fping替代ping作为icmp的工具
1
2
3
4
5
6
# cd /home/zabbix
# wget http://repo.zabbix.com/non-suppo ... 2-16.el6.x86_64.rpm
# rpm -ivh fping-2.4b2-16.el6.x86_64.rpm
# vi /usr/local/zabbix/etc/zabbix_server.conf
FpingLocation=/usr/sbin/fping
# service zabbix_server restart
3、添加Item
说明:上图是用icmpping来检测测试服务器10.188.1.23是否能PING通,4表示发送4个数据包,1000表示间隔1秒发送,32表示包的大小,10000表示10秒没响应就超时。
4、查看Latest data
结论:本节讲的比较简单,Simple check本身就是一个简单检查,主要是通过ping对象的IP地址来确认对象的存活状态;常用来监控网络打印机、宽带的公网网关地址、网络监控设备、不支持SNMP的交换机和无线路由器、无法安装客户端的电脑等;将监控最大化的横向扩展。
页:
[1]