监控网络质量 Smokeping

参考:

http://www.aclstack.com/454.html

https://blog.lianst.com/cento7an-zhuang-pei-zhi-smokepingjian-kong-wang-luo-zhi-liang/

http://blog.csdn.net/reblue520/article/details/53010864


操作系统:Cento7

1.安装第三方epel源

wget http://dl.lianst.com/rpm/epel/epel-release-7-9.noarch.rpm  
rpm -ivh epel-release-7-9.noarch.rpm  

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


# 使用yum安装
yum -y install fping
# 编译安装
wget http://dl.lianst.com/rpm/smokeping/fping-4.0.tar.gz  
tar -zxvf fping-4.0.tar.gz  
cd fping-4.0  
./configure
make && make install  


4.安装echoping
wget http://dl.lianst.com/rpm/smokeping/echoping-6.0.2.tar.gz  
tar -zxvf echoping-6.0.2.tar.gz  
cd echoping-6.0.2  
./configure
make && make install 



smokeping安装配置


1.编译安装smokeping


wget http://dl.lianst.com/rpm/smokeping/smokeping-2.6.11.tar.gz  
tar -zxvf smokeping-2.6.11.tar.gz  
cd smokeping-2.6.11  
./configure --prefix=/usr/local/smokeping

./setup/build-perl-modules.sh /usr/local/smokeping/thirdparty
./configure --prefix=/usr/local/smokeping
gmake install

或则

/usr/bin/gmake install
2.配置smokeping 
更改配置文件


vim /usr/local/smokeping/etc/config  
 修改如下内容:
cgiurl = http://10.0.0.62/smokeping.cgi




*** Database ***
step = 60 #此处建议改为 60 , 一分钟采集一次数据  
pings = 20  
apache安装及配置


1.使用yum安装httpd


yum -y install httpd  
2.编辑apache配置文件


vim /etc/httpd/conf/httpd.conf  
DocumentRoot "/var/www/html"下添加如下代码:  
DocumentRoot "/var/www/html"  
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  
AuthName "Smokeping" //开启认证  
AuthType Basic  
AuthUserFile /usr/local/smokeping/htdocs/htpasswd //认证文件  
Require valid-user  
DirectoryIndex smokeping.fcgi  
</Directory>  
3.创建认证文件


htpasswd -bc htpasswd user password  
4.重载apahce


systemctl restart httpd  
至此,你就可以通过http://ip地址/smokeping 访问smokeping了。






页面中文乱码处理


1.安装字体


yum -y install wqy-zenhei-fonts.noarch  
2.编辑smokeping的配置文件


vim /usr/local/smokeping/etc/config  
#第50行添加
charset = utf-8 #添加此行  
3.编辑Graphs.pm


vim /usr/local/smokeping/lib/Smokeping/Graphs.pm  
#第147行下边插入下边一行
'--font TITLE:20:"WenQuanYi Zen Hei Mono"',  
smokeping启动脚本


代码就不贴了,直接使用下面地址下载就好了。 启动脚本下载地址:http://dl.lianst.com/rpm/smokeping/smokeping.sh








评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值