1.简介
smokeping是一款监控网络稳定的开源软件,通过它可以监控到本地到各地的网络状况,如延时,丢包,并通过rrdtool制图方式,图形化地展示网络的延时。
2.配置
创建一个目录做数据持久化
mkdir -p /data/smokeping
防火墙放行11111端口并使用docker创建
docker create --name=smokeping -e TZ=Asia/Chongqing -p 11111:80 --restart unless-stopped -v /data/smokeping/data:/data -v /data/smokeping/config:/config linuxserver/smokeping
3.配置文件(主要有三个)
Database
*** Database ***
step = 60
pings = 60
# consfn mrhb steps total
AVERAGE 0.5 1 1008
AVERAGE 0.5 12 4320
MIN 0.5 12 4320
MAX 0.5 12 4320
AVERAGE 0.5 144 720
MAX 0.5 144 720
MIN 0.5 144 720
Presentation 主要是 smokeping 的图表和第一栏的设置
*** Presentation ***
template = /etc/smokeping/basepage.html
charset = utf-8
+ charts
menu = 排行榜
title = 排行榜
++ stddev
sorter = StdDev(entries=>4)
title = 综合指标排名
menu = 综合指标
format = 综合指数 %f
++ max
sorter = Max(entries=>5)
title = 最大延迟
menu = 最大延迟
format = 最大延迟时间 %f 秒
++ loss
sorter = Loss(entries=>5)
title = 丢包率
menu = 丢包率
format = 丢包 %f
++ median
sorter = Median(entries=>5)
title = 中间数据包延迟
menu = 中间数据包延迟
format = 中间数据包延迟 RTT %f 秒
+ overview
width = 600
height = 50
range = 10h
+ detail
width = 600
height = 200
unison_tolerance = 2
"Last 1 Hours" 1h
"Last 24 Hours" 24h
"Last 7 Days" 7d
"Last 30 Days" 30d
#+ hierarchies
#++ owner
#title = Host Owner
#++ location
#title = Location
Targets 内则是监控的主体
Targets
probe = FPing
menu = Top title = Network Latency Grapher remark = Welcome to the SmokePing website of WORKS Company. \
Here you will learn all about the latency of our network.
+ InternetSites
+ baidu menu = 百度 title = 百度
++ baidu menu = 百度 title = 百度 host = www.baidu.com
+Europe