Sunday, July 6, 2014

Smokeping to Monitor Network Latency in UBUNTU

Smokeping to Monitor Network Latency in UBUNTU

ping
Recently I was troubleshooting a network where concerned Admin complained that they frequently lost connectivity with the Internet. Sometimes pings replies works okay but latency gets high or timeout / breaks occurs. So I decided to setup mrtg base ping graph to monitor ping latency. The custom made mrtg ping probe worked fine and can provide an overview on target ping / rtt and Downtime in a nice manner,
BUT . . . . . . . . . . . . . . . . . . .
I was thinking far ahead , I was thinking for much more advanced latency and pin point graphs which can show ping latency / rtt / loss in much more detailed way. I recalled my memory from old days when I used to monitor my old network with variety of tools and scripts and suddenly a name popped in my mind " SMOKEPING " , yes this was the tool I was looking for.
SmokePing generates graphs that can reveal the quality (packet loss and latency variability) & reach-ability of your IP address from several distributed locations. SmokePing is a network latency monitor. It measures network latency to a configurable set of destinations on the network, and displays its findings in easy-to-read Web pages. It uses RRDtool as its logging and graphing back-end, making the system very efficient. The presentation of the data on the Web is done through a CGI with some AJAX capabilities for interactive graph exploration.

  • In this article I will show you howto install smokeping on UBUNTU 10/12

First install required components along with smokeping and apache2 (you can remove Apache or any other component if its not required or already installed)
aptitude install smokeping curl libauthen-radius-perl libnet-ldap-perl libnet-dns-perl libio-socket-ssl-perl libnet-telnet-perl libsocket6-perl libio-socket-inet6-perl apache2
Once all is installed, we have to modify few configuration files.
Open following following ...
nano /etc/smokeping/config.d/pathnames
now remove sendmail entry by adding # sign to to comment the sendmail line, usually the first line.
Save and exit.
Now open following file
nano /etc/smokeping/config.d/Targets
Now REMOVE all previous lines , and copy paste following
*** Targets ***  probe = FPing    menu = Top  title = Network Latency Grapher  remark = Welcome to the SmokePing website of <b>ZAIB (Pvt) Ltd.</b> <br> Here you will learn all about the latency of our network.<br><br><br><br><br> This page is maintained by ZAIB. (Pvt) ltd . <br><br>Support Email: aacable@hotmail.com<br>Web: http://aacable.wordpress.com    ### YOU CAN CHANGE THE FOLLOWING ACCORDING TO YOUR NETWORK ###    + Ping    menu = WAN Connectivity  title = WAS Side Network    ++ yahoo    menu = yahoo  title = yahoo ping report  host = yahoo.com    ++ google    menu = google  title = Google ping report  host = google.com    ### YOU CAN CHANGE FOLLOWING ACCORDING TO YOUR NETWORK ###  + Ping2    menu = LAN Connectivity  title = LAN Side Network    ++ Mikrotik    menu = Mikrotik  title = Mikrotik PPP ping report  host = 10.10.0.1    ++ Billing    menu = Billing  title = Radius billing Server ping report  host = 10.0.0.2
save and exit.
now restart smokeping service by
service smokeping restart
and access it via browser.
Results should be something like below image...
lan
wan-report
More info on previous smokeping article based on FEDORA 10 , (Old version) Just for idea