SMOKEPING

SMOKEPING

Smokeping is a latency measurement tool. It sends test packets out to the net and measures the amount of time they need to travel from one place to the other and back.

Installing Smokeping on ubuntu 12.04.

I have created smokeping user and installed apache, php and other utilities required for smokeping.

  1. First install apache with below parameters.

$./configure –prefix=/home/smokeping/apache –enable-so–enable-cgi–enable-info–enable-rewrite–enable-speling–enable-usertrack–enable-deflate –enable-ssl–enable-mime-magic –enable-expires–enable-headers–with-perl

   

  1. Configure apache with php.

$./configure \

–with-apxs2=/home/smokeping/apache/bin/apxs \

–prefix=/home/smokeping/apache/php5 \

–with-config-file-path=/home/smokeping/apache/php5 \

–enable-force-cgi-redirect \

–disable-cgi \

–with-zlib \

–with-gettext \

–with-gdbm

  1. Install rrdtool with dependent lib

#apt-get install rrdtool

#apt-get install libcairo2-dev

#apt-get install libpango1.0-dev

#apt-get install libxml2-dev

#apt-get install libjpeg-dev

#apt-get install libpng12-dev

#apt-get install libxpm-dev

#apt-get install libfreetype6-dev

#apt-get install libgdbm-dev

#apt-get install librrdtool-oo-perl

#apt-get install apt-file

#apt-get install gettext

  1. Installing rrdtool with source file. rrdtool-1.4.5.tar.gz

$cd rrdtool-1.4.5

$./configure –prefix=/home/smokeping/smokeping/ –disable-tcl –disable-python

$make

$make install

  1. Install fping echo ping dig utilities

$apt-get install fping

$apt-cache search dig dns

$apt-get installdnsutils

  1. Install speedy and perl modules

$apt-get install speedy-cgi-perl cpan

$apt-get install  libpq-dev

$perl -MCPAN -e shell

  install FCGI

  install CGI::Fast

  install Config::Grammar

  install LWP

  install Socket6

  install Net::Telnet

  install Net::OpenSSH

  install Net::DNS

  install Net::LDAP

  install IO::Socket::SSL

  install Authen::Radius

  1. Installing smokeping.

$wget http://oss.oetiker.ch/smokeping/pub/smokeping-2.6.9.tar.gz

$cd smokeping-2.6.9

$./setup/build-perl-modules.sh /home/smokeping/smokeping/thirdparty

$./configure –prefix=/home/smokeping/smokeping

$make

$make install

  1. Required changes in apache.

$vi /home/smokeping/apache/conf/httpd.conf

<Location /smokeping>

#<Directory “/home/intranet/apache/htdocs/smokeping/”>

Options +ExecCGI +FollowSymLinks +Includes

AddHandler cgi-script .cgi .pl

AddType text/html .shtml

AddHandler server-parsed .shtml

DirectoryIndex index.shtml index.html

#</Directory>

</Location>

  1. Smokeping web interfaces

$cp /home/smokeping/smokeping/bin/smokeping_cgi /home/smokeping/apache/htdocs/smokeping/smokeping.cgi

add below lines in smokeping.cgi after coping it.

my $cfg = (shift @ARGV) || “/home/smokeping/smokeping/etc/config.dist”;

use lib qw(/home/smokeping/smokeping/rrdtool/lib/);

  1. Changes required in smokeping config.dist file.

$cp -r htdocs /home/smokeping/apache/htdocs/smokeping

$ vi /home/smokeping/smokeping/etc/config.dist

add the changes,

owner= Operations

contact  = it@hari2ulinux.com

mailhost = smtp.hari2ulinux.com

sendmail = /usr/lib/sendmail

imgcache = /home/smokeping/apache/htdocs/smokeping/imgs

imgurl   = http://test20.hari2ulinux.com:8008/smokeping/imgs

datadir  = /home/smokeping/apache/htdocs/smokeping/AADJ-smokeping/dist/var

piddir=/home/smokeping/apache/htdocs/smokeping/AADJ-smokeping/dist/var

cgiurl   = http://test20.hari2ulinux.com:8008/smokeping/smokeping.cgi

smokemail = /home/smokeping/smokeping/etc/smokemail.dist

tmail = /home/smokeping/smokeping/etc/tmail.dist

  1. Make symbolic link of config.dist

$cd /home/smokeping/apache/htdocs/smokeping

$ln -s /home/smokeping/smokeping/etc/config.dist smokeping.cfg

  1. Changes done on smokeping executable file and start smokeping

$vi  /home/smokeping/smokeping/bin/smokeping

added below lines.

use lib qw(/home/smokeping/smokeping/rrdtool/lib/);

use lib qw(/home/smokeping/smokeping/lib);

use Smokeping;

Smokeping::main(“/home/smokeping/smokeping/etc/config.dist”);

$/home/smokeping/smokeping/bin/smokeping start

  1. Add the domain which need to be monitor on config.dist file.

Debugging

===========

1.Below command will show smokeping for any error.

$ /home/smokeping/smokeping/bin/smokeping –debug

  1. For checking dns probe. Check if you are able to resolve dns query.

$ dig @dnsserver domainname

  1. Checking domain with url.

echoping -P 0xa0 -p 6 -t 1 -w 1 -4 -C -h /abc.gif -A -a -n 5 k1.hari2ulinux.com

Advertisements