smokeping-2.4.1 Installation NotesOn publictest8.fedoraproject.org (2.6.18-194.8.1.el5xen)Ticket #2510
1) We need to install the following packets:# yum install rrdtool# yum install fping# yum install echoping# yum install curl# yum install perl perl-Net-Telnet perl-Net-DNS perl-LDAP perl-libwww-perl perl-RadiusPerl perl-IO-Socket-SSL perl-Socket6 perl-CGI-SpeedyCGI
I suposed installed httpd.
2) We download smokeping and set to its working directory:# 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
3) We need to rename some files to its working name:# mv /opt/smokeping/bin/smokeping.dist /opt/smokeping/bin/smokeping# mv /opt/smokeping/htdocs/smokeping.cgi.dist /opt/smokeping/htdocs/smokeping.cgi# mv /opt/smokeping/htdocs/tr.cgi.dist /opt/smokeping/htdocs/tr.cgi# mv /opt/smokeping/etc/config.dist /opt/smokeping/etc/config# mv /opt/smokeping/etc/basepage.html.dist /opt/smokeping/etc/basepage.html# mv /opt/smokeping/etc/smokemail.dist /opt/smokeping/etc/smokemail# mv /opt/smokeping/etc/tmail.dist /opt/smokeping/etc/tmail# mv /opt/smokeping/etc/smokeping_secrets.dist /opt/smokeping/etc/smokeping_secrets# chmod 600 /opt/smokeping/etc/smokeping_secrets
4) We need to modify this file:# vi /opt/smokeping/bin/smokepingand replace the firsts 9 lines with this values: #!/usr/bin/perl -w # -*-perl-*-
use lib qw(/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/RRDs/); use lib qw(/opt/smokeping/lib);
use Smokeping 2.004000;
Smokeping::main(“/opt/smokeping/etc/config”);
5) We need to modify this file:# vi /opt/smokeping/htdocs/smokeping.cgiand replace the firsts 10 lines with this values: #!/usr/bin/speedy -w # -*-perl-*-
use lib qw(/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/RRDs); use lib qw(/opt/smokeping/lib); use CGI::Carp qw(fatalsToBrowser);
use Smokeping 2.004000;
Smokeping::cgi(“/opt/smokeping/etc/config”);
6) We need to modify this file:# vi /opt/smokeping/htdocs/tr.cgiand replace the firsts 4 lines with this values: #!/usr/bin/speedy -w use strict; use lib qw(/opt/smokeping/lib); use lib qw(perl);
7) We need to prepare the http directory:# 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# ln -s /opt/smokeping/htdocs/img /var/www/html/smokeping/img
uncomment the following line at /etc/httpd/conf/httpd.conf:AddHandler cgi-script .cgi
8 ) We need to create this file with this content:# vi /etc/httpd/conf.d/smokeping.conf Alias /smokeping/ /opt/smokeping/htdocs/
DirectoryIndex index.php index.cgi smokeping.cgi Options Indexes FollowSymLinks ExecCGI MultiViews AllowOverride all
9) We modify the configuration file with content like this: *** General ***
owner = hvivani contact = hernan@vivani.com.ar mailhost = localhost sendmail = /usr/sbin/sendmail # NOTE: do not put the Image Cache below cgi-bin # since all files under cgi-bin will be executed … this is not # good for images. imgcache = /var/www/html/smokeping/img imgurl = http://publictest8.fedoraproject.org/smokeping/img datadir = /opt/smokeping/data piddir = /opt/smokeping/var cgiurl = http://publictest8.fedoraproject.org/smokeping/smokeping.cgi smokemail = /opt/smokeping/etc/smokemail tmail = /opt/smokeping/etc/tmail # specify this to get syslog logging syslogfacility = local0 # each probe is now run in its own process # disable this to revert to the old behaviour # concurrentprobes = no
*** Alerts *** to = hernan@vivani.com.ar from = smokealert@publictest8.fedoraproject.org
+someloss type = loss # in percent pattern = >0%,*12*,>0%,*12*,>0% comment = loss 3 times in a row
*** Database ***
step = 300 pings = 20
# consfn mrhb steps total
AVERAGE 0.5 1 1008 AVERAGE 0.5 12 4320 MIN 0.5 12 4320 MAX 0.5 12 4320 AVERAGE 0.5 144 720 MAX 0.5 144 720 MIN 0.5 144 720
*** Presentation ***
template = /opt/smokeping/etc/basepage.html
+ charts
menu = Charts title = The most interesting destinations
++ stddev sorter = StdDev(entries=>4) title = Top Standard Deviation menu = Std Deviation format = Standard Deviation %f
++ max sorter = Max(entries=>5) title = Top Max Roundtrip Time menu = by Max format = Max Roundtrip Time %f seconds
++ loss sorter = Loss(entries=>5) title = Top Packet Loss menu = Loss format = Packets Lost %f
++ median sorter = Median(entries=>5) title = Top Median Roundtrip Time menu = by Median format = Median RTT %f seconds
+ 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
#+ hierarchies #++ owner #title = Host Owner #++ location #title = Location
*** Probes ***
+ FPing
binary = /usr/sbin/fping
*** Slaves *** secrets=/opt/smokeping/etc/smokeping_secrets #+boomer #display_name=boomer #color=0000ff #+slave2
*** Targets ***
probe = FPing
menu = Top title = Network Latency Grapher remark = Welcome to the SmokePing website of Fedora Project. Here you will learn all about the latency of our network.
+ Test menu= Targets title = Ping Targets #parents = owner:/Test/James location:/
++ publictest8
menu = publictest8 title = publictest8 #alerts = someloss #slaves = boomer slave2 host = publictest8.fedoraproject.org
++ bodhost01
menu = bodhost01 title = bodhost01 #alerts = someloss host = bodhost01.fedoraproject.org
++ ibiblio01
menu = ibiblio01 title = ibiblio01 #alerts = someloss host = ibiblio01.fedoraproject.org
++ internetx01
menu = internetx01 title = internetx01 #alerts = someloss host = internetx01.fedoraproject.org
++ osuosl01
menu = osuosl01 title = osuosl01 #alerts = someloss host = osuosl01.fedoraproject.org
++ serverbeach01
menu = serverbeach01 title = serverbeach01 #alerts = someloss host = serverbeach01.fedoraproject.org
++ serverbeach02
menu = serverbeach02 title = serverbeach02 #alerts = someloss host = serverbeach02.fedoraproject.org
++ serverbeach03
menu = serverbeach03 title = serverbeach03 #alerts = someloss host = serverbeach03.fedoraproject.org
++ serverbeach04
menu = serverbeach04 title = serverbeach04 #alerts = someloss host = serverbeach04.fedoraproject.org
++ serverbeach05
menu = serverbeach05 title = serverbeach05 #alerts = someloss host = serverbeach05.fedoraproject.org
++ telia01
menu = telia01 title = telia01 #alerts = someloss host = telia01.fedoraproject.org
++ tummy01
menu = tummy01 title = tummy01 #alerts = someloss host = tummy01.fedoraproject.org
++ download05
menu = download05 title = download05 #alerts = someloss host = download05.fedoraproject.org
++ people01
menu = people01 title = people01 #alerts = someloss host = people01.fedoraproject.org
#++ MultiHost
#menu = Multihost #title = James and James as seen from Boomer #host = /Test/James /Test/James~boomer
10) Now we star smokeping and httpd:# /opt/smokeping/bin/smokeping# /sbin/service httpd start
11) You can view it working at: publictest8.fedoraproject.org/smokeping/
Ticket #2510