首页 > 代码库 > centos6 smokeping安装
centos6 smokeping安装
Smokeping 是一款用于网络性能监测的监控软件,通过它可以在自己公司IDC的网络状况,如延时,丢包率,是否BGP多线等,通过rrdtool制图方式,图形化地展示网络的时延情况,进而能够清楚的判断出网络的即时通信情况,
实验环境
centos6.5_x64
实验软件
echoping-6.0.2.tar.gz
fping-3.10.tar.gz
smokeping-2.6.9.tar.gz
软件安装
yum clean all
yum makecache -y
yum install -y perl perl-Net-Telnet perl-Net-DNS perl-LDAP perl-libwww-perl perl-IO-Socket-SSLperl-Socket6 perl-Time-HiRes perl-ExtUtils-MakeMaker rrdtool rrdtool-perl curlhttpd httpd-devel gcc make wget libxml2-devel libpng-devel glib pangopango-devel freetype freetype-devel fontconfig cairo cairo-devel libart_lgpllibart_lgpl-devel popt popt-devel libidn libidn-devel wqy-zenhei-fonts.noarch
tar zxvf fping-3.10.tar.gz
cd fping-3.10
./configure
make
make install
tar xvf echoping-6.0.2.tar.gz
cd echoping-6.0.2
./configue
make
make install
tar zxvf smokeping-2.6.9.tar.gz
cd smokeping-2.6.9
./setup/build-perl-modules.sh/usr/local/smokeping/thirdparty
./configure--prefix=/usr/local/smokeping
/usr/bin/gmakeinstall
cd /usr/local/smokeping/
mkdir cache datavar
touch /var/log/smokeping.log
chown apache:apache cache data var
chown apache:apache /var/log/smokeping.log
chmod 600/usr/local/smokeping/etc/smokeping_secrets.dist
cd /usr/local/smokeping/htdocs/
mvsmokeping.fcgi.dist smokeping.fcgi
cd /usr/local/smokeping/etc/
mv config.distconfig
vim /usr/local/smokeping/etc/config
cgiurl = http://some.url/smokeping.cgi
cgiurl = http://192.168.31.243/smokeping.cgi 192.168.31.243为服务器ip
step = 300
pings = 20
step = 60 修改为,此选项为采集数据时间
pings = 20
vim /usr/local/smokeping/etc/config
+ Other
menu = 三大网络监控
title = 监控统计
++ dianxin
menu = 电信网络监控
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 = someloss 添加主机次选项不变
host = 内容按照需求定义
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> 以上几行在配置文件最后添加
vim /usr/local/smokeping/etc/config
50 charset = utf-8 添加次行配置
51 template =/usr/local/smokeping/etc/basepage.html.dist
vim /usr/local/smokeping/lib/Smokeping/Graphs.pm
147 ‘--end‘, $tasks[0][2],
148 "DEF:maxping=$cfg->{General}{datadir}${host}.rrd:median:AVERAGE"
147 ‘--end‘, $tasks[0][2],
148 ‘--font TITLE:20:"WenQuanYi Zen Hei Mono"‘,添加次行配置
149 "DEF:maxping=$cfg->{General}{datadir}${host}.rrd:median:AVERAGE"
vim /usr/local/smokeping/etc/config
#binary =/usr/sbin/fping
binary =/usr/local/sbin/fping 修改为
/etc/rc.d/init.d/httpdrestart
Stopping httpd:[ OK ]
Starting httpd:[ OK ]
/usr/local/smokeping/bin/smokeping
Note: logging tosyslog as local0/info.
Daemonizing/usr/local/smokeping/bin/smokeping ...
ps -aux | grepsmokeping
Warning: badsyntax, perhaps a bogus ‘-‘? See /usr/share/doc/procps-3.2.8/FAQ
root 39844 0.0 2.3 231392 23412 ? Ss 11:27 0:00/usr/local/smokeping/bin/smokeping [FPing]
root 39851 0.0 0.0 103260 876 pts/0 S+ 11:28 0:00 grep smokeping
http://服务器ip/smokeping 如果有域名更好在这里实验环境
本文出自 “mailfile” 博客,谢绝转载!
centos6 smokeping安装