smokeping搭建ByMARK.docx

上传人:b****6 文档编号:7752717 上传时间:2023-01-26 格式:DOCX 页数:17 大小:42.46KB
下载 相关 举报
smokeping搭建ByMARK.docx_第1页
第1页 / 共17页
smokeping搭建ByMARK.docx_第2页
第2页 / 共17页
smokeping搭建ByMARK.docx_第3页
第3页 / 共17页
smokeping搭建ByMARK.docx_第4页
第4页 / 共17页
smokeping搭建ByMARK.docx_第5页
第5页 / 共17页
点击查看更多>>
下载资源
资源描述

smokeping搭建ByMARK.docx

《smokeping搭建ByMARK.docx》由会员分享,可在线阅读,更多相关《smokeping搭建ByMARK.docx(17页珍藏版)》请在冰豆网上搜索。

smokeping搭建ByMARK.docx

smokeping搭建ByMARK

机房测试机网络监测—Smokeping的部署

yumupdate

yuminstallyum-fastestmirror-y

yuminstalllrzsz–y/yuminstalllrzsz.x86_64-y

修改IPTABLES,打开80端口

通过/etc/init.d/iptablesstatus命令查询是否有打开80端口,如果没有可通过两种方式处理

vi /etc/sysconfig/iptables

添加一条

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT

放在-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited 的前面一行

/etc/init.d/iptables restart重启IPTABLES

或者永久性关闭防火墙

chkconfig --level 35 iptables off 

 

需要安装的软件:

yuminstallyuminstallgccfreetype-develzlib-devellibpng-devellibart_lgpl-develhttpd-develapr-util-develapr-develfreetypelibart_lgpllibpngzlibperl*-y

 

中文语言包:

yum-yinstallfonts-chinesefontconfig-devel

需要安装以上关联包才能够进行之后的smokeping部署

安装过沉重产生报错等信息,单独再次安装

yum-yinstall安装包名称

可能还需要安装时间同步工具ntp

yuminstallntp

ntpdateus.pool.ntp.org

 

cd/usr

mkdir123

cd123

wget

(此地址已经失效,需要用RZ从笔记本上传)

tarzxffping.tar.gz

cdfping-2.4b2_to

./configure&&make&&makeinstall

echo$?

cd..

+++++++++++++++++++++++

上面为安装fping工具

+++++++++++++++++++++++

yumerasehttpd-y删除系统自带的httpd,采用源码安装的httpd

wget

tarzxfhttpd-2.0.64.tar.gz

cdhttpd-2.0.64

./configure--prefix=/usr/local/httpd&&make&&makeinstall

echo$?

cp/usr/local/httpd/bin/apxs/sbin/

cd..

+++++++++++++++++++++++

上面为安装apache服务

+++++++++++++++++++++++

只能安装2.0.64.apache服务,尝试过使用其他版本,没有数据显示

 

wget

tarzxvfCGI-SpeedyCGI-2.22.tar.gz

cdCGI-SpeedyCGI-2.22

perlMakefile.PL

make&&makeinstall

echo$?

cd..

#+++++++++++++

上面为安装CGI

 

yuminstall*pango*-y

yuminstalllibxml*-y

5、echoping安装

tarxzvfechoping-6.0.2.tar.gz

cdechoping-6.0.2

./configure&&make&&makeinstall

cd..

cgilib安装

 wget

 tarxzvfcgilib-0.5.tar.gz

 cdcgilib-0.5

 make

 cplibcgi.a /usr/local/lib

 cpcgi.h/usr/include/

ln-s/usr/local/include/libart-2.0/usr/include/libart-2.0

ln-s/usr/local/include/freetype2/usr/include/freetype2

 

cd..

 

wgethttp:

//www.mrtg.org/rrdtool/pub/rrdtool-1.4.7.tar.gz

tarzxfrrdtool-1.4.7.tar.gz

cdrrdtool-1.4.7

./configure--prefix=/usr/local/rrdtool&&make&&makeinstall

echo$?

+++++++++++++

上面为安装rrdtool

低版本的系统中,如果装rrdtool,需要安装libcgi,然后按下面的操作,才可编译rrdtool

+++++++++++

 

下面为smokeping相关

+++++++++++

cd..

wgethttp:

//oss.oetiker.ch/smokeping/pub/smokeping-2.4.2.tar.gz

tarzxvfsmokeping-2.4.2.tar.gz

mkdir/usr/local/smokeping

cpsmokeping-2.4.2/*/usr/local/smokeping/-R

mkdir-p/usr/local/smokeping/cache

mkdir-p/usr/local/smokeping/var

chmod777/usr/local/smokeping/cache

chmod777/usr/local/smokeping/var

chmod600/usr/local/smokeping/etc/smokeping_secrets.dist

 

由于smokeping这个软件不要编译,所以需要修改相应的访问权限

 

################################apache导入到apache的配置文件里(放到最后一段)

cd/usr/local/httpd/conf

vihttpd.conf

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

OptionsIndexesExecCGI

AllowOverrideNone

Orderallow,deny

Allowfromall

OptionsExecCGIIndexes

AllowOverrideNone

Orderallow,deny

Allowfromall

Alias/var/"/usr/local/smokeping/var/"

OptionsExecCGIIndexes

AllowOverrideNone

Orderallow,deny

Allowfromall

 

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

OptionsExecCGIIndexes

AllowOverrideNone

Orderallow,deny

Allowfromall

AddHandlercgi-scriptcgi

 

下面为配置文件,把配置文件覆盖到/usr/local/smokeping/etc/config.dist

 

***General***

owner=PeterRandom

contact=some@address.nowhere

mailhost=my.mail.host

#sendmail=/usr/lib/sendmail

#NOTE:

donotputtheImageCachebelowcgi-bin

#sinceallfilesundercgi-binwillbeexecuted...thisisnot

#goodforimages.

imgcache=/usr/local/smokeping/cache

imgurl=../cache

datadir=/usr/local/smokeping/var

piddir=/usr/local/smokeping/cache

cgiurl=http:

//some.url/smokeping.cgi

smokemail=/usr/local/smokeping/etc/smokemail.dist

tmail=/usr/local/smokeping/etc/tmail.dist

#specifythistogetsysloglogging

syslogfacility=local0

#eachprobeisnowruninitsownprocess

#disablethistoreverttotheoldbehaviour

#concurrentprobes=no

***Alerts***

to=alertee@address.somewhere

from=smokealert@company.xy

+someloss

type=loss

#inpercent

pattern=>0%,*12*,>0%,*12*,>0%

comment=loss3timesinarow

***Database***

step=300

pings=20

#consfnmrhbstepstotal

AVERAGE0.511008

AVERAGE0.5124320

MIN0.5124320

MAX0.5124320

AVERAGE0.5144720

MAX0.5144720

MIN0.5144720

***Presentation***

template=/usr/local/smokeping/etc/basepage.html.dist

+charts

menu=Charts

title=Themostinterestingdestinations

++stddev

sorter=StdDev(entries=>4)

title=TopStandardDeviation

menu=StdDeviation

format=StandardDeviation%f

++max

sorter=Max(entries=>5)

title=TopMaxRoundtripTime

menu=byMax

format=MaxRoundtripTime%fseconds

++loss

sorter=Loss(entries=>5)

title=TopPacketLoss

menu=Loss

format=PacketsLost%f

++median

sorter=Median(entries=>5)

title=TopMedianRoundtripTime

menu=byMedian

format=MedianRTT%fseconds

+overview

width=600

height=50

range=10h

+detail

width=600

height=200

unison_tolerance=2

"Last3Hours"3h

"Last30Hours"30h

"Last10Days"10d

"Last400Days"400d

#+hierarchies

#++owner

#title=HostOwner

#++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

***Targets***

probe=FPing

menu=Top

title=NetworkLatencyGrapher

remark=WelcometotheSmokePingwebsiteofxxxCompany.\

Hereyouwilllearnallaboutthelatencyofournetwork.

#+Test

#menu=Targets

#parents=owner:

/Test/Jameslocation:

/

#++James

#menu=James

#title=James

#alerts=someloss

#slaves=boomerslave2

#host=james.address

#++MultiHost

#menu=Multihost

#title=JamesandJamesasseenfromBoomer

#host=/Test/James/Test/James~boomer

+CN

menu=CN

title=CNSTATUS

++NingBo_LianTong

menu=NingBo_LianTong

title=60.12.201.1

host=60.12.201.1

 

++NingBo_DianXin

menu=NingBo_DianXin

title=61.153.153.157

host=61.153.153.157

 

++ShangHai_LianTong

menu=ShangHai_LianTong

title=220.248.121.169

host=220.248.121.169

 

++ShangHai_DianXin

menu=ShangHai_DianXin

title=114.80.92.1

host=114.80.92.1

 

++BeiJing_DianXin

menu=BeiJing_DianXin

title=118.26.196.2

host=118.26.196.2

++TianJin_LianTong

menu=TianJin_LianTong

title=60.30.128.1

host=60.30.128.1

++ZhongShan_DianXin

menu=ZhongShan_DianXin

title=116.28.64.2

host=116.28.64.2

 

++ZhongShan_LianTong

menu=ZhongShan_LianTong

title=112.90.178.33

host=112.90.178.33

 

++JiNan_DianXin

menu=JiNan_DianXin

title=58.56.111.195

host=58.56.111.195

 

++JiNan_LianTong

menu=JiNan_LianTong

title=124.128.157.97

host=124.128.157.97

 

++GuangDong_LianTong

menu=GuangDong_LianTong

title=120.31.52.139

host=120.31.52.139

 

++GuangDong_DianXin

menu=GuangDong_DianXin

title=113.105.222.11

host=113.105.222.11

 

++HuNan_DianXin

menu=HuNan_DianXin

title=119.8.190.14

host=119.8.190.14

 

++AnHui_DianXin

menu=AnHui_DianXin

title=61.132.181.146

host=61.132.181.146

 

++GanSu_LianTong

menu=GanSu_LianTong

title=124.152.250.1

host=124.152.250.1

++BeiJing_LianTong

menu=BeiJing_LianTong

title=219.158.32.93

host=219.158.32.93

++LiaoNing_LianTong

menu=LiaoNing_LianTong

title=221.203.103.158

host=221.203.103.158

++NingXia_LianTong

menu=NingXia_LianTong

title=221.199.2.150

host=221.199.2.150

++ShangXia_LianTong

menu=ShangXia_LianTong

title=123.139.1.106

host=123.139.1.106

++FuJian_LianTong

menu=FuJian_LianTong

title=220.249.160.46

host=220.249.160.46

++ZheJiang_LianTong

menu=ZheJiang_LianTong

title=218.109.1.229

host=218.109.1.229

++zhejiang_dx

menu=zhejiang_dx

title=220.191.129.118

host=220.191.129.118

++anhui_dx

menu=anhui_dx

title=61.190.251.38

host=61.190.251.38

 

++jiangxi_dx

menu=jiangxi_dx

title=220.177.252.94

host=220.177.252.94

++hubei_dx

menu=hubei_dx

title=221.232.254.62

host=221.232.254.62

++guangxi_dx

menu=guangxi_dx

title=218.65.136.2

host=218.65.136.2

++chongqing_dx

menu=chongqing_dx

title=219.153.16.97

host=219.153.16.97

++sichuan_dx

menu=sichuan_dx

title=218.6.196.70

host=218.6.196.70

++guizhou_dx

menu=guizhou_dx

title=219.151.0.142

host=219.151.0.142

++yunnan_dx

menu=yunnan_dx

title=222.221.1.30

host=222.221.1.30

 

++beijing_CNC

menu=beijing_CNC

title=202.99.57.149

host=202.99.57.149

++tianjin_CNC

menu=tianjin_CNC

title=218.69.32.6

host=218.69.32.6

++shijiazhuang_CNC

menu=shijiazhuang_CNC

title=202.99.160.234

host=202.99.160.234

++shanxi_CNC

menu=shanxi

title=218.26.125.150

host=218.26.125.150

++neimenggu_CNC

menu=neimenggu_CNC

title=202.99.226.58

host=202.99.226.58

 

++jilin_CNC

menu=jilin_CNC

title=125.32.127.14

host=125.32.127.14

 

++shandong_CNC

menu=shandong_CNC

title=60.215.136.254

host=60.215.136.254

++henan_CNC

menu=henan_CNC

title=61.168.254.26

host=61.168.254.26

 

修改词典

首先,//生成smokeping.cgi

cd/usr/local/smokeping/htdocs

cpsmokeping.cgi.distsmokeping.cgi

 

vismokeping.cgi(在对应的地方修改)

#!

/usr/bin/speedy-w在第一行

uselibqw(/u

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 工程科技 > 兵器核科学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1