Recently work needs to monitor a branch office to IDC computer network situation, to the network to find a lot of software, found a call smokeping open source software is also good, it is the author of RRDtool, in the graphic display is very beautiful, can be used to detect the network state and stability.
The following is a description of the installation configuration method of the software:
A Installing the Software
1. Install the required tools using the Yum command
Yum install gcc freetype-devel zlib-devel libpng-devel libart_lgpl-devel httpd-devel apr-util-devel apr-devel Cairo Cairo -devel Pango pango-devel libxml2 libxml2-devel perl-xml-simple.noarch Perl-crypt-ssleay Perl-digest-hmac
2. Installing RRDtool
wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.3.6.tar.gz
Tar zxvf rrdtool-1.3.6.tar.gz
CD rrdtool-1.3.6
./configure--DISABLE-TCL
Make
Make install
3. Installing Cgilib
wget http://down1.chinaunix.net/distfiles/cgilib-0.5.tar.gz
Tar zxvf cgilib-0.5.tar.gz
CD cgilib-0.5
Make
CP Libcgi.a/usr/local/lib
CP Cgi.h/usr/include
4. Installing fping
wget http://fping.sourceforge.net/download/fping.tar.gz
Tar zxvf fping.tar.gz
CD fping-2.4b2_to
./configure
Make
Make check
Make install
5. Installing echoping
wget http://jaist.dl.sourceforge.net/project/echoping/echoping/6.0.0/echoping-6.0.0.tar.gz
Tar zxvf echoping-6.0.0.tar.gz
CD echoping-6.0.0
./configure
Make
Make Test
Make install
6. Installing cgi-speedycgi
wget ftp://195.220.108.108/linux/epel/5/x86_64/mod_speedycgi-2.22-4.el5.x86_64.rpm
wget ftp://ftp.muug.mb.ca/mirror/fedora/epel/5/x86_64/perl-CGI-SpeedyCGI-2.22-4.el5.x86_64.rpm
RPM-IVH--force perl-cgi-speedycgi-2.22-4.el5.x86_64.rpm
RPM-IVH mod_speedycgi-2.22-4.el5.x86_64.rpm
wget http://mirrors.163.com/cpan/authors/id/H/HO/HORROCKS/CGI-SpeedyCGI-2.22.tar.gz
Tar zxvf cgi-speedycgi-2.22.tar.gz
CD cgi-speedycgi-2.22
Perl makefile.pl
Encounter problems Select default option (NO)
Make
Make Test
Make install
7. Installing smokeping
wget http://oss.oetiker.ch/smokeping/pub/smokeping-2.3.6.tar.gz
Tar zxvf smokeping-2.3.6.tar.gz
MV Smokeping-2.3.6/usr/local/smokeping
Cd/usr/local/smokeping
Two Configure Smokeping
1. Modify the file name
Modify the Smokeping.dist under/usr/local/smokeping/bin
CP Smokeping.dist Smokeping
Modify the Basepage.html.dist,config.dist,smokemail.dist under etc/
CP Basepage.html.dist basepage.html
CP config.dist Config
CP Smokemail.dist Smokemail
chmod smokeping_secrets.dist
Modify the Smokeping.cgi.dist under htdoc/
CP Smokeping.cgi.dist SMOKEPING.CGI
2. Modify the configuration file
Configure Bin/smokeping
Vi/usr/local/smokeping/bin/smokeping
In this file we need to modify the path of the previous two Lib and the back config file.
Two Lib are smokeping Lib and RRDtool Lib (Red for modified content)
#!/usr/sepp/bin/perl-5.8.4-w
#!/usr/bin/perl-w
Use Lib qw (/usr/pack/rrdtool-1.2.23-mo/lib/perl);
Use Lib qw (/usr/local/rrdtool-1.3.6/lib/perl);
Use Lib Qw (Lib);
Use Lib qw (/usr/local/smokeping/lib);
Use smokeping 2.003006;
Smokeping::main ("Etc/config.dist");
Smokeping::main ("/usr/local/smokeping/etc/config");
Configure htdocs/smokeping.cgi with the same method as above
vi/usr/local/smokeping/htdocs/smokeping.cgi
************************
#!/usr/sepp/bin/speedy-w
#-*-perl-*-
#!/usr/bin/speedy-w
#-*-perl-*-
# Use Lib qw (/usr/pack/rrdtool-1.0.33-to/lib/perl);
Use Lib qw (/usr/local/rrdtool-1.3.6/lib/perl/);
# Use Lib qw (/home/oetiker/data/projects/aadj-smokeping/dist/lib);
Use Lib qw (Usr/local/smokeping//lib);
Use smokeping 2.003006;
smokeping::cgi ("/home/oetiker/data/projects/aadj-smokeping/dist/etc/config");
smokeping::cgi ("/usr/local/smokeping/etc/config");
Configure Etc/config
VI usr/local/smokeping/etc/config Replace the following lines with the path of the associated software that is already installed
General * * *
Imgcache =/home/oetiker/public_html/smokeping-ms/cache
Imgcache =/usr/local/smokeping/htdocs/cache
Imgurl = cache
Imgurl = cache
DataDir =/tmp/smokeping-ms/data
DataDir =/usr/local/smokeping/var
Piddir =/tmp/smokeping-ms/var
Piddir =/usr/local/smokeping/var
Cgiurl = http://some.url/smokeping.cgi
Cgiurl = http://native ip/htdocs/smokeping.cgi;
Smokemail =/home/oetiker/checkouts/smokeping/trunk/software/etc/smokemail.dist
Smokemail =/usr/local/smokeping/etc/smokemail
Tmail =/home/oetiker/checkouts/smokeping/trunk/software/etc/tmail.dist
Tmail =/usr/local/smokeping/etc/tmail.dist
Presentation * * *
Template=/home/oetiker/checkouts/smokeping/trunk/software/etc/basepage.html.dist
Template =/usr/local/smokeping-2.3.6/etc/basepage.html
Probes * * *
+ fping
binary =/usr/sbin/fping
binary =/usr/local/sbin/fping
#** Database * * *
Step = 60
Pings = 10
Modify the frequency of the ping, the default is 300 seconds ping20 times, we can adjust as needed, here to change to 60 second ping 10 times.
Targets * * *
#=================================
#这里用于配置监控目标, to + number layering, + first page, + + for the sub-layer, we take Baidu and Sohu as an example.
+test
menu= TEST
title = TEST
+ + Baidu
menu = Baidu
title = Baidu
Host = 115.239.210.27
+ + Sohu
menu = Sohu
title = Sohu
Host = 121.14.0.97
#=================================
3. Add a Table of contents
Create the following three directories for saving smokeping data, etc.
Mkdir/usr/local/smokeping/data
Mkdir/usr/local/smokeping/var
Mkdir/usr/local/smokeping/htdocs/cache
Chown–r apache:apache/usr/local/smokeping
4. Modifying the Apache configuration file
Vi/etc/httpd/conf/httpd.conf
Add the following content:
alias/smokeping/"/usr/local/smokeping/htdocs/"
alias/cache/"/usr/local/smokeping/cache/"
<directory "/usr/local/smokeping/htdocs" >
Options FollowSymLinks execcgi
AllowOverride None
AddHandler cgi-script CGI
Order Allow,deny
Allow from all
</Directory>
Three Start
1. Restart Apache
Service httpd Restart
2. Restart Smokeping
/usr/local/smokeping/bin/smokeping restart
Complete.
:
650) this.width=650; "title=" qq20150903192622 "style=" border-top:0px; border-right:0px; border-bottom:0px; border-left:0px; Display:inline "border=" 0 "alt=" qq20150903192622 "src=" http://s3.51cto.com/wyfs02/M01/72/9C/ Wkiom1xopszbn1gfaacj6otwmao369.jpg "" 244 "height=" 184 "/>
Installation and configuration of smokeping under Centos 2015-09-03