smokeping

Smokeping 简介:

Smokeping 是 rrdtool 的作者 Tobi Oetiker 的作品,是用 Perl 写的,主 要是监视网络性能,包括常规的 ping,用 echoping 监控 www 服务器性能, 监视 dns 查询性能,监视 ssh 性能等。底层也是 rrdtool 做支持,特点是画的 图非常漂亮,网络丢包和延迟用颜色和阴影来表示。 1.2 Smokeping 架构组件 Smokeping 有以下组件组成:RRDtool、Fping、Echoping、Curl、Dig、 SSh、Perl 模块,Perl、SpeedyCGI、Apache 等。 master/slave 的工作方式,可以在多个节点收集同一个监测点的数据;

安装smokeping需要的依赖软件包

[[email protected] ~]# yum install  rrdtool  rrdtool-perl  gettext-devel.x86_64  perl-CGI.x86_64 perl-CPAN perl-devel  perl-libwww-perl  httpd httpd-devel httpd-server  -y

安装fping软件

[[email protected] ~]# tar zxvf fping-3.8.tar.gz -C /usr/src/

[[email protected] ~]# cd /usr/src/fping-3.8/
[[email protected] fping-3.8]# ./configure

[[email protected] fping-3.8]# make

[[email protected] fping-3.8]# make install

安装popt软件

[[email protected] ~]# wget http://jaist.dl.sourceforge.net/project/cross-stuff/cross-stuff/1.0/popt-1.7.tar.gz

[[email protected] ~]# tar zxvf popt-1.7.tar.gz -C /usr/src/

[[email protected] ~]# cd /usr/src/popt-1.7/
[[email protected] popt-1.7]# ./configure

[[email protected] popt-1.7]# make 

[[email protected] popt-1.7]# make install 

安装libidn软件

[[email protected] ~]# wget -c http://pkgs.fedoraproject.org/repo/pkgs/libidn/libidn-1.26.tar.gz/7533d14fbbb6c026a1a9eaa2179ccb69/libidn-1.26.tar.gz

[[email protected] ~]# tar zxvf libidn-1.26.tar.gz -C /usr/src/

[[email protected] ~]# cd /usr/src/libidn-1.26/
[[email protected] libidn-1.26]# ./configure

[[email protected] libidn-1.26]# make 

[[email protected] libidn-1.26]# make install

安装echoping软件

[[email protected] ~]# wget http://jaist.dl.sourceforge.net/project/echoping/echoping/6.0.2/echoping-6.0.2.tar.gz

[email protected] ~]# tar zxvf echoping-6.0.2.tar.gz -C /usr/src/

[[email protected] ~]# cd /usr/src/echoping-6.0.2/
[[email protected] echoping-6.0.2]# ./configure

[[email protected] echoping-6.0.2]# make 

[[email protected] echoping-6.0.2]# make install

安装FLORA 

[[email protected] ~]# wget -c http://search.cpan.org/CPAN/authors/id/F/FL/FLORA/FCGI-0.74.tar.gz

[[email protected] ~]# tar zxvf FCGI-0.74.tar.gz -C /usr/src/

[[email protected] ~]# cd /usr/src/FCGI-0.74/

[[email protected] FCGI-0.74]# perl Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for FCGI

[[email protected] FCGI-0.74]# make 

[[email protected] FCGI-0.74]# make install 

安装Config-Crammar

[[email protected] ~]# tar zxvf Config-Grammar-1.10.tar.gz -C /usr/src/

[[email protected] ~]# cd /usr/src/Config-Grammar-1.10/
[[email protected] Config-Grammar-1.10]# perl Makefile.PL

[[email protected] Config-Grammar-1.10]# make

[[email protected] Config-Grammar-1.10]# make install

 安装Digest

[[email protected] ~]# wget -c http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/Digest-HMAC-1.03.tar.gz

[[email protected] ~]# tar zxvf Digest-HMAC-1.03.tar.gz -C /usr/src/

[[email protected] ~]# cd /usr/src/Digest-HMAC-1.03/
[[email protected] Digest-HMAC-1.03]# perl Makefile.PL

[[email protected] Digest-HMAC-1.03]# make && make install

安装smokeping

[[email protected] ~]# wget -c http://oss.oetiker.ch/smokeping/pub/smokeping-2.6.9.tar.gz

[[email protected] ~]# tar zxvf smokeping-2.6.9.tar.gz -C /usr/src/

[[email protected] ~]# cd /usr/src/smokeping-2.6.9/
[[email protected] smokeping-2.6.9]# ./configure --prefix=/usr/local/smokeping

PS:在这里执行“./configure~~~”之后,如果报错,则会提示相关内容如下,我们直接

./setup/build-perl-modules.sh /usr/local/smokeping/thirdparty,这条命令执行成功之后,再次执行“./configure~~~即可解决

[[email protected] smokeping-2.6.9]# /usr/bin/gmake install

到此为止!我们这些软件包都安装完成,接下来,进行配置 并启动即可!

修改smokeping主配置文件

[[email protected] smokeping-2.6.9]# cd /usr/local/smokeping/
[[email protected] smokeping]# ls
bin etc htdocs lib share

[[email protected] smokeping]# mkdir cache var data     #在smokeping安装路径下创建三个目录

[[email protected] smokeping]# cd /usr/local/smokeping/htdocs/

[[email protected] htdocs]# cp smokeping.fcgi.dist smokeping.fcgi   #复制作为备份
[[email protected] htdocs]# ls
cropper smokeping.fcgi    smokeping.fcgi.dist

[[email protected] htdocs]# cd /usr/local/smokeping/etc/
[[email protected] etc]# ls
basepage.html.dist config.dist examples smokemail.dist smokeping_secrets.dist tmail.dist
[[email protected] etc]# cp config.dist    config  #拷贝配置文件做备份

[[email protected] etc]# ln -s /usr/local/smokeping/cache/ /usr/local/smokeping/htdocs/cache

[[email protected] etc]# chown -R apache:apache /usr/local/smokeping/
[[email protected] etc]# chmod -R 755 /usr/local/smokeping/cache/  /usr/local/smokeping/var/  /usr/local/smokeping/data/

 修改配置文件config

[[email protected] etc]# sed -i ‘s#binary = /usr/sbin/fping#binary = /usr/local/sbin/fping#g‘ /usr/local/smokeping/etc/config

[[email protected] etc]# sed  -i ‘s#cgiurl = http://some.url/smokeping.cgi#cgiurl = http://192.168.2.1336/smokeping.cgi#g‘ config | grep cgiurl

[[email protected] etc]# sed -i ‘s#step     = 300#step     = 60#g‘ /usr/local/smokeping/etc/config

[[email protected] etc]# sed -i ‘s#pings    = 20#pings    = 60#g‘ /usr/local/smokeping/etc/config

修改httpd配置文件

[[email protected] ~]#cat > /etc/httpd/conf.d/smokeping.conf <<\EOF

NameVirtualHost *:80

<VirtualHost *:80>

ServerName 192.168.2.136

DocumentRoot /usr/local/smokeping/htdocs

ErrorLog logs/smokeping_error.log

CustomLog logs/smokeping_access.log  common

Alias /smokeping "/usr/local/smokeping/htdocs/smokeping.fcgi"

Alias /cache "/usr/local/smokeping/cache"

Alias /cropper "/usr/local/smokeping/htdocs/cropper"

<Directory /usr/local/smokeping>

AllowOverride None

AddHandler cgi-script cgi fcgi

Options ExecCGI

Order allow,deny

Allow from all

AuthName "Smokeping Access"

AuthType Basic

AuthUserFile /usr/local/smokeping/etc/htpasswd.users

Require valid-user

Satisfy Any

</Directory>

</VirtualHost>

EOF

[[email protected] etc]# htpasswd -c /usr/local/smokeping/etc/htpasswd.users smokepingadmin

[[email protected] etc]# /etc/init.d/httpd start

[[email protected] etc]# perl /usr/local/smokeping/bin/smokeping --logfile=/usr/local/smokeping/var/log/smokeping.log

[[email protected] ~]# vim /etc/init.d/smokeping
[[email protected] ~]# chmod +x /etc/init.d/smokeping
[[email protected] ~]# ll /etc/init.d/smokeping
-rwxr-xr-x. 1 root root 2110 8月 6 16:44 /etc/init.d/smokeping

时间: 2024-12-22 06:22:21

smokeping的相关文章

smokeping自动检测系统

    如何的使用smokeping来监控idc机房的网络质量情况,从监控图上的延时与丢包能分辨出你机房的网络是否稳定,是否为多线,是否为BGP机房,到各城市的3个运行商网络各是什么情况,如果出现问题,如果有针对的解决.而且如果选择新机房的时候,你可以根据smokeping的监控结果来判断这个机房是否适合.   图表参数说明 (1) RTT(Round-Trip Time):简单说它是一个数据报在网络上两点中间往返一次的时间.是影响TCP性能和表征网络运行状况的重要参数.在网络中实时.准确地测量

Smokeping安装

系统centos6.X 1.配置固定IP地址 2.关闭iptables 3.关闭selinux 4.安装其他yum源 rpm -Uvh http://ftp.pbone.net/mirror/apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm 5.安装依赖包 yum -y install perl perl-Net-Telnet perl-Net-DNS perl-LDAP

smokeping对网络进行监控

smokeping可以用来很好的检测网络状态和稳定性 1.调整防火墙的设置 [[email protected] ~]# /etc/init.d/iptables stop iptables: Setting chains to policy ACCEPT: filter          [  OK  ] iptables: Flushing firewall rules:                         [  OK  ] iptables: Unloading modules

运维工具之smokeping部署

最近公司新机房搬迁,需要测试新机房和各地机房之间的网络性能,选择了smokeping这个网络性能测试工具,部署的时候参考了网上的很多文章,现将部署步骤记录如下: 1.安装其他源 rpm -Uvh http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm 2.安装rrdtool与依赖库 yum -y install perl perl-Net-Telnet perl-

smokeping:(13)Permission denied: exec of

搭建smokeping 访问日志报错: (13)Permission denied: exec of '/usr/local/smokeping/htdocs/smokeping.fcgi' failed Premature end of script headers: smokeping.fcgi 查看了所有相关配置,非fcig问题所致,关闭selinux即可解决.

Centos安装smokeping教程

Centos安装smokeping教程 一 .安装基本依赖包 ntpdate time.windows.com #64bit rpm -Uhv http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm #32bit #rpm -Uhv http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/rpmforge-release

2015-09-04 网络质量监控smokeping master/slave部署

http://my.oschina.net/lxcong/blog/150617 1.master的部署 参考前面 2.部署master/slaves a.master端 1)在master上添加配置,添加以下内容到配置文件 2)生成master校验文件 3)重启smokeping服务 b.在slaves端 1)生成slaves的校验文件 2)启动slaves服务 master的配置文件参考 smokeping页面和rrd图片支持中文 smokeping页面和rrd图片支持中文 默认不支持中文,

Smokeping网络监控

下载:http://oss.oetiker.ch/smokeping/pub/ 部署参考:http://www.cnblogs.com/ahwwmb/archive/2013/03/12/2955678.html 部署参考http://www.mamicode.com/info-detail-1396960.html 第1章 基本概念 Smokeping 主要是监视网络性能,包括常规的 ping,用 echoping 监视 www 服务器性能,监视 dns 查询性能,监视 ssh 性能等.底层也

Smokeping -- 监控网络质量

搭建:http://www.cnblogs.com/binleelinux/p/5872067.html 过程中遇到的问题: 1.配置文件中"+"后面的名字不能相同,否则会报错 2.配置文件中修改了step和pings后要删除rrd文件再重启Smokeping服务(rrd文件的路径根据错误提示来找) 3.step的时间决定了图形界面的刷新频率

一键安装smokeping脚本

#!/bin/bashlocal_ip=`/sbin/ifconfig |grep 'inet addr:'|grep -Ev '127.0.0.1' | cut -d: -f2|awk '{print $1}'|head -n 1`#install epel reporpm -Uvh http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm#install req