Monitoring Network Latency With Smokeping (Ubuntu 9.04) - Page 2

3.2 Advanced Example

Until now, we are only pinging servers, but it would be good if we could do some other tests as well (e.g. measure how fast a DNS server resolves a domain or measure HTTP latency). Therefore we open /etc/smokeping/config.d/Probes and add the following section.

vi /etc/smokeping/config.d/Probes
binary = /usr/bin/dig
lookup =
pings = 5
step = 180

+ Curl
# probe-specific variables
binary = /usr/bin/curl
step = 60

# a default for this target-specific variable
urlformat = http://%host%/

As you see, we've now added tests for DNS (the lookup line should contain a domain/hostname that you'd like the name servers (that we still have to configure in Smokeping) to look up) and HTTP / FTP (using Curl).

Now at the end of /etc/smokeping/config.d/Targets, we can add the name servers / HTTP servers / FTP servers we'd like to monitor (you can enable/disable tests by uncommenting them/commenting them out):

vi /etc/smokeping/config.d/Targets
+ services
menu = Service Latency
title = Service Latency (DNS, HTTP)

++ DNS
probe = DNS
menu = DNS Latency
title = DNS Latency

+++ dns1
host =

+++ dns2
host =

probe = Curl
menu = HTTP Latency
title = HTTP Latency

+++ server1
menu = server1
title = HTTP Latency for server1
host =

+++ server2
menu = server2
title = HTTP Latency for server2
host =

#+++ server3
#menu = server3
#title = HTTP Latency for server3 (port 8080!)
#host = server3.example
#urlformat = http://%host%:8080/

#++ FTP
#probe = Curl
#menu = FTP Latency
#title = FTP Latency
#urlformat = ftp://%host%/

#+++ server1
#menu = server1
#title = FTP Latency for server1
#host =

#+++ server2
#menu = server2
#title = FTP Latency for server2
#host =

As you see, we are monitoring the name servers and using the DNS probe we've configured in /etc/smokeping/config.d/Probes. We are also measuring the HTTP latency of and by using the Curl probe. If you like, you can also measure FTP latency using the Curl probe, but make sure that you specify a new urlformat for the FTP section (the default, urlformat = http://%host%/, is configured in /etc/smokeping/config.d/Probes; for FTP it should be urlformat = ftp://%host%/).

Restart Smokeping after your changes:

/etc/init.d/smokeping restart

After a few minutes, you should see some data for your new tests in the Smokeping web interface (

You can read up on the Smokeping configuration and further configuration examples here:


4 Debugging

If you think that Smokeping isn't working as expected, you can try to find the problem by running Smokeping in debug mode:

/etc/init.d/smokeping stop
smokeping --debug


Share this page:

4 Comment(s)