成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

Zabbix 5.x的Template Module ICMP Ping淺析

安全 應用安全
Zabbix 5.*默認自帶了模板Template Module ICMP Ping。它用來監控主機或設備的存活狀態以及網絡情況,主要是監控丟包率和響應時間兩個指標。

[[380116]]

本文轉載自微信公眾號「DBA閑思雜想錄」,作者瀟湘隱者。轉載本文請聯系DBA閑思雜想錄公眾號。   

Zabbix 5.*默認自帶了模板Template Module ICMP Ping。它用來監控主機或設備的存活狀態以及網絡情況,主要是監控丟包率和響應時間兩個指標。Template Module ICMP Ping模板有三個item,如下截圖所示:

 

Template Module ICMP Ping的配置

1:檢查或安裝fping

Zabbix使用外部命令fping處理ICMP ping的請求,而不是ping命令,而fping不包含在Zabbix的發行版本中。所以需要額外安裝fping命令的相關包。

檢查是否安裝了fping命令:

[root@Zabbix ~]# yum list installed | grep fpingfping.x86_64 3.16-1.el8 @zabbix-non-supported

如果沒有安裝過fping,就必須安裝fping。如果沒有配置yum源的話,需要用其它方式安裝,例如可以下載安裝包進行RPM安裝,此處略過。

#yum install fping -y

由于fping默認是root權限工作,而Zabbix Proxy 或Zabbix Server是zabbix用戶運行的,所以需要對fping程序設置setuid權限,如果在自定義key的時候需要用到netstat命令,也同樣要設置setuid,否則不能獲取到數據,而日志中提示權拒絕。

# locate fping/usr/sbin/fping/usr/sbin/fping6/usr/share/doc/fping/usr/share/doc/fping/COPYING/usr/share/doc/fping/ChangeLog/usr/share/doc/fping/README/usr/share/man/man8/fping.8.gz/usr/share/man/man8/fping6.8.gz#chown root:zabbix /usr/sbin/fping#chmod 4710 /usr/sbin/fping

2:在Zabbix Server和Zabbix Proxy端的配置文件里面打開注釋

在zabbix_server.conf或zabbix_proxy.conf中把FpingLocation或Fping6Location路徑修改為剛安裝的fping命令的路徑。如果安裝路徑和配置文件中FpingLocation/Fping6Location默認的路徑一致,其實也可以不用修改。

默認設置如下所示:

### Option: FpingLocation# Location of fping.# Make sure that fping binary has root ownership and SUID flag set.## Mandatory: no# Default:# FpingLocation=/usr/sbin/fping ### Option: Fping6Location# Location of fping6.# Make sure that fping6 binary has root ownership and SUID flag set.# Make empty if your fping utility is capable to process IPv6 addresses.## Mandatory: no# Default:# Fping6Location=/usr/sbin/fping6

3:引用模板

在被監控的主機或設備上應用這個模板,或者在其他模板中引用這個模板(很多翻譯是“鏈接的模板”,個人感覺這個翻譯怪怪的),如下所示,在Template OS Windows by Zabbix agent中引用了Template Module ICMP Ping模板,那么只要應用模板Template OS Windows by Zabbix agent 就會監控主機或設備了。

 

Template Module ICMP Ping的選項介紹

在被監控的主機或設備上對應的“最新數據”(Latest data)——“Status”下面有三個監控項

ICMP loss

ICMP ping

ICMP response time

 

關于這些item的key,可以參考官方文檔,下面節選部分內容如下:

Defaults, limits and description of values for ICMP check parameters:

ParameterUnitDescriptionFping's flagDefaults set byAllowed limits

by Zabbix

fpingZabbixminmax

packetsnumbernumber of request packets to a target-C

3110000

intervalmillisecondstime to wait between successive packets-p1000

20unlimited

sizebytespacket size in bytes

56 bytes on x86, 68 bytes on x86_64-b56 or 68

2465507

timeoutmillisecondsfping v3.x - timeout to wait after last packet sent, affected by -C flag

fping v4.x - individual timeout for each packet-tfping v3.x - 500

fping v4.x - inherited from -p flag, but not more than 2000

50unlimited

In addition Zabbix uses fping options -i interval ms (do not mix up with the item parameter interval mentioned in the table above, which corresponds to fping option -p) and -S source IP address (or -I in older fping versions). Those options are auto-detected by running checks with different option combinations. Zabbix tries to detect the minimal value in milliseconds that fping allows to use with -i by trying 3 values: 0, 1 and 10. The value that first succeeds is then used for subsequent ICMP checks. This process is done by each ICMP pinger process individually.

Auto-detected fping options are invalidated every hour and detected again on the next attempt to perform ICMP check. Set DebugLevel>=4 in order to view details of this process in the server or proxy log file.

Warning: fping defaults can differ depending on platform and version - if in doubt, check fping documentation.

Zabbix writes IP addresses to be checked by any of three icmpping* keys to a temporary file, which is then passed to fping. If items have different key parameters, only ones with identical key parameters are written to a single file.

All IP addresses written to the single file will be checked by fping in parallel, so Zabbix icmp pinger process will spend fixed amount of time disregarding the number of IP addresses in the file.

ICMP loss掉包的案例截圖:

 

ICMP ping掉包的案例截圖

 

ICMP response time 就是時延或者響應時間

 

參考資料:

https://www.zabbix.com/documentation/current/manual/config/items/itemtypes/simple_checks#icmp_pings

 

責任編輯:武曉燕 來源: DBA閑思雜想錄
相關推薦

2010-08-02 16:43:46

ICMP協議

2010-07-30 16:10:57

ICMPping

2010-08-02 16:11:29

ICMP協議

2010-08-02 14:29:46

LinuxPingICMP

2010-09-16 11:05:43

2011-09-30 09:41:37

CentOS

2014-06-16 09:33:22

ICMPPingTraceroute

2013-04-23 16:48:55

GPT分區CentOS

2016-03-18 18:43:49

京東

2009-08-22 21:14:12

VMware Work

2015-09-17 10:20:31

漏洞鎖屏密碼

2025-02-08 09:13:40

2010-08-02 15:02:00

2009-04-21 11:31:45

MySQLRH5Linux

2025-01-13 08:36:58

2011-08-24 09:35:54

ICMPIGMPRIP

2009-06-29 18:04:13

Tapestry5

2019-07-17 10:40:13

云存儲數據存儲

2010-08-02 16:59:54

2010-07-13 10:10:07

點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 亚洲成人av在线播放 | 亚洲精品二三区 | 欧美一区二区三区小说 | 亚洲日本视频 | 免费一区二区三区 | 中文字幕精品一区二区三区精品 | 免费一区 | 久久91精品 | 亚洲精品欧洲 | 综合色婷婷 | 久久网站黄 | 日本黄色片免费在线观看 | 中文字幕亚洲一区二区三区 | 久草视频在线播放 | 国产毛片毛片 | 成人亚洲 | 欧美成人第一页 | 91影院| 一级毛片在线播放 | 成人在线免费观看av | 中文字幕亚洲一区二区三区 | 欧美精品一区二区三区在线播放 | 伊人看片 | 97精品超碰一区二区三区 | 欧美精品一区在线发布 | 欧美视频三区 | 中文在线一区二区 | 国产成人免费视频网站视频社区 | 亚洲天堂av网 | 国户精品久久久久久久久久久不卡 | 在线观看 亚洲 | av网址在线播放 | 国产福利视频 | 精品福利一区二区三区 | 亚洲精品视频免费看 | 久久综合影院 | 不卡一区二区三区四区 | 伊人最新网址 | 免费在线观看一区二区三区 | 国产欧美一区二区精品久导航 | 国产一级片免费视频 |