1、下载fping、echoping、smokeping

链接:http://pan.baidu.com/s/1pL4HLYb
密码:fxe2

2、安装依赖包

yum install -y perl perl-Net-Telnet perl-Net-DNS perl-LDAP perl-libwww-perl perl-IO-Socket-SSL perl-Socket6 perl-Time-HiRes perl-ExtUtils-MakeMaker rrdtool rrdtool-perl curl httpd httpd-devel gcc make wget libxml2-devel libpng-devel glib pango pango-devel freetype freetype-devel fontconfig cairo cairo-devel libart_lgpl libart_lgpl-devel popt popt-devel libidn libidn-devel

3、安装fping

tar xf fping-3.10.tar.gz
cd fping-3.10
./configure
make && make install

4、安装echoping

tar xf echoping-.tar.gz
cd echoping-
./configure
make && make install

5、安装smokeping

tar xf smokeping-.tar.gz
cd smokeping-
./setup/build-perl-modules.sh /usr/local/smokeping/thirdparty
./configure --prefix=/usr/local/smokeping
/usr/bin/gmake install

6、配置 smokeping

cd /usr/local/smokeping/
mkdir cache data var
touch /var/log/smokeping.log
chown apache:apache cache data var
chown apache:apache /var/log/smokeping.log
chmod  /usr/local/smokeping/etc/smokeping_secrets.dist
cd /usr/local/smokeping/htdocs
mv smokeping.fcgi.dist smokeping.fcgi
cd /usr/local/smokeping/etc
mv config.dist config

7、替换配置文件

vim /usr/local/smokeping/etc/config
*** General ***
owner    = Peter Random
contact  = some@address.nowhere
mailhost = my.mail.host
sendmail = /usr/sbin/sendmail
# 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.
imgcache = /usr/local/smokeping/cache
imgurl   = cache
datadir  = /usr/local/smokeping/data
piddir  = /usr/local/smokeping/var
cgiurl   = http://211.155.90.21/smokeping.cgi    ###注意这里改成你机器的IP
smokemail = /usr/local/smokeping/etc/smokemail.dist
tmail = /usr/local/smokeping/etc/tmail.dist
# 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

*** Alerts ***
to = alertee@address.somewhere
from = smokealert@company.xy

+someloss
type = loss
# in percent
pattern = >%,**,>%,**,>%
comment = loss  times  in a row

*** Database ***

step     =
pings    = 

# consfn mrhb steps total

AVERAGE
AVERAGE
    MIN
    MAX
AVERAGE
    MAX
    MIN     

*** Presentation ***

charset = utf-
template = /usr/local/smokeping/etc/basepage.html.dist

+ overview 

width =
height =
range = 10h

+ detail

width =
height =
unison_tolerance = 

"Last 3 Hours"    3h
"Last 30 Hours"   30h
"Last 10 Days"    10d
"Last 400 Days"   400d

#+ hierarchies
#++ owner
#title = Host Owner
#++ location
#title = Location

*** Probes ***

+ FPing

binary = /usr/local/sbin/fping

*** Slaves ***
secrets=/usr/local/smokeping/etc/smokeping_secrets.dist
+boomer
display_name=boomer
color=0000ff

+slave2
display_name=another
color=00ff00

*** Targets ***

probe = FPing

menu = Top
title = Network Latency Grapher
remark = Smokeping is a latency measurement tool. It sends test packets out to the net and measures the amount of time they need to travel from one place to the other and back.\
For every round of measurement smokeping sends several packets. It then sorts the different round trip times and selects the median, (ie. the middle one). This means when there are  time values, value number  is selected and drawn. The other values are drawn as successively lighter shades of gray in the background (smoke).\
\
Sometimes a test packet is sent out but never returns. This is called packet-loss. The color of the median line changes according to the number of packets lost.\
\
All this information together gives an indication of network health. For example, packet loss is something which should not happen out of the blue. It can mean that a device in the middle of the link is overloaded or a router configuration somewhere is wrong.\
\
Heavy fluctuation of the RTT (round trip time) values also indicate that the network is overloaded. This shows on the graph as smoke; the more smoke, the more fluctuation.\
\
Smokeping is not limited to testing just the roundtrip time of the packets. It can also perform some task at the remote end ("probe"), like download a webpage. This will give a combined 'picture' of webserver availability and network health.\

+ Other
menu = *** 点这里 ***
title = 监控统计 

++ dianxin
menu = 网络监控列表
title = 网络监控列表
host = /Other/dianxin/dianxin-a /Other/dianxin/dianxin-d /Other/dianxin/dianxin-e 

+++ dianxin-a
menu = 北京电信
title = 北京电信
alerts = someloss
host = 106.38.180.10 

+++ dianxin-b
menu = 天津电信
title = 天津电信
alerts = someloss
host = 219.150.32.132 

+++ dianxin-bb
menu = 天津联通
title = 天津联通
alerts = someloss
host = 60.24.0.10

+++ dianxin-c
menu = 四川省成都市电信
title = 四川省成都市电信
alerts = someloss
host = 61.139.2.69 

+++ dianxin-cc
menu = 四川省成都市广电网
title = 四川省成都市广电网
alerts = someloss
host = 60.255.47.200 

+++ dianxin-d
menu = 上海市浦东新区电信
title = 上海市浦东新区电信
alerts = someloss
host = 116.228.111.118 

+++ dianxin-dd
menu = 上海市联通
title = 上海市联通
alerts = someloss
host = 27.115.0.1

+++ dianxin-e
menu = 广东省广州市电信
title = 广东省广州市电信
alerts = someloss
host = 113.111.211.22 

+++ dianxin-ee
menu = 广东省佛山市电信
title = 广东省佛山市电信
alerts = someloss
host = 14.17.102.200

+++ dianxin-eee
menu = 广东省中山市电信
title = 广东省中山市电信
alerts = someloss
host = 14.18.0.10

+++ dianxin-eeee
menu = 山东省潍坊市联通
title = 山东省潍坊市联通
alerts = someloss
host = 27.192.61.5

+++ dianxin-f
menu = 吉林省长春市电信
title = 吉林省长春市电信
alerts = someloss
host =  36.48.0.5

+++ dianxin-ff
menu = 吉林省长春市联通
title = 吉林省长春市联通
alerts = someloss
host =  58.244.87.10

+++ dianxin-g
menu = 浙江省台州市电信
title = 浙江省台州市电信
alerts = someloss
host =  39.181.165.100

+++ dianxin-h
menu = 香港特别行政区
title = 香港特别行政区
alerts = someloss
host =  14.198.36.100

+++ dianxin-hh
menu = 衡天香港数据中心
title = 衡天香港数据中心
alerts = someloss
host =  43.242.128.10

+++ dianxin-i
menu = 江西省南昌市电信
title = 江西省南昌市电信
alerts = someloss
host =  59.52.11.20

+++ dianxin-ii
menu = 江西省南昌市联通
title = 江西省南昌市联通
alerts = someloss
host =  58.17.83.5

+++ dianxin-j
menu = 辽宁电信
title = 辽宁电信
alerts = someloss
host = 1.180.236.5

+++ dianxin-jj
menu = 辽宁省朝阳市联通
title = 辽宁省朝阳市联通
alerts = someloss
host = 42.4.0.10

+++ dianxin-k
menu = 江苏省苏州市电信
title = 江苏省苏州市电信
alerts = someloss
host = 49.64.239.252

+++ dianxin-l
menu = 福建省南平市电信
title = 福建省南平市电信
alerts = someloss
host = 27.150.169.10

+++ dianxin-ll
menu = 福建省三明市电信
title = 福建省三明市电信
alerts = someloss
host = 27.150.64.10

+++ dianxin-m
menu = 台湾电信
title = 台湾电信
alerts = someloss
host = 1.34.0.98

+++ dianxin-mm
menu = 台湾省阿里云
title = 台湾省阿里云
alerts = someloss
host = 47.89.64.10

+++ dianxin-n
menu = 澳门特别行政区
title = 澳门特别行政区
alerts = someloss
host = 27.109.255.255

+++ dianxin-o
menu = 海南省海口市电信1
title = 海南省海口市电信1
alerts = someloss
host = 36.1.46.255

+++ dianxin-oo
menu = 海南省海口市电信2
title = 海南省海口市电信2
alerts = someloss
host = 59.49.145.100

+++ dianxin-p
menu = 山西省大同市电信
title = 山西省大同市电信
alerts = someloss
host = 59.48.8.183

+++ dianxin-q
menu = 广西南宁电信
title = 广西南宁电信
alerts = someloss
host = 58.59.133.66

+++ dianxin-r
menu = 安徽省淮南市电信
title = 安徽省淮南市电信
alerts = someloss
host = 36.6.0.10

+++ dianxin-s
menu = 河北省邯郸市电信
title = 河北省邯郸市电信
alerts = someloss
host = 27.188.5.55

+++ dianxin-t
menu = 内蒙古呼和浩特电信
title = 内蒙古呼和浩特电信
alerts = someloss
host = 1.180.236.5

+++ dianxin-tt
menu = 内蒙古呼和浩特联通
title = 内蒙古呼和浩特联通
alerts = someloss
host = 1.24.7.255

+++ dianxin-ttt
menu = 湖南省邵阳市联通
title = 湖南省邵阳市联通
alerts = someloss
host = 42.49.16.10

+++ dianxin-u
menu = 河南省濮阳市电信
title = 河南省濮阳市电信
alerts = someloss
host = 1.194.29.100

+++ dianxin-v
menu = 贵州省安顺市电信
title = 贵州省安顺市电信
alerts = someloss
host =     1.48.0.10

+++ dianxin-w
menu = 重庆市电信
title = 重庆市电信
alerts = someloss
host =     14.104.47.219

+++ dianxin-ww
menu = 重庆市南岸区教育网
title = 重庆市南岸区教育网
alerts = someloss
host =     42.247.3.125

+++ dianxin-x
menu = 四川省自贡市电信
title = 四川省自贡市电信
alerts = someloss
host =     61.139.44.10

+++ dianxin-y
menu = 陕西省西安市电信
title = 陕西省西安市电信
alerts = someloss
host =     1.80.155.255

+++ dianxin-z
menu = 湖北省宜昌市电信
title = 湖北省宜昌市电信
alerts = someloss
host =     27.21.49.10

+++ dianxin-nx
menu = 宁夏回族自治区电信
title = 宁夏回族自治区电信
alerts = someloss
host =     14.134.129.10

+++ dianxin-gs
menu = 甘肃省天水市电信
title = 甘肃省天水市电信
alerts = someloss
host =     27.224.59.100

+++ dianxin-hlj
menu = 黑龙江联通
title = 黑龙江联通
alerts = someloss
host =     1.60.8.55

+++ dianxin-yn
menu = 云南省西双版纳电信
title = 云南省西双版纳电信
alerts = someloss
host =     42.242.0.10

+++ dianxin-yna
menu = 云南省昆明市联通
title = 云南省昆明市联通
alerts = someloss
host =     14.204.75.171

+++ dianxin-qh
menu = 青海省电信
title = 青海省电信
alerts = someloss
host =     61.133.225.33

+++ dianxin-xz
menu = 西藏自治区联通
title = 西藏自治区联通
alerts = someloss
host =     27.98.236.100

+++ dianxin-xj
menu = 新疆维吾尔电信
title = 新疆维吾尔电信
alerts = someloss
host =     36.105.32.100

折叠代码

8、编辑apache配置文件

vim /etc/httpd/conf/httpd.conf

在最后面添加:

Alias /cache "/usr/local/smokeping/cache/"
Alias /cropper "/usr/local/smokeping/htdocs/cropper/"
Alias /smokeping "/usr/local/smokeping/htdocs/smokeping.fcgi"
<Directory "/usr/local/smokeping">
    AllowOverride None
    Options All
    AddHandler cgi-script .fcgi .cgi
    Order allow,deny
    Allow from all
    DirectoryIndex smokeping.fcgi
</Directory>

9、图像浏览界面的中文支持:

yum -y install wqy-zenhei-fonts.noarch

编辑:vim /usr/local/smokeping/lib/Smokeping/Graphs.pm

在147行下边插入'--font TITLE:20:"WenQuanYi Zen Hei Mono"',

10、启动apache、smokeping并设置环境变量

/etc/init.d/httpd start
/usr/local/smokeping/bin/smokeping
echo 'export PATH=/usr/local/smokeping/bin/:$PATH' >> /etc/profile

11、关闭防火墙和SELinux

setenforce
iptables -F

12、在浏览器访问:211.155.90.21/smokeping

问题集锦


1、配置文件中“+”后面的名字不能相同,否则会报错

2、配置文件中修改了step和pings后要删除rrd文件再重启Smokeping服务(rrd文件的路径根据错误提示来找)

3、step的时间决定了图形界面的刷新频率

4、在安装过程中,如果执行过./setup后中断了再执行一次./setup会出现错误:

解决方法:删除/usr/local/smokeping/thirdparty目录下的所有文件,然后再重新运行./setup/build-perl-modules.sh /usr/local/smokeping/thirdparty

5、smokeping可以访问但是没有图出来,请检查你的时间是否准确

参考:http://www.cnblogs.com/binleelinux/p/5872067.html

Smokeping -- 监控网络质量的更多相关文章

  1. zabbix fping 监控网络质量

    1,zabbix server (proxy)安装fping wget http://www.fping.org/dist/fping-3.16.tar.gz tar zxvf fping-3.16. ...

  2. 001使用smokeping监控idc机房网络质量情况

    最近工作比较忙,也没有时间写博客,看到好友芮峰云最近一直在写博客,所以也手痒了,就先把之前的一些积累下来的文章分享给大家. 本文是介绍如何的使用smokeping来监控idc机房的网络质量情况,从监控 ...

  3. centos7.2环境下安装smokeping对网络状态进行监控

    centos7.2环境下安装smokeping对网络状态进行监控 安装smokeping建议用centos7,用centos6.5一直卡在smokeping那里,下载不了perl的扩展插件,可能是因为 ...

  4. linux下使用screen和ping命令对网络质量进行监控

    linux下使用screen和ping命令对网络质量进行监控 场景:应用连接云服务器经常偶尔会出现连接不上的情况,android和IOS端连接的时候也会出现tcp延时5秒以上,现在想验证是否是云服务商 ...

  5. zabbix使用fping监控任意两个节点之间的网络质量、丢包率和响应时间

    zabbix使用fping监控任意两个节点之间的网络质量.丢包率和响应时间 之前的博文 使用zabbix3..4的ICMP Ping模版实现对客户端网络状态的监控 https://www.cnblog ...

  6. C# 利用性能计数器监控网络状态

    本例是利用C#中的性能计数器(PerformanceCounter)监控网络的状态.并能够直观的展现出来 涉及到的知识点: PerformanceCounter,表示 Windows NT 性能计数器 ...

  7. zabbix监控网络的出入口流量

    首先我们登录到zabbix 点击配置---->模板-->Template OS Linux 下的监控项 点击右上角的添加监控项目 我们的服务器是在Ucloud上的,我们的网卡名称为eth0 ...

  8. 运用Ntop监控网络流量(视频Demo)

    运用Ntop监控网络流量 ____网络流量反映了网络的运行状态,是判别网络运行是否正常的关键数据,在实际的网络中,如果对网络流量控制得不好或发生网络拥塞,将会导致网络吞吐量下降.网络性能降低.通过流量 ...

  9. ubuntu下使用nethogs监控网络流量

    NetHogs是一款小巧免费的开源命令行工具,用来按进程或程序实时统计网络带宽使用率. 对于使用类似于“repo tool”.“depot_tools”等工具checkout源码时非常有用,可以查看当 ...

随机推荐

  1. 容器--TreeMap

    一.概述 在Map的实现中,除了我们最常见的KEY值无序的HashMap之外,还有KEY有序的Map,比较常用的有两类,一类是按KEY值的大小有序的Map,这方面的代表是TreeMap,另外一种就保持 ...

  2. Atitit. 构造ast 语法树的总结attilax oao 1. Ast结构树形12. ast view (自是个160k的jar )22.1. 多条语句ast结构22.2. 变量定义 int b,c; 的ast结构22.3. 方法调用meth1(a=1,b=2,c=3);  的ast结构23. 误解的问题33.1. 语法书子能是个二叉树,实际上多叉树越好..33.2. 非要不个ast放到个s

    Atitit. 构造ast 语法树的总结attilax oao 1. Ast结构树形1 2. ast view (自是个160k的jar )2 2.1. 多条语句ast结构2 2.2. 变量定义 in ...

  3. 《对象及DOM知识点及其应用1》

    1.图片间的来回切换用if{}else{}; <超链接方式的切换图片(常用)>如:<a href="../images1/1-small.jpg" id=&quo ...

  4. Apache Lucene(全文检索引擎)—创建索引

    目录 返回目录:http://www.cnblogs.com/hanyinglong/p/5464604.html 本项目Demo已上传GitHub,欢迎大家fork下载学习:https://gith ...

  5. css2基础知识梳理

    基础的css知识,只放XMind的截图. css01 css02 css03 css04 css05 css+div布局是前端的基本功,要多多练习.运用标准流.浮动.定位.层级等,做简单的静态页面.一 ...

  6. [转]Design Pattern Interview Questions - Part 3

    State, Stratergy, Visitor Adapter and fly weight design pattern from interview perspective. (I) Can ...

  7. 关于final关键字和抽象类,接口

    final主要用于修饰类,方法以及属性 当用于修饰类时,则这个类不能被子类继承,换而言之该类没有子类 当用于修饰方法时,该方法也是不能被复写的 当用于修饰属性时,同理属性值不能被更改 抽象类,当存在抽 ...

  8. Feathers组件的宽度或高度属性,为什么我得到的值是0

    Feathers组件使用一个失效系统延迟一会儿繁重的重绘,这样你可以在一个时间内改变多个属性.如果你还没有明确地设置宽度和高度,他们会自动 调整自身到一套“理想”的尺度.然而,这并不会发生,直到他们验 ...

  9. Linux系统查看系统是32位还是64位方法总结

    这篇博客是总结.归纳查看Linux系统是32位还是64位的一些方法,很多内容来自网上网友的博客.本篇只是整理.梳理这方面的知识,方便自己忘记的时候随时查看. 方法1:getconf LONG_BIT ...

  10. DB2 JDBC

    官方文档: http://www-01.ibm.com/support/knowledgecenter/SSEPGG_10.1.0/com.ibm.db2.luw.apdv.java.doc/src/ ...