SmokePing 是一款功能强大的开源网络性能监测工具,专为实时监控网络延迟、丢包率等关键性能指标而设计。其核心功能是通过多种探测方式(如 ICMP、TCP、UDP、DNS 等)对目标主机或服务进行周期性探测,并将结果以直观的图形化界面呈现,帮助网络管理员快速定位和诊断网络问题。

优化1:调整监控间隔

系统默认是每300秒,ping 20个包。

[root@oe149 config]# more Database 
*** Database ***

step = 300
pings = 20

# 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

我们可以调整Database配置文件,把step变量由300设置为20,pings变量由20调整为5。

优化2:调整图形显示备注

在查看图形显示时,默认是 Last x hours from 227f0345bd36 to linuxserver.io。

修改General在最后一行的上面增加display_name = 湖南。后面的变量根据你smokeping部署在哪个地方来命令,比如我的PC电脑在湖南长沙,就定义为湖南长沙。

[root@oe149 config]# more General 
*** General ***

owner = LinuxServer.io
contact = admin@linuxserver.io
mailhost = my.mail.host
# NOTE: do not put the Image Cache below cgi-bin
# since all files under cgi-bin will be executed ... this is not
# good for images.
cgiurl = http://localhost/smokeping/smokeping.cgi
# specify this to get syslog logging
syslogfacility = local0
# each probe is now run in its own process
# disable this to revert to the old behaviour
# concurrentprobes = no
display_name = 湖南长沙
@include /config/pathnames

优化3:修改DNS策略的lookup值

把lookup = google.com 修改为lookup  =baidu.com

[root@oe149 config]# more Probes 
*** Probes ***

+ FPing
binary = /usr/sbin/fping

+ FPing6
binary = /usr/sbin/fping
protocol = 6

+ DNS
binary = /usr/bin/dig
lookup = google.com
pings = 5
step = 300

+ TCPPing
binary = /usr/bin/tcpping
forks = 10
offset = random
pings = 5
port = 80

 

附监控目标配置文件Targets模板内容

[root@oe149 config]# more 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.

+ YiDong

menu = 移动 线路
title = 移动 线路

++ YiDong_Gate
menu = 移动网关254
title = 192.168.10.254
host = 192.168.10.254

++ Server_214
menu = 214服务器 
title = 192.168.10.214
host = 192.168.10.214

++ Server_120
menu = 120服务器
title = 192.168.110.120
host = 192.168.110.120

++ GoogleDns
menu = 谷歌DNS服务器
title = 8.8.8.8
host = 8.8.8.8


+ DianXin

menu = 电信 线路
title = 电信 线路

++ DianXin_Gate
menu = 电信网关1
title = 192.168.10.1
host = 192.168.10.1

 

 

 

 

声明:欢迎大家光临本站,学习IT运维技术,转载本站内容,请注明内容出处”来源刘国华教育“。如若本站内容侵犯了原著者的合法权益,请联系我们进行处理。