SmartPing / 开源、高效、便捷的网络质量监控神器

/ 0评 / 0

说明:之前博主发过一个雨落大神写的Ping值监测工具uPing,不过有点单一,也缺少Web界面,今天再分享个SmartPing工具,可以同时Ping多个IP,支持正向Ping绘制,反向Ping绘制,互Ping拓扑绘制及报警功能。支持自定义延迟、丢包阈值报警。

截图

安装

Github地址:https://github.com/gy-games/smartping

运行命令:

<span class="hljs-attribute"><span class="pln">mkdir</span></span><span class="pln"> smartping </span><span class="pun">&&</span><span class="pln"> cd smartping
</span><span class="hljs-comment"><span class="com">#请去https://github.com/gy-games/smartping/releases下载最新版本的smartping</span></span><span class="pln">
wget https</span><span class="pun">:</span><span class="com">//github.com/gy-games/smartping/releases/download/v0.5.0/smartping-v0.5.0.tar.gz</span><span class="pln">
tar zxvf smartping</span><span class="pun">-</span><span class="pln">v0</span><span class="pun">.</span><span class="hljs-number"><span class="lit">5</span></span><span class="lit">.</span><span class="hljs-number"><span class="lit">0</span></span><span class="pun">.</span><span class="pln">tar</span><span class="pun">.</span><span class="pln">gz
</span><span class="pun">./</span><span class="pln">control start</span>

然后可以使用ip:8899打开Web界面查看了,管理界面默认密码为smartping,若需要修改请修改conf/config.jsonconf/config-base.json

<span class="hljs-meta"><span class="com">#</span></span><span class="bash"><span class="com">如果你是CentOS系统,且打不开Web页面的,则需要开启防火墙端口</span></span>
<span class="hljs-meta"><span class="com">#</span></span><span class="bash"><span class="com">Centos 6系统</span></span><span class="pln">
iptables </span><span class="pun">-</span><span class="pln">I INPUT </span><span class="pun">-</span><span class="pln">p tcp </span><span class="pun">--</span><span class="pln">dport </span><span class="lit">8899</span> <span class="pun">-</span><span class="pln">j ACCEPT
service iptables save
service iptables restart
</span><span class="hljs-meta">
<span class="com">#</span></span><span class="bash"><span class="com">CentOS 7系统</span></span><span class="pln">
firewall</span><span class="pun">-</span><span class="pln">cmd </span><span class="pun">--</span><span class="pln">zone</span><span class="pun">=</span><span class="kwd">public</span> <span class="pun">--</span><span class="pln">add</span><span class="pun">-</span><span class="pln">port</span><span class="pun">=</span><span class="lit">8899</span><span class="pun">/</span><span class="pln">tcp </span><span class="pun">--</span><span class="pln">permanent 
firewall</span><span class="pun">-</span><span class="pln">cmd </span><span class="pun">--</span><span class="pln">reload</span>

相关命令

<span class="pun">./</span><span class="pln">control build</span><span class="pun">|</span><span class="pln">run</span><span class="pun">|</span><span class="hljs-keyword"><span class="pln">start</span></span><span class="pun">|</span><span class="hljs-keyword"><span class="pln">stop</span></span><span class="pun">|</span><span class="pln">restart</span><span class="pun">|</span><span class="hljs-keyword"><span class="pln">status</span></span>

<span class="hljs-keyword"><span class="pln">build</span></span>   <span class="pun">:</span> <span class="pun">源码编译,最终构建成至</span> <span class="hljs-keyword"><span class="pln">bin</span></span><span class="pln">
run     </span><span class="pun">:</span> <span class="pun">直接启动</span><span class="pln">smartping
</span><span class="hljs-keyword"><span class="pln">start</span></span>   <span class="pun">:</span> <span class="pun">以</span><span class="pln">nohup</span><span class="pun">(</span><span class="pln">deamon</span><span class="pun">)形式启动</span><span class="pln">smartping
</span><span class="hljs-keyword"><span class="pln">stop</span></span>    <span class="pun">:</span> <span class="pun">关闭</span><span class="pln">smartping
restart </span><span class="pun">:</span> <span class="pun">执行</span> <span class="hljs-keyword"><span class="pln">stop</span></span> <span class="pun">&</span> <span class="hljs-keyword"><span class="pln">start</span></span>
<span class="hljs-keyword"><span class="pln">status</span></span>  <span class="pun">:</span> <span class="pun">查看</span><span class="pln">smartping</span><span class="pun">的运行状态</span>
<span class="hljs-keyword"><span class="pln">version</span></span> <span class="pun">:</span> <span class="pun">查看当前</span><span class="pln">smartping</span><span class="pun">版本</span><span class="pln">
pack    </span><span class="pun">:</span> <span class="pun">执行</span><span class="hljs-keyword"><span class="typ">Build</span></span><span class="pun">并进行二进制包制作</span>

总结

一般我们可以在搭建网站的服务器上安装,然后添加全国各个地区的IP进行监测,如果你找不到很全的IP来源,可以去ipip上找,地址:https://tools.ipip.net/ping.php,先进去ping一下,然后可以看到各个地区的IP地址了,之后就可以很清楚看到网络情况了。

发表评论