Skip to content
4

SmokePing setup and Proxy

Install SmokePing

sudo apt-get 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

Configuring Smokeping

The Smokeping configuration is in the file /etc/smokeping/config. This file just includes some other files from the /etc/smokeping/config.d directory so we have to modify these files. First we modify /etc/smokeping/config.d/General. In this file, you find some email settings and the URL of the Smokeping web interface. Change them like this:

*** General ***

@include /etc/smokeping/config.d/pathnames

# Please edit this to suit your installation
owner = Falko Timme
contact = me@example.com
cgiurl = http://www.example.com/cgi-bin/smokeping.cgi
mailhost = smtp.example.com
# 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

Open /etc/smokeping/config.d/Alerts and set the correct to and from addresses for emails sent by Smokeping:

*** Alerts ***
to = me@example.com
from = smokealert@example.com

Next open /etc/smokeping/config.d/Targets. In this file, you find the remark line. Modify it to your likings:

remark = Welcome to the SmokePing website of ‘Example Company’

Basic Example

We will now do a basic configuration to measure the network latency to certain servers in various countries (e.g. Germany, UK, USA). In this example, I’m going to test the network connection to the servers www.heise.de (Germany), bbc.co.uk (UK), and web.mit.edu (USA)

Open /etc/smokeping/config.d/Targets again:
Add the following lines to the file:

+ World

menu = World
title = World

++ Europe

menu = Europe
title =European Connectivity

+++ Germany

menu = Germany
title = German Connectivity
alerts = bigloss,someloss,startloss

++++ Heise

menu = Heise
title = Heise
host = www.heise.de

+++ UK

menu = United Kingdom
title = United Kingdom

++++ BBC

menu = BBC
title = BBC
host = bbc.co.uk

++ USA

menu = North America
title =North American Connectivity

+++ MIT

menu = MIT
title = Massachusetts Institute of Technology Webserver
host = web.mit.edu

Save your changes and restart Smokeping:
/etc/init.d/smokeping restart

Smokeping will now probe the servers by pinging them (by using /usr/bin/fping) – this is the default test.
Now open a web browser and go to http://www.example.com/cgi-bin/smokeping.cgi.

CURL Probe with Proxy

Open /etc/smokeping/config.d/Targets again:
Add the following lines to the file

++ USAmenu = North America
title =North American Connectivity

+++ MITCURL

menu = MITCURL
title = Massachusetts Institute of Technology Webserver
probe = Curl # if the default probe is something else
host = web.mit.edu
agent = User-Agent: Lynx/2.8.4rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6c
follow_redirects = yes
include_redirects = yes
interface = eth0
urlformat = -x 172.16.0.1:8080 http://%host%/ # mandatory

Now add the curl probe to the probes file
/etc/smokeping/config.d/Probes

+ Curl

binary = /usr/bin/curl
forks = 5
offset = 50%
step = 300

Finally restart smokeping.

4 Comments Post a comment
  1. Nov 18 2010

    TY for the great information! I wouldn’t have found this by myself!

  2. Nov 18 2010

    I’ve meant to write about something like this on my blog and this has given me an idea. TY.

  3. Nov 18 2010

    When I look at your RSS feed it just gives me a page of trash, is the problem on my end?

  4. Nov 18 2010

    Keep it up, great job! Just the information I had to have.

Share your thoughts, post a comment.

(required)
(required)

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments

Get Adobe Flash playerPlugin by wpburn.com wordpress themes
This site employs the Ravatars plugin.