1.安裝所需軟件包。
yuminstall-yperlperl-Net-Telnetperl-Net-DNSperl-LDAPperl-libwww-perlperl-IO-Socket-SSLperl-Socket6perl-Time-HiResperl-ExtUtils-MakeMakerrrdtoolrrdtool-perlcurlhttpdhttpd-develgccmakewgetlibxml2-devellibpng-develglibpangopango-develfreetypefreetype-develfontconfigcairocairo-devellibart_lgpllibart_lgpl-develpoptpopt-devellibidnlibidn-devel2.創建一個放置軟件包的常用目錄。
mkdir/smokeping/tools–p3.下載fping軟件包,並且解壓,編譯安裝。
wgethttp://fping.org/dist/fping-3.10.tar.gztar-zxvffping-3.10.tar.gzcdfping-3.10/./configuremake&&makeinstallcd..4.下載echoping並且解壓,編譯安裝。
wgethttp://fossies.org/linux/misc/old/echoping-6.0.2.tar.gztar-zxvfechoping-6.0.2.tar.gzcdechoping-6.0.2/./configuremake&&makeinstall5.下載smokeping並且解壓,編譯安裝。
wgethttp://oss.oetiker.ch/smokeping/pub/smokeping-2.6.9.tar.gztar-zxvfsmokeping-2.6.9.tar.gzcdsmokeping-2.6.9/./setup/build-perl-modules.sh/usr/local/smokeping/thirdparty./configure--prefix=/usr/local/smokepinggmakeinstall6.創建三個文件目錄和一個日志文件,並且設置屬主和屬組均為apache。
cd/usr/local/smokeping/mkdir{cache,data,var}touch/var/log/smokeping.logchownapache.apache/var/log/smokeping.logchmod600/usr/local/smokeping/etc/smokeping_secrets.distchown-Rapache.apachedata/chown-Rapache.apachevar/chown-Rapache.apachecache/7.修改相應的配置文件。
cd/usr/local/smokeping/htdocs/mvsmokeping.fcgi.distsmokeping.fcgicd/usr/local/smokeping/etc/mvconfig.distconfig8.配置apache配置文件和smokeping的配置文件。
在/etc/httpd/conf/httpd.con末尾添加以下加行: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">AllowOverrideNoneOptionsAllAddHandlercgi-script.fcgi.cgiOrderallow,denyAllowfromallDirectoryIndexsmokeping.fcgi</Directory>smokeping配置文件如下所示:cat/usr/local/smokeping/etc/config***General***[email protected]=my.mail.hostsendmail=/usr/sbin/sendmail#NOTE:donotputtheImageCachebelowcgi-bin#sinceallfilesundercgi-binwillbeexecuted...thisisnot#goodforimages.imgcache=/usr/local/smokeping/cacheimgurl=cachedatadir=/usr/local/smokeping/datapiddir=/usr/local/smokeping/varcgiurl=http://10.104.96.155/smokeping.cgismokemail=/usr/local/smokeping/etc/smokemail.disttmail=/usr/local/smokeping/etc/tmail.dist#specifythistogetsyslogloggingsyslogfacility=local0#eachprobeisnowruninitsownprocess#disablethistoreverttotheoldbehaviour#concurrentprobes=no***Alerts***[email protected][email protected]+somelosstype=loss#inpercentpattern=>0%,*12*,>0%,*12*,>0%comment=loss3timesinarow***Database***step=300pings=20#consfnmrhbstepstotalAVERAGE0.511008AVERAGE0.5124320MIN0.5124320MAX0.5124320AVERAGE0.5144720MAX0.5144720MIN0.5144720***Presentation***template=/usr/local/smokeping/etc/basepage.html.distcharset=utf-8+chartsmenu=Chartstitle=Themostinterestingdestinations++stddevsorter=StdDev(entries=>4)title=TopStandardDeviationmenu=StdDeviationformat=StandardDeviation%f++maxsorter=Max(entries=>5)title=TopMaxRoundtripTimemenu=byMaxformat=MaxRoundtripTime%fseconds++losssorter=Loss(entries=>5)title=TopPacketLossmenu=Lossformat=PacketsLost%f++mediansorter=Median(entries=>5)title=TopMedianRoundtripTimemenu=byMedianformat=MedianRTT%fseconds+overviewwidth=600height=50range=10h+detailwidth=600height=200unison_tolerance=2"Last3Hours"3h"Last30Hours"30h"Last10Days"10d"Last400Days"400d#+hierarchies#++owner#title=HostOwner#++location#title=Location***Probes***+FPingbinary=/usr/local/sbin/fping***Slaves***secrets=/usr/local/smokeping/etc/smokeping_secrets.dist+boomerdisplay_name=boomercolor=0000ff+slave2display_name=anothercolor=00ff00***Targets***probe=FPingmenu=Toptitle=NetworkLatencyGrapherremark=WelcometotheSmokePingwebsiteofxxxCompany.\Hereyouwilllearnallaboutthelatencyofournetwork.+Testmenu=Targets#parents=owner:/Test/Jameslocation:/++Jamesmenu=Jamestitle=Jamesalerts=somelossslaves=boomerslave2host=james.address++MultiHostmenu=Multihosttitle=JamesandJamesasseenfromBoomerhost=/Test/James/Test/James~boomer++Localhostmenu=Localhosttitle=Localhostalerts=someloss#slaves=boomerslave2host=10.104.96.155+Othermenu=網絡及節點監控title=監控統計++dianxinmenu=電信網絡監控title=電信網絡監控列表host=/Other/dianxin/dianxin-bj/Other/dianxin/dianxin-sh/Other/dianxin/dianxin-gz/Other/dianxin/dianxin-sz/Other/dianxin/dianxin-tj/Other/dianxin/dianxin-sy/Other/dianxin/dianxin-xa/Other/dianxin/dianxin-jn/Other/dianxin/dianxin-cd/Other/dianxin/dianxin-hf/Other/dianxin/dianxin-wh/Other/dianxin/dianxin-zz/Other/dianxin/dianxin-cs/Other/dianxin/dianxin-nj/Other/dianxin/dianxin-hz/Other/dianxin/dianxin-xm/Other/dianxin/dianxin-nn/Other/dianxin/dianxin-ty/Other/dianxin/dianxin-cc/Other/dianxin/dianxin-lz/Other/dianxin/dianxin-nn/Other/dianxin/dianxin-xn/Other/dianxin/dianxin-hk/Other/dianxin/dianxin-fz/Other/dianxin/dianxin-gy/Other/dianxin/dianxin-km/Other/dianxin/dianxin-xj/Other/dianxin/dianxin-xz/Other/dianxin/dianxin-heb/Other/dianxin/dianxin-hhht+++dianxin-bjmenu=北京電信title=北京電信alerts=somelosshost=106.37.232.114+++dianxin-shmenu=上海電信title=上海電信alerts=somelosshost=202.96.209.133+++dianxin-gzmenu=廣州電信title=廣州電信alerts=somelosshost=219.137.229.134+++dianxin-szmenu=深圳電信title=深圳電信alerts=somelosshost=202.96.154.15+++dianxin-tjmenu=天津電信title=天津電信alerts=somelosshost=219.150.32.132+++dianxin-symenu=沈陽電信title=沈陽電信alerts=somelosshost=219.148.204.66+++dianxin-xamenu=西安電信title=西安電信alerts=somelosshost=117.35.68.4+++dianxin-jnmenu=濟南電信title=濟南電信alerts=somelosshost=219.146.0.253+++dianxin-cdmenu=成都電信title=成都電信alerts=somelosshost=61.139.2.69+++dianxin-hfmenu=合肥電信title=合肥電信alerts=somelosshost=220.178.75.134+++dianxin-whmenu=武漢電信title=武漢電信alerts=somelosshost=221.232.129.35+++dianxin-zzmenu=鄭州電信title=鄭州電信alerts=somelosshost=123.52.19.15+++dianxin-csmenu=長沙電信title=長沙電信alerts=somelosshost=202.103.96.253+++dianxin-njmenu=南京電信title=南京電信alerts=somelosshost=218.2.135.1+++dianxin-hzmenu=杭州電信title=杭州電信alerts=somelosshost=202.96.96.68+++dianxin-xmmenu=廈門電信title=廈門電信alerts=somelosshost=202.101.103.54+++dianxin-nnmenu=南寧電信title=南寧電信alerts=somelosshost=202.103.225.254+++dianxin-tymenu=太原電信title=太原電信alerts=somelosshost=59.49.77.1+++dianxin-ccmenu=長春電信title=長春電信alerts=somelosshost=219.149.194.55+++dianxin-lzmenu=蘭州電信title=蘭州電信alerts=somelosshost=202.100.64.68+++dianxin-ncmenu=南昌電信title=南昌電信alerts=somelosshost=202.101.224.68+++dianxin-xnmenu=西寧電信title=西寧電信alerts=somelosshost=202.100.138.68+++dianxin-hkmenu=海口電信title=海口電信alerts=somelosshost=202.100.192.1+++dianxin-fzmenu=福州電信title=福州電信alerts=somelosshost=218.85.157.99+++dianxin-gymenu=貴陽電信title=貴陽電信alerts=somelosshost=202.98.198.167+++dianxin-kmmenu=昆明電信title=昆明電信alerts=somelosshost=222.172.200.68+++dianxin-xjmenu=新疆電信title=新疆電信alerts=somelosshost=61.128.114.133+++dianxin-xzmenu=西藏電信title=西藏電信alerts=somelosshost=202.98.224.2+++dianxin-hebmenu=哈爾濱電信title=哈爾濱電信alerts=somelosshost=219.150.32.132+++dianxin-hhhtmenu=呼和浩特電信title=呼和浩特電信alerts=somelosshost=121.56.12.12++liantongmenu=聯通網絡監控title=聯通網絡監控列表host=/Other/liantong/liantong-bj/Other/liantong/liantong-sh/Other/liantong/liantong-gz/Other/liantong/liantong-sz/Other/liantong/liantong-tj/Other/liantong/liantong-sy/Other/liantong/liantong-xa/Other/liantong/liantong-jn/Other/liantong/liantong-qd/Other/liantong/liantong-cd/Other/liantong/liantong-ah/Other/liantong/liantong-wh/Other/liantong/liantong-zz/Other/liantong/liantong-cs/Other/liantong/liantong-nj/Other/liantong/liantong-hz/Other/liantong/liantong-xm/Other/liantong/liantong-nn/Other/liantong/liantong-nc/Other/liantong/liantong-ty/Other/liantong/liantong-xn/Other/liantong/liantong-gz/Other/liantong/liantong-fz/Other/liantong/liantong-lz/Other/liantong/liantong-km/Other/liantong/liantong-xj/Other/liantong/liantong-xz/Other/liantong/liantong-heb/Other/liantong/liantong-hhht+++liantong-bjmenu=北京聯通title=北京聯通alerts=somelosshost=202.106.196.253+++liantong-shmenu=上海聯通title=上海聯通alerts=somelosshost=210.22.70.253+++liantong-gzmenu=廣州聯通title=廣州聯通alerts=somelosshost=221.4.66.66+++liantong-szmenu=深圳聯通title=深圳聯通alerts=somelosshost=210.21.196.6+++liantong-tjmenu=天津聯通title=天津聯通alerts=somelosshost=202.99.96.1+++liantong-symenu=沈陽聯通title=沈陽聯通alerts=somelosshost=202.96.75.1+++liantong-xamenu=西安聯通title=西安聯通alerts=somelosshost=221.11.1.67+++liantong-jnmenu=濟南聯通title=濟南聯通alerts=somelosshost=202.102.152.3+++liantong-qdmenu=青島聯通title=青島聯通alerts=somelosshost=202.102.128.68+++liantong-cdmenu=成都聯通title=成都聯通alerts=somelosshost=119.6.6.6+++liantong-ahmenu=安徽聯通title=安徽聯通alerts=somelosshost=218.104.78.2+++liantong-whmenu=武漢聯通title=武漢聯通alerts=somelosshost=218.104.111.122+++liantong-zzmenu=鄭州聯通title=鄭州聯通alerts=somelosshost=218.29.122.70+++liantong-csmenu=長沙聯通title=長沙聯通alerts=somelosshost=58.20.127.238+++liantong-njmenu=南京聯通title=南京聯通alerts=somelosshost=221.6.4.66+++liantong-hzmenu=杭州聯通title=杭州聯通alerts=somelosshost=221.12.31.58+++liantong-xmmenu=廈門聯通title=廈門聯通alerts=somelosshost=218.104.128.106+++liantong-nnmenu=南寧聯通title=南寧聯通alerts=somelosshost=221.7.136.68+++liantong-ncmenu=南昌聯通title=南昌聯通alerts=somelosshost=220.248.192.10+++liantong-tymenu=太原聯通title=太原聯通alerts=somelosshost=202.99.192.66+++liantong-xnmenu=西寧聯通title=西寧聯通alerts=somelosshost=221.207.12.130+++liantong-gymenu=貴陽聯通title=貴陽聯通alerts=somelosshost=221.13.30.242+++liantong-fzmenu=福州聯通title=福州聯通alerts=somelosshost=58.22.96.6+++liantong-lzmenu=蘭州聯通title=蘭州聯通alerts=somelosshost=221.7.34.1+++liantong-kmmenu=昆明聯通title=昆明聯通alerts=somelosshost=221.3.131.11+++liantong-xjmenu=新疆聯通title=新疆聯通alerts=somelosshost=60.13.184.49+++liantong-xzmenu=西藏聯通title=西藏聯通alerts=somelosshost=221.13.65.38+++liantong-hebmenu=哈爾濱聯通title=哈爾濱聯通alerts=somelosshost=202.97.224.1+++liantong-hhhtmenu=呼和浩特聯通title=呼和浩特聯通alerts=somelosshost=202.99.224.67++yidongmenu=移動網絡監控title=移動網絡監控列表host=/Other/yidong/yidong-bj/Other/yidong/yidong-sh/Other/yidong/yidong-gz/Other/yidong/yidong-sz/Other/yidong/yidong-tj/Other/yidong/yidong-sy/Other/yidong/yidong-xa/Other/yidong/yidong-jn/Other/yidong/yidong-qd/Other/yidong/yidong-cd/Other/yidong/yidong-hf/Other/yidong/yidong-wh/Other/yidong/yidong-zz/Other/yidong/yidong-cs/Other/yidong/yidong-nj/Other/yidong/yidong-nc/Other/yidong/yidong-gy/Other/yidong/yidong-fz/Other/yidong/yidong-lz/Other/yidong/yidong-km/Other/yidong/yidong-hz/Other/yidong/yidong-nn/Other/yidong/yidong-wlmq/Other/yidong/yidong-ls+++yidong-bjmenu=北京移動title=北京移動alerts=somelosshost=211.136.17.107+++yidong-shmenu=上海移動title=上海移動alerts=somelosshost=211.136.150.25+++yidong-gzmenu=廣州移動title=廣州移動alerts=somelosshost=221.179.38.7+++yidong-szmenu=深圳移動title=深圳移動alerts=somelosshost=120.196.165.7+++yidong-tjmenu=天津移動title=天津移動alerts=somelosshost=211.137.160.5+++yidong-symenu=沈陽移動title=沈陽移動alerts=somelosshost=211.137.32.178+++yidong-xamenu=西安移動title=西安移動alerts=somelosshost=218.200.48.238+++yidong-jnmenu=濟南移動title=濟南移動alerts=somelosshost=211.137.191.26+++yidong-qdmenu=青島移動title=青島移動alerts=somelosshost=211.137.186.224+++yidong-cdmenu=成都移動title=成都移動alerts=somelosshost=211.137.96.205+++yidong-hfmenu=合肥移動title=合肥移動alerts=somelosshost=211.138.180.2+++yidong-whmenu=武漢移動title=武漢移動alerts=somelosshost=211.137.59.2+++yidong-zzmenu=鄭州移動title=鄭州移動alerts=somelosshost=211.138.30.66+++yidong-csmenu=長沙移動title=長沙移動alerts=somelosshost=111.8.55.1+++yidong-njmenu=南京移動title=南京移動alerts=somelosshost=221.130.48.1+++yidong-hzmenu=杭州移動title=杭州移動alerts=somelosshost=120.199.7.10+++yidong-nnmenu=南寧移動title=南寧移動alerts=somelosshost=211.138.245.180+++yidong-ncmenu=南昌移動title=南昌移動alerts=somelosshost=211.141.90.68+++yidong-gymenu=貴陽移動title=貴陽移動alerts=somelosshost=211.139.5.1+++yidong-fzmenu=福州移動title=福州移動alerts=somelosshost=211.138.151.1+++yidong-lzmenu=蘭州移動title=蘭州移動alerts=somelosshost=218.203.160.1+++yidong-kmmenu=昆明移動title=昆明移動alerts=somelosshost=211.139.29.1+++yidong-wlmqmenu=烏魯木齊移動title=烏魯木齊移動alerts=somelosshost=218.202.152.131+++yidong-lsmenu=拉薩移動title=拉薩移動alerts=somelosshost=211.139.73.359.分別啟動smokeping和httpd。
/usr/local/smokeping/bin/smokepingps-ef|grepsmokehadoop2184819908011:20pts/100:00:00grepsmokeroot17713110Sep27?00:00:38/usr/local/smokeping/bin/smokeping[FPing]/etc/init.d/httpdstart-ef|grephttpdhadoop2224519908011:21pts/100:00:00grephttpdroot17715210Sep27?00:00:00/usr/sbin/httpdapache1771541771520Sep27?00:00:00/usr/sbin/httpdapache1771551771520Sep27?00:00:00/usr/sbin/httpdapache1771561771520Sep27?00:00:00/usr/sbin/httpdapache1771571771520Sep27?00:00:00/usr/sbin/httpdapache1771581771520Sep27?00:00:00/usr/sbin/httpdapache1771591771520Sep27?00:00:00/usr/sbin/httpdapache1771601771520Sep27?00:00:00/usr/sbin/httpdapache1771611771520Sep27?00:00:00/usr/sbin/httpdapache1773731771520Sep27?00:00:00/usr/sbin/httpdapache1773781771520Sep27?00:00:00/usr/sbin/httpdapache1797261771520Sep27?00:00:00/usr/sbin/httpd10.讓smokeping界面支持中文
安裝字體yum-yinstallwqy-zenhei-fonts.noarch編輯smokeping的配置文件vim/usr/local/smokeping/etc/config第50行添加charset=utf-8#添加此行編輯Graphs.pm這個文件vim/usr/local/smokeping/lib/Smokeping/Graphs.pm#第147行下邊插入下邊一行'--fontTITLE:20:"WenQuanYiZenHeiMono"',11.訪問地址,看下是否可以出現smokeping頁面。
http://xxxxxx/Linuxjc/1184811.html TechArticle