发布时间:2015-05-27 19:09:45作者:知识屋
Smokeping 是一款用于网络性能监测的监控软件,通过它可以在自己公司IDC的网络状况,如延时,丢包率,是否BGP多线等,通过rrdtool制图方式,图形化地展示网络的时延情况,进而能够清楚的判断出网络的即时通信情况,
Smokeping 需要多个包的支持,下面我们逐个安装,这里通过yum和编译安装两种方式。(有内置yum包直接yum,没有的编译安装)
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
下载fping并编译:
wget http://fping.org/dist/fping-3.10.tar.gz
解压缩后,直接 configure && make && make install 即可
下载echoping并编译安装:
wget http://jaist.dl.sourceforge.net/project/echoping/echoping/6.0.2/echoping-6.0.2.tar.gz
yum install -y popt
yum install -y libidn (安装两个echoping依赖的包)
解压缩后,直接 configure && make && make install 即可
下载smokeping
http://download.csdn.net/download/fairplay_li/8711829
解压; cd smokeping-2.6.9
./setup/build-perl-modules.sh /usr/local/smokeping/thirdparty
./configure --prefix=/usr/local/smokeping
/usr/bin/gmake install
以下开始配置 smokeping
cd /usr/local/smokeping/mkdir cache data vartouch /var/log/smokeping.log chown apache:apache cache data varchown apache:apache /var/log/smokeping.logchmod 600 /usr/local/smokeping/etc/smokeping_secrets.distcd /usr/local/smokeping/htdocs mv smokeping.fcgi.dist smokeping.fcgicd /usr/local/smokeping/etcmv config.dist config
vim config
主要修改如下内容:
cgiurl = http:
//some.url/smokeping.cgi
*** Database *** step = 300 此处建议改为 60 , 一分钟采集一次数据
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"AllowOverride NoneOptions AllAddHandler cgi-script .fcgi .cgiOrder allow,denyAllow from allDirectoryIndex smokeping.fcgi
如果需要支持中文,需要安装中文编码:
yum -y install wqy-zenhei-fonts.noarch
vim /usr/local/smokeping/lib/Smokeping/Graphs.pm
my ($graphret,$xs,$ys) = RRDs::graph
("dummy",
'--start', $tasks[0][1],
'--end', $tasks[0][2],
后,添加 '--font TITLE:20:"WenQuanYi Zen Hei Mono"',
设置开机启动 echo "/usr/local/smokeping/bin/smokeping --logfile=/var/log/smokeping.log 2>&1 &" >> /etc/rc.local
监测源的IP库,填入到 config 中
+ Othermenu = 三大网络监控title = 监控统计++ dianxinmenu = 电信网络监控title = 电信网络监控列表host = /Other/dianxin/dianxin-bj /Other/dianxin/dianxin-hlj /Other/dianxin/dianxin-tj /Other/dianxin/dianxin-sc /Other/dianxin/dianxin-sh /Other/dianxin/dianxin-gz+++ dianxin-bj menu = 北京电信title = 北京电信alerts = somelosshost = 202.96.199.133+++ dianxin-hlj menu = 黑龙江电信title = 黑龙江电信alerts = somelosshost = 219.147.198.242+++ dianxin-tjmenu = 天津电信title = 天津电信alerts = somelosshost = 219.150.32.132+++ dianxin-sc menu = 四川电信title = 四川电信alerts = somelosshost = 61.139.2.69+++ dianxin-sh menu = 上海电信title = 上海电信alerts = somelosshost = 116.228.111.118+++ dianxin-gz menu = 广东电信title = 广东电信alerts = somelosshost = 113.111.211.22++ liantongmenu = 联通网络监控title = 联通网络监控列表host = /Other/liantong/liantong-bj /Other/liantong/liantong-hlj /Other/liantong/liantong-tj /Other/liantong/liantong-sc /Other/liantong/liantong-sh /Other/liantong/liantong-gz+++ liantong-bj menu = 北京联通title = 北京联通alerts = somelosshost = 61.135.169.121+++ liantong-hlj menu = 黑龙江联通title = 黑龙江联通alerts = somelosshost = 202.97.224.69+++ liantong-tjmenu = 天津联通title = 天津联通alerts = somelosshost = 202.99.96.68+++ liantong-sc menu = 四川联通title = 四川联通alerts = somelosshost = 119.6.6.6+++ liantong-sh menu = 上海联通title = 上海联通alerts = somelosshost = 210.22.84.3+++ liantong-gz menu = 广东联通title = 广东联通alerts = somelosshost = 221.5.88.88++ yidong menu = 移动网络监控title = 移动网络监控列表host = /Other/yidong/yidong-bj /Other/yidong/yidong-hlj /Other/yidong/yidong-tj /Other/yidong/yidong-sc /Other/yidong/yidong-sh /Other/yidong/yidong-gz+++ yidong-bj menu = 北京移动title = 北京移动alerts = somelosshost = 221.130.33.52+++ yidong-hlj menu = 黑龙江移动title = 黑龙江移动alerts = somelosshost = 211.137.241.35+++ yidong-tjmenu = 天津移动title = 天津移动alerts = somelosshost = 211.137.160.5+++ yidong-sc menu = 四川移动title = 四川移动alerts = somelosshost = 218.201.4.3+++ yidong-sh menu = 上海移动title = 上海移动alerts = somelosshost = 117.131.19.23+++ yidong-gz menu = 广东移动title = 广东移动alerts = somelosshost = 211.136.192.6
linux一键安装web环境全攻略 在linux系统中怎么一键安装web环境方法
Linux网络基本网络配置方法介绍 如何配置Linux系统的网络方法
Linux下DNS服务器搭建详解 Linux下搭建DNS服务器和配置文件
对Linux进行详细的性能监控的方法 Linux 系统性能监控命令详解
linux系统root密码忘了怎么办 linux忘记root密码后找回密码的方法
Linux基本命令有哪些 Linux系统常用操作命令有哪些
Linux必学的网络操作命令 linux网络操作相关命令汇总
linux系统从入侵到提权的详细过程 linux入侵提权服务器方法技巧
linux系统怎么用命令切换用户登录 Linux切换用户的命令是什么
在linux中添加普通新用户登录 如何在Linux中添加一个新的用户
2012-07-10
CentOS 6.3安装(详细图解教程)
Linux怎么查看网卡驱动?Linux下查看网卡的驱动程序
centos修改主机名命令
Ubuntu或UbuntuKyKin14.04Unity桌面风格与Gnome桌面风格的切换
FEDORA 17中设置TIGERVNC远程访问
StartOS 5.0相关介绍,新型的Linux系统!
解决vSphere Client登录linux版vCenter失败
LINUX最新提权 Exploits Linux Kernel <= 2.6.37
nginx在网站中的7层转发功能