SmokePing网络延迟和丢包监测工具

SmokePing是一种网络延迟和丢包监测工具,其监控原理如下:

  1. 监测目标选择:SmokePing通过配置文件(Targets)定义了要监测的目标,可以是主机、路由器、服务器或其他网络设备。每个目标都有一个唯一的名称和IP地址。

  2. 发送和接收ping请求:SmokePing使用ICMP协议发送ping请求到目标设备,并等待响应。通过在指定时间间隔内连续发送ping请求,可以监测目标设备的可达性和网络质量。

  3. 测量延迟和丢包率:当SmokePing接收到ping响应时,它会记录往返时间(Round-Trip Time,RTT),即从发送ping请求到接收响应所经过的时间。同时,SmokePing还记录了成功和失败的ping请求数量,以计算丢包率。

  4. 数据存储和图形化展示:SmokePing将收集到的数据存储在RRD(Round-Robin Database)文件中,以便后续处理和展示。通过运行SmokePing自身的Web服务器,您可以通过Web界面查看监测结果,包括实时图表和历史趋势。

  5. 报警和通知:SmokePing提供了报警机制,可以根据预定义的阈值设置触发警报。当网络延迟超过或丢包率高于设定的阈值时,SmokePing可以发送警报通知,例如通过电子邮件、短信或其他方式。

SmokePing的主要原理是不断发送ping请求并记录响应时间和丢包率,然后将数据存储并以图形化形式展示出来。这样可以帮助管理员监测网络质量,并及时发现潜在的延迟或连接问题。

docker-compose.yaml 部署

version: "2.1"
services:
  smokeping:
    image: lscr.io/linuxserver/smokeping:latest
    container_name: smokeping
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Asia/Shanghai
    volumes:
      - /usr/local/smokeping/config:/config
      - /usr/local/smokeping/data:/data
    ports:
      - 8000:80
    restart: unless-stopped

配置

由于配置太长了,只给出部分配置。

*** Targets ***

probe = FPing

menu = Top
title = IDC网络节点质量监控
remark = Smokeping 网络质量监控系统


@include /config/telcom
@include /config/unicom
@include /config/cmcc
@include /config/tencent

/config/tencent文件

+ TENCENT
menu = 腾讯云
title = 腾讯云

++ beijing
menu = 北京市海淀区 腾讯云
title = 118.89.212.13
host = 118.89.212.13

/config/cmcc 文件

+ CMCC 
menu = 移动 
title = 移动 

++ beijing
menu = 北京
title = 39.137.71.1
host = 39.137.71.1

++ tianjin
menu = 天津
title = 39.134.140.1
host = 39.134.140.1

++ hebei
menu = 河北
title = 39.134.187.1
host = 39.134.187.1

++ neimenggu
menu = 内蒙古
title = 39.134.168.1
host = 39.134.168.1

++ liaoning
menu = 辽宁
title = 39.134.52.1
host = 39.134.52.1

++ heilongjiang
menu = 黑龙江
title = 39.134.62.1
host = 39.134.62.1

++ jilin
menu = 吉林
title = 39.134.160.1
host = 39.134.160.1

++ shandong
menu = 山东
title = 39.134.146.65
host = 39.134.146.65

++ shanxi
menu = 山西
title = 39.134.26.1
host = 39.134.26.1

++ shanghai
menu = 上海
title = 39.134.86.1
host = 39.134.86.1

++ zhejiang
menu = 浙江
title = 39.134.179.193
host = 39.134.179.193

++ jiangsu
menu = 江苏
title = 36.152.44.1
host = 36.152.44.1

++ anhui
menu = 安徽
title = 39.134.120.1
host = 39.134.120.1

++ jiangxi
menu = 江西
title = 39.134.114.1
host = 39.134.114.1

++ fujian
menu = 福建
title = 39.135.48.1
host = 39.135.48.1

++ henan
menu = 河南
title = 39.134.210.1
host = 39.134.210.1

++ hubei
menu = 湖北
title = 39.135.20.1
host = 39.135.20.1

++ hunan
menu = 湖南
title = 39.134.253.1
host = 39.134.253.1

++ guangdong
menu = 广东
title = 39.135.62.1
host = 39.135.62.1

++ guangxi
menu = 广西
title = 36.159.103.1
host = 36.159.103.1

++ shenzhen
menu = 深圳
title = 39.137.29.177
host = 39.137.29.177

++ hainan
menu = 海南
title = 39.134.136.1
host = 39.134.136.1

++ sichuan
menu = 四川
title = 39.134.196.1
host = 39.134.196.1

++ chongqing
menu = 重庆
title = 39.134.0.1
host = 39.134.0.1

++ guizhou
menu = 贵州
title = 39.135.8.1
host = 39.135.8.1

++ yunnan
menu = 云南
title = 14.204.68.74
host = 14.204.68.74

++ xizang
menu = 西藏
title = 39.135.6.1
host = 39.135.6.1

++ shaanxi
menu = 陕西
title = 39.134.17.3
host = 39.134.17.3

++ ningxia
menu = 宁夏
title = 39.134.93.1
host = 39.134.93.1

++ gansu
menu = 甘肃
title = 39.134.32.1
host = 39.134.32.1

++ qinghai
menu = 青海
title = 39.134.159.1
host = 39.134.159.1

++ xinjiang
menu = 新疆
title = 39.134.236.1
host = 39.134.236.1

效果
SmokePing网络延迟和丢包监测工具_第1张图片

你可能感兴趣的:(监控,监控)