1 / 38

IPv6 DNS 主機 Smokeping 監測

IPv6 DNS 主機 Smokeping 監測. 電算中心呂芳發 2011 年 11 月 12 日. 大綱. Smokeping 簡介 Smokeping 安裝 Config 設定檔說明 結論. SmokePing 簡介. SmokePing 用來從外部檢測服務系統的 latency ,用 Perl 可以快速自製檢測工具,並自動存成  RRDTool DB 與圖檔,內建的 Alert  支援 Real-Time Traffic Pattern Detection ,可以非常有彈性的用以自定警報通知。. SmokePing 特性.

Download Presentation

IPv6 DNS 主機 Smokeping 監測

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. IPv6 DNS主機Smokeping監測 電算中心呂芳發 2011年11月12日

  2. 大綱 • Smokeping 簡介 • Smokeping 安裝 • Config 設定檔說明 • 結論

  3. SmokePing簡介 • SmokePing 用來從外部檢測服務系統的latency,用 Perl 可以快速自製檢測工具,並自動存成 RRDTool DB與圖檔,內建的 Alert 支援 Real-Time Traffic Pattern Detection,可以非常有彈性的用以自定警報通知。

  4. SmokePing特性 • 跟蹤網絡延遲(latency)。 • 延遲(latency)視覺化管理工具。 • 圖形資源管理。 • 可彈性加入延遲測量工具。 • 可配置警報系統。 • “有趣”的圖形延遲圖表。 • 免費軟體

  5. 如何看 Smokeping 圖 • 藉著發送測試數據封包量測往返時間。 • 對於每一cycle測量 smokeping發送多個數據封包。 在各種不同的往返時間,選擇中位數(即中間的一個)。 即當有10時間值,選擇第5個時間值繪製, 其他值繪製成連續的灰色色調的背景。 • Data packets loss , 以不同顏色表示掉封包比率。

  6. 如何看 Smokeping 圖-簡圖 • AV MD • 平均中位數 • AV LS • 平均損失 • AV SD • 在每一輪的多次測量的平均標準偏差 • AM / AS • 平均中位數和平均標準差的比率

  7. 如何看 Smokeping 圖-詳細圖 • AVG,MAX,MIN,now • 平均,最高,最低,目前的中位數 • SD • 標準差中位數 • am/ S • 平均中位數與標準差的比率

  8. Smokeping install • Smokeping是用perl所寫的程序,不需要安裝。 • 用perl所寫,需要使用到一些工具像是rrdtool、fping、libwww-perl等,以及perl的module。需要先安裝好,當Smokeping 服務啟動時會自動簡查所需要的程序是否都安裝完成。

  9. Smokeping install • using CentOS 5.7 • # yum update# rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm # yum install httpd# yum install rrdtool# yum install fping# yum install echoping# yum install curl# yum install perl perl-Net-Telnet perl-Net-DNS perl-libwww-perl perl-IO-Socket-SSL perl-Socket6 perl-CGI-SpeedyCGI

  10. Smokeping install • Use the FPing6 probe Download fping6 : wget http://unfix.org/projects/ipv6/fping-2.4b2_to-ipv6.tar.gz tar xvzf fping-2.4b2_to-ipv6.tar.gz cd fping-2.4b2_to-ipv6 configure make make install

  11. Smokeping install • # wget http://oss.oetiker.ch/smokeping/pub/smokeping-2.4.1.tar.gz# tar zxvf smokeping-2.4.1.tar.gz# mv smokeping-2.4.1 /opt/smokeping# cd /opt/smokeping # cd bin/# cp smokeping.dist smokeping# cd ../htdocs/# cp smokeping.cgi.dist smokeping.cgi

  12. Smokeping install • # cp tr.cgi.dist tr.cgi# cd ../etc/# cp config.dist config# cp basepage.html.dist basepage.html# cp smokemail.dist smokemail# cp tmail.dist tmail# cp smokeping_secrets.dist smokeping_secrets# chmod 600 /opt/smokeping/etc/smokeping_secrets

  13. Smokeping install • # vi /opt/smokeping/bin/smokeping Replace this: With This:

  14. Smokeping install • # vi /opt/smokeping/htdocs/smokeping.cgi Replace this:

  15. Smokeping install With this:

  16. Smokeping install • # cd /opt/smokeping/htdocs# vi /opt/smokeping/htdocs/tr.cgi Replace this:

  17. Smokeping install With this:

  18. Smokeping install • # mkdir -p /var/www/html/smokeping/img /var/www/html/smokeping/script/ /opt/smokeping/data /opt/smokeping/var# chown -R apache:apache /var/www/html/smokeping/img # ln -s /opt/smokeping/htdocs/cropper /var/www/html/smokeping/cropper# ln -s /opt/smokeping/htdocs/resource /var/www/html/smokeping/resource# ln -s /opt/smokeping/htdocs/script/Tr.js /var/www/html/smokeping/script/Tr.js# ln -s /opt/smokeping/htdocs/smokeping.cgi /var/www/html/smokeping/smokeping.cgi# ln -s /opt/smokeping/htdocs/tr.cgi /var/www/html/smokeping/tr.cgi

  19. Smokeping install • vi /etc/httpd/conf/httpd.conf change > #AddHandler cgi-script .cgito > AddHandler cgi-script .cgi Under <Directory “/var/www/html”> change > Options Indexes FollowSymLinksto > Options Indexes FollowSymLinks ExecCGI AddDefaultCharset UTF-8

  20. Smokeping install • # vi /opt/smokeping/etc/basepage.html Change this: To this:

  21. Smokeping install • # vi /opt/smokeping/htdocs/tr.html Change this: To this:

  22. Smokeping install • # ln -s /opt/smokeping/htdocs/tr.html /var/www/html/smokeping/tr.html # vi /opt/smokeping/etc/config

  23. Smokeping install • # vi /etc/init.d/smokeping # chmod 755 /etc/init.d/smokeping • Apache and Smokeping startup # /sbin/chkconfig smokeping on# /sbin/chkconfig httpd on# /sbin/service smokeping start# /sbin/service httpd start

  24. Smokeping install browse http://140.115.2.38/smokeping/smokeping.cgi

  25. Smokeping config

  26. Config *** General *** owner = ncuadmin contact = center25@cc.ncu.edu.tw mailhost = 140.115.2.38 sendmail = /usr/sbin/sendmail imgcache = /var/www/html/smokeping/img imgurl = http://140.115.2.38/smokeping/img datadir = /opt/smokeping/data piddir = /opt/smokeping/var cgiurl = http://140.115.2.38/smokeping/smokeping.cgi

  27. Config *** Alerts *** to = center25@cc.ncu.edu.tw (設定要收到警報信件的信箱) from = center25@cc.ncu.edu.tw (設定本機發信的帳號 ) +someloss  type = loss  # in percent  pattern = >20%,>20% comment = #說明 : 當連續兩個週期封包都Loss高於20% 時就alert *** Database *** step     = 300       #300秒 pings    = 20        #ping 20次

  28. Config *** Presentation *** template = /opt/smokeping/etc/basepage.html charset = UTF-8 + overview width = 600 height = 50 range = 10h + detail width = 600 height = 200 unison_tolerance = 2 "Last 3 Hours" 3h "Last 30 Hours" 30h "Last 10 Days" 10d "Last 400 Days" 400d

  29. Config *** Probes *** + FPing binary = /usr/local/sbin/fping6 + DNS binary = /usr/bin/dig pings = 5 step = 180

  30. Config *** Targets *** probe = FPing menu = Top title = Network Latency Grapher remark = Welcome to this SmokePing website. + network menu = Net latency title = Network latency (ICMP pings) ++ ns1 host = 2001:288:3001:1::31 ++ ns2 host = 2001:288:3000:227::4 + DNS probe = DNS menu = DNS latency title = Service latency (DNS) ++ dns1 host = 2001:288:3001:1::31 ++ dns2 host = 2001:288:3000:227::4

  31. Config

  32. Config

  33. Config-curl *** Probes *** + Curl binary = /usr/bin/curl step = 60 # a default for this target-specific variable urlformat = http://%host%/ *** Targets *** probe = Curl menu = Top title = Network Latency Grapher remark = Welcome to this SmokePing website. + HTTP menu = http title = HTTP latency ++ ncuweb menu = ncuweb title = HTTP latency for ncuweb host = www.ncu.edu.tw

  34. Config-curl

  35. Config-echoping *** Probes *** + EchoPingHttp binary = /usr/bin/echoping *** Targets *** probe = EchoPingHttp menu = Top title = Network Latency Grapher remark = Welcome to this SmokePing website. + HTTP menu = http title = HTTP latency ++ ncuweb menu = ncuweb title = HTTP latency for ncuweb host = www.ncu.edu.tw

  36. Config-echoping

  37. 結論 • 好用的延遲(latency)狀態量測工具 • 除了監測封包量測往返時間, 搭配其他工具可監測web,ftp 下載的時間及dns查詢時間

  38. Thank You!

More Related