tutorial

Monitoring SmokePing with Vigilmon

SmokePing measures network latency beautifully — but it can't alert you when SmokePing itself goes down. Here's how to monitor the SmokePing CGI, master process, slave connections, and SSL certificates with Vigilmon.

SmokePing is a specialized open-source network latency measurement and visualization tool created by Tobi Oetiker, the same developer behind RRDtool. It probes network targets, stores round-trip time and packet loss data in RRD files, and renders latency history graphs via a CGI web interface. SmokePing is excellent at showing you what your network looks like over time — but it has no built-in alerting when SmokePing itself goes down. Vigilmon covers that gap, monitoring the CGI endpoint, master process port, slave connection health, and SSL certificates so SmokePing stays observable.

What You'll Set Up

  • HTTP uptime monitor for the SmokePing CGI web interface (/smokeping/)
  • TCP port check for the SmokePing master process
  • SSL certificate expiry alerts for HTTPS-proxied SmokePing setups
  • Cron heartbeat for SmokePing's scheduled latency probe runs

Prerequisites

  • SmokePing 2.7+ installed on a Linux server with a web server (Apache or nginx)
  • SmokePing CGI accessible at /smokeping/smokeping.cgi or equivalent
  • A free Vigilmon account

Step 1: Monitor the SmokePing CGI Web Interface

The SmokePing CGI endpoint is the primary availability signal. If the web server or the Perl CGI layer fails, this URL stops responding.

  1. Log in to vigilmon.online and click Add Monitor.
  2. Set Type to HTTP / HTTPS.
  3. Enter your SmokePing URL: https://smokeping.yourdomain.com/smokeping/ (or http://your-server/cgi-bin/smokeping.cgi).
  4. Set Check interval to 1 minute.
  5. Set Expected HTTP status to 200.
  6. Click Save.

Add a keyword check to confirm the SmokePing application is rendering correctly:

  1. Open the monitor settings.
  2. Enable Keyword check.
  3. Enter SmokePing as the expected keyword — this appears in the page title of every SmokePing view.
  4. Click Save.

This keyword check catches cases where the web server returns 200 for a Perl CGI error page instead of the actual SmokePing interface.


Step 2: Check the SmokePing Master Process Port

In distributed SmokePing setups, the master daemon listens on a TCP port (default 8150) to coordinate slave nodes that probe from different locations. Monitoring this port confirms the master process is alive independently of the web interface.

  1. In Vigilmon, click Add Monitor.
  2. Set Type to TCP Port.
  3. Enter your server's hostname or IP.
  4. Set Port to 8150 (or your configured smokeping_secrets master port).
  5. Set Check interval to 1 minute.
  6. Click Save.

Verify the port is open on your server:

ss -tlnp | grep 8150
# Should show: LISTEN 0 128 0.0.0.0:8150

If you are running a standalone SmokePing setup (no slaves), skip this step — there is no master listener to monitor.


Step 3: Verify Slave Connection Health (Distributed Setups)

For distributed SmokePing deployments with remote slave nodes probing from multiple locations, check slave connectivity by inspecting the SmokePing status endpoint or log.

Check slave status in the SmokePing log:

tail -50 /var/log/smokeping/smokeping.log | grep -i slave

You should see lines like slave HOST connected and periodic data submission entries for each slave. Slave disconnections appear as slave HOST disconnected or missing submission lines.

To make slave health visible to Vigilmon, add a lightweight status script at /var/www/html/smokeping/slave-status.cgi:

#!/usr/bin/perl
use strict;
my $log = '/var/log/smokeping/smokeping.log';
my $window = time() - 600;  # 10-minute window
my $active = 0;
open(my $fh, '<', $log) or die;
while (<$fh>) {
    $active++ if /slave .* connected/ && (stat($log))[9] > $window;
}
close $fh;
print "Content-Type: application/json\n\n";
print "{\"slaves_active\":$active}";

Then add a Vigilmon monitor for this endpoint with a keyword check for slaves_active to confirm at least one slave is reporting in.


Step 4: SSL Certificate Alerts for HTTPS SmokePing

SmokePing is often fronted by Apache or nginx as a reverse proxy, with Let's Encrypt handling HTTPS. Configure certificate expiry monitoring:

  1. Open the HTTP monitor created in Step 1.
  2. Enable Monitor SSL certificate under the SSL section.
  3. Set Alert when certificate expires in less than 21 days.
  4. Click Save.

Verify Certbot auto-renewal is configured for your SmokePing domain:

certbot certificates
# Should list your domain with expiry date

systemctl status certbot.timer
# Should show: active (waiting)

For Apache virtual host setups, confirm the SSL configuration is pointing to the correct certificate files:

apachectl -t -D DUMP_VHOSTS
# Shows which vhosts have SSLCertificateFile configured

Step 5: Heartbeat Monitoring for SmokePing Probe Runs

SmokePing probes run on a schedule (typically every 5 minutes, set by the step parameter in your Smokeping::Config). A silent probe failure means your latency graphs flatline. Vigilmon's heartbeat monitor detects this even when the web UI remains accessible.

Check your SmokePing probe step configuration:

grep -i "^step" /etc/smokeping/config
# Example: step = 300  (every 300 seconds = 5 minutes)
  1. In Vigilmon, click Add MonitorCron Heartbeat.
  2. Set Expected ping interval to 5 minutes (or your configured step value in minutes).
  3. Set Grace period to 2 minutes.
  4. Copy the heartbeat URL: https://vigilmon.online/heartbeat/abc123.

SmokePing runs as a daemon, not a cron job. Wrap the heartbeat ping in a script that SmokePing executes after each probe cycle by using the nomasterpoll option and a custom alert program, or use a separate cron job to check SmokePing's RRD file modification time:

# Add to crontab (runs every 5 minutes)
*/5 * * * * root find /var/lib/smokeping -name "*.rrd" -newer /tmp/smokeping-lastcheck -print | grep -q . && curl -s https://vigilmon.online/heartbeat/abc123; touch /tmp/smokeping-lastcheck

This pings Vigilmon only when RRD files have been updated in the last 5 minutes, confirming probes are actually writing data.


Step 6: Configure Alert Channels

  1. Go to Alert Channels in Vigilmon and add email, Slack, or a webhook.
  2. Set Consecutive failures before alert to 2 on the CGI monitor — brief web server restarts should not page you.
  3. Set Consecutive failures before alert to 1 on the TCP port check — master process failure is always worth an immediate alert.
  4. Use Maintenance windows during SmokePing configuration changes:
# Before editing SmokePing config and restarting daemon
curl -X POST https://vigilmon.online/api/maintenance \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"monitor_id": "abc123", "duration_minutes": 5}'

systemctl restart smokeping

# Maintenance window expires automatically

Summary

| Monitor | Target | What It Catches | |---|---|---| | CGI web interface | /smokeping/ endpoint | Web server down, Perl CGI errors | | Master process port | TCP port 8150 | SmokePing daemon crash | | SSL certificate | HTTPS domain | Certificate expiry, renewal failure | | Probe heartbeat | Heartbeat URL | Probes stopped, RRD write failure |

SmokePing gives you a precise picture of your network's latency history — but it can't tell you when its own latency history stops being written. With Vigilmon watching the CGI endpoint, master process port, and probe heartbeat, you get a complete monitoring layer over the tool that monitors your network.

Monitor your app with Vigilmon

Free plan — 5 monitors, no credit card required. Up and running in 60 seconds.

Start free →