Configure advanced network monitoring with SmokePing for detailed latency analysis

Intermediate 45 min May 14, 2026 34 views
Ubuntu 24.04 Debian 12 AlmaLinux 9 Rocky Linux 9

Set up SmokePing for detailed network latency monitoring with visual graphs, multi-target analysis, and advanced alerting. Perfect for tracking network performance trends and identifying connectivity issues across multiple hosts.

Prerequisites

  • Root access to server
  • Apache or Nginx web server
  • Basic networking knowledge
  • Email server for alerts (optional)

What this solves

SmokePing provides detailed latency analysis and network monitoring with visual graphs that track ping response times over extended periods. Unlike basic ping utilities, SmokePing creates historical graphs showing network performance trends, packet loss patterns, and jitter analysis. This helps you identify intermittent connectivity issues, monitor SLA compliance, and troubleshoot network performance problems that standard monitoring tools might miss.

Step-by-step installation

Update system packages

Start by updating your package manager to ensure you get the latest versions of all dependencies.

sudo apt update && sudo apt upgrade -y
sudo dnf update -y

Install SmokePing and dependencies

Install SmokePing along with the required web server and monitoring dependencies.

sudo apt install -y smokeping apache2 rrdtool librrds-perl curl dnsutils iputils-ping
sudo a2enmod cgi
sudo systemctl enable apache2
sudo dnf install -y epel-release
sudo dnf install -y smokeping httpd rrdtool-perl curl bind-utils iputils
sudo systemctl enable httpd

Create SmokePing directory structure

Set up the required directories for SmokePing data storage and web interface with proper permissions.

sudo mkdir -p /var/lib/smokeping/{cache,data,images}
sudo mkdir -p /var/log/smokeping
sudo chown -R smokeping:smokeping /var/lib/smokeping /var/log/smokeping
sudo chmod 755 /var/lib/smokeping/{cache,data,images}

Configure SmokePing main configuration

Create the main SmokePing configuration file with basic settings and monitoring targets.

 General 
owner    = Network Operations
contact  = admin@example.com
mailhost = localhost
sendmail = /usr/sbin/sendmail
imgcache = /var/lib/smokeping/images
imgurl   = http://localhost/smokeping/images
datadir  = /var/lib/smokeping/data
piddir  = /var/run/smokeping
smokemail = /etc/smokeping/smokemail
tmail = /etc/smokeping/tmail

 Alerts 
to = admin@example.com
from = smokeping@example.com

+someloss
type = loss
pattern = >0%,12,>0%,12,>0%
comment = loss 3 times in a row

+rttdetect
type = rtt
pattern = <10,<10,<10,<10,<10,<100,>100,>100,>100
comment = routing table changed?

 Database 
step     = 300
pings    = 20

consfn mrhb steps total

CONSOL_AVG:0.5:1:1008 CONSOL_AVG:0.5:12:4320 CONSOL_MIN:0.5:12:4320 CONSOL_MAX:0.5:12:4320 CONSOL_AVG:0.5:144:720 CONSOL_MAX:0.5:144:720 CONSOL_MIN:0.5:144:720 Presentation template = /etc/smokeping/basepage.html htmltitle = SmokePing Network Latency Monitoring charset = utf-8 + charts menu = Charts title = The most interesting destinations ++ stddev sorter = StdDev(entries=>4) title = Top Standard Deviation menu = Std Deviation format = Standard Deviation %f ++ max sorter = Max(entries=>5) title = Top Max Roundtrip Time menu = by Max format = Max Roundtrip Time %f seconds ++ loss sorter = Loss(entries=>5) title = Top Packet Loss menu = Loss format = Packets Lost %f ++ median sorter = Median(entries=>5) title = Top Median Roundtrip Time menu = by Median format = Median Roundtrip Time %f seconds Probes + FPing binary = /usr/bin/fping + DNS binary = /usr/bin/dig lookup = google.com pings = 5 step = 300 + Curl binary = /usr/bin/curl step = 300 pings = 5 Targets probe = FPing menu = Top title = Network Latency Grapher remark = Welcome to the SmokePing website. Here you will learn all about the latency of our network. + InternetSites menu = Internet Sites title = Internet Sites ++ Google menu = Google title = Google DNS host = 8.8.8.8 alerts = someloss ++ Cloudflare menu = Cloudflare title = Cloudflare DNS host = 1.1.1.1 alerts = someloss,rttdetect ++ OpenDNS menu = OpenDNS title = OpenDNS host = 208.67.222.222 + LocalNetwork menu = Local Network title = Local Network ++ Gateway menu = Default Gateway title = Default Gateway host = 192.168.1.1 alerts = someloss,rttdetect ++ DNSServer menu = Local DNS title = Local DNS Server host = 192.168.1.1 probe = DNS + WebSites menu = Web Sites title = Web Site Response Times probe = Curl ++ ExampleSite menu = Example Site title = Example Website host = https://example.com extraargs = --connect-timeout 10 --max-time 60 -w "namelookup: %{time_namelookup}, connect: %{time_connect}, total: %{time_total}\n"

Configure Apache web server

Set up Apache virtual host configuration to serve SmokePing web interface with proper CGI handling.


    ServerName smokeping.example.com
    DocumentRoot /var/www/html
    
    ScriptAlias /smokeping/smokeping.cgi /usr/lib/cgi-bin/smokeping.cgi
    Alias /smokeping/images /var/lib/smokeping/images
    Alias /smokeping /usr/share/smokeping/www
    
    
        Options None
        AllowOverride None
        Require all granted
    
    
    
        Options None
        AllowOverride None
        Require all granted
    
    
    
        Options ExecCGI
        AllowOverride None
        Require all granted
    
    
    ErrorLog ${APACHE_LOG_DIR}/smokeping_error.log
    CustomLog ${APACHE_LOG_DIR}/smokeping_access.log combined

    ServerName smokeping.example.com
    DocumentRoot /var/www/html
    
    ScriptAlias /smokeping/smokeping.cgi /usr/share/smokeping/cgi/smokeping.cgi
    Alias /smokeping/images /var/lib/smokeping/images
    Alias /smokeping /usr/share/smokeping/htdocs
    
    
        Options None
        AllowOverride None
        Require all granted
    
    
    
        Options None
        AllowOverride None
        Require all granted
    
    
    
        Options ExecCGI
        AllowOverride None
        Require all granted
    
    
    ErrorLog /var/log/httpd/smokeping_error.log
    CustomLog /var/log/httpd/smokeping_access.log combined

Enable Apache site and restart services

Enable the SmokePing site configuration and restart Apache to apply the changes.

sudo a2ensite smokeping.conf
sudo systemctl restart apache2
sudo systemctl restart httpd

Configure SmokePing systemd service

Create a systemd service file to manage SmokePing daemon with proper startup and monitoring.

[Unit]
Description=SmokePing Network Latency Monitor
After=network.target

[Service]
Type=forking
User=smokeping
Group=smokeping
ExecStart=/usr/bin/smokeping --config=/etc/smokeping/config --logfile=/var/log/smokeping/smokeping.log --pid-dir=/var/run/smokeping
ExecReload=/bin/kill -HUP $MAINPID
PIDFile=/var/run/smokeping/smokeping.pid
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

Set up advanced monitoring targets

Configure additional monitoring targets including DNS resolution, HTTP response times, and custom network paths.

# Advanced DNS monitoring
++ DNSPerformance
menu = DNS Performance Tests
title = DNS Resolution Performance
probe = DNS

+++ GoogleDNS
menu = Google DNS
title = Google DNS Resolution
host = 8.8.8.8
lookup = example.com

+++ CloudflareDNS
menu = Cloudflare DNS
title = Cloudflare DNS Resolution
host = 1.1.1.1
lookup = example.com

HTTP response time monitoring

++ HTTPServices menu = HTTP Services title = HTTP Response Times probe = Curl +++ WebServer1 menu = Web Server 1 title = Primary Web Server host = https://www.example.com extraargs = --connect-timeout 10 --max-time 30 -w "DNS: %{time_namelookup}s, Connect: %{time_connect}s, Total: %{time_total}s\n" +++ WebServer2 menu = Web Server 2 title = Secondary Web Server host = https://backup.example.com extraargs = --connect-timeout 10 --max-time 30 -w "DNS: %{time_namelookup}s, Connect: %{time_connect}s, Total: %{time_total}s\n"

Multi-protocol monitoring

++ NetworkInfrastructure menu = Network Infrastructure title = Core Network Devices +++ CoreSwitch menu = Core Switch title = Data Center Core Switch host = 192.168.10.1 pings = 10 step = 60 +++ EdgeRouter menu = Edge Router title = Internet Edge Router host = 203.0.113.1 alerts = someloss,rttdetect

Include advanced targets in main config

Add the include directive to the main configuration file to load the advanced monitoring targets.

sudo mkdir -p /etc/smokeping/config.d
echo "@include /etc/smokeping/config.d/advanced-targets" | sudo tee -a /etc/smokeping/config

Configure email alerting

Set up email templates for SmokePing alerts to notify administrators of network issues.

To: <##TO##>
From: <##FROM##>
Subject: <##SUBJECT##>
Date: <##DATE##>
MIME-Version: 1.0
Content-Type: text/plain

SmokePing Alert: <##ALERT##>

Target: <##TARGET##>
Loss Pattern: <##LOSS##>
RTT Pattern: <##RTT##>
Hostname: <##HOSTNAME##>
Time: <##TIME##>

Current Readings:
<##READINGS##>

SmokePing URL: <##URL##>

This is an automated message from SmokePing.
--
Network Operations Team

Set up authentication for web interface

Configure basic HTTP authentication to secure the SmokePing web interface.

sudo htpasswd -c /etc/smokeping/.htpasswd admin
sudo chown www-data:www-data /etc/smokeping/.htpasswd
sudo chmod 644 /etc/smokeping/.htpasswd

Add authentication requirements to the Apache configuration:

sudo tee -a /etc/apache2/sites-available/smokeping.conf << 'EOF'


    AuthType Basic
    AuthName "SmokePing Network Monitor"
    AuthUserFile /etc/smokeping/.htpasswd
    Require valid-user

EOF
sudo tee -a /etc/httpd/conf.d/smokeping.conf << 'EOF'


    AuthType Basic
    AuthName "SmokePing Network Monitor"
    AuthUserFile /etc/smokeping/.htpasswd
    Require valid-user

EOF

Enable and start SmokePing

Enable SmokePing to start automatically on boot and start the service.

sudo systemctl daemon-reload
sudo systemctl enable --now smokeping
sudo systemctl restart apache2 || sudo systemctl restart httpd

Configure advanced alerting and notifications

Set up custom alert conditions

Create advanced alert patterns for different types of network issues and performance degradation.

 Alerts 
to = network-ops@example.com
from = smokeping@example.com

+highlatency
type = rtt
pattern = >200,>200,>200
comment = High latency detected (>200ms for 3 consecutive measurements)
edgeTrigger = yes

+packetloss
type = loss
pattern = ==0%,==0%,==0%,==0%,>0%,>0%,>0%
comment = Packet loss detected after stable period
edgeTrigger = yes

+intermittentloss
type = loss
pattern = >5%,10,>5%,10,>5%
comment = Intermittent packet loss pattern detected

+jitter
type = rtt
pattern = <100,>300,<100,>300,<100,>300
comment = High jitter detected (RTT variance >200ms)

+sitecritical
type = loss
pattern = >50%,>50%,>50%
comment = Critical: Site mostly unreachable
edgeTrigger = yes

+dnsdelay
type = rtt
pattern = >5000,>5000,>5000
comment = DNS resolution taking longer than 5 seconds
edgeTrigger = yes

Configure notification escalation

Set up escalation rules to send alerts to different teams based on severity and duration.

#!/bin/bash

SmokePing Alert Escalation Script

ALERT_TYPE="$1" TARGET="$2" LOSS="$3" RTT="$4" HOSTNAME="$5"

Determine severity based on alert type

case "$ALERT_TYPE" in "sitecritical") SEVERITY="CRITICAL" RECIPIENTS="ops-team@example.com,management@example.com" ;; "packetloss"|"highlatency") SEVERITY="WARNING" RECIPIENTS="network-ops@example.com" ;; "jitter"|"intermittentloss") SEVERITY="INFO" RECIPIENTS="monitoring@example.com" ;; *) SEVERITY="UNKNOWN" RECIPIENTS="ops-team@example.com" ;; esac

Send notification with severity context

echo "SmokePing Alert [$SEVERITY]: $ALERT_TYPE for $TARGET" | \ mail -s "[$SEVERITY] SmokePing: $TARGET" "$RECIPIENTS"

Log alert for audit trail

echo "$(date): $SEVERITY alert for $TARGET - $ALERT_TYPE" >> /var/log/smokeping/alerts.log
sudo chmod +x /etc/smokeping/escalation
sudo chown smokeping:smokeping /etc/smokeping/escalation

Set up Slack webhook integration

Configure SmokePing to send alerts to Slack channels for real-time team notifications.

#!/bin/bash

SmokePing Slack Notification Script

SLACK_WEBHOOK="https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK" ALERT_TYPE="$1" TARGET="$2" LOSS="$3" RTT="$4" HOSTNAME="$5" TIME="$(date)"

Determine color and icon based on alert type

case "$ALERT_TYPE" in "sitecritical"|"packetloss") COLOR="danger" ICON=":rotating_light:" ;; "highlatency"|"jitter") COLOR="warning" ICON=":warning:" ;; *) COLOR="good" ICON=":information_source:" ;; esac

Create Slack message payload

PAYLOAD=$(cat <Send to Slack curl -X POST -H 'Content-type: application/json' \ --data "$PAYLOAD" \ "$SLACK_WEBHOOK"

Log notification

echo "$(date): Slack notification sent for $ALERT_TYPE on $TARGET" >> /var/log/smokeping/notifications.log
sudo chmod +x /etc/smokeping/slack-notify.sh
sudo chown smokeping:smokeping /etc/smokeping/slack-notify.sh

Configure log rotation

Set up log rotation to prevent SmokePing log files from consuming excessive disk space.

/var/log/smokeping/*.log {
    daily
    rotate 30
    compress
    delaycompress
    missingok
    notifempty
    create 644 smokeping smokeping
    postrotate
        /bin/systemctl reload smokeping > /dev/null 2>&1 || true
    endscript
}

Verify your setup

Check that SmokePing is running correctly and generating monitoring data.

sudo systemctl status smokeping
sudo systemctl status apache2 || sudo systemctl status httpd
sudo ls -la /var/lib/smokeping/data/
sudo tail -f /var/log/smokeping/smokeping.log

Test the web interface and verify data collection:

curl -I http://localhost/smokeping/
find /var/lib/smokeping/images -name "*.png" -mmin -10
smokeping --config=/etc/smokeping/config --check
Note: It may take 10-15 minutes for SmokePing to generate the first graphs. The service needs to collect several data points before creating visual representations.

Common issues

SymptomCauseFix
Web interface shows 500 errorCGI permissions or Apache configsudo chmod +x /usr/lib/cgi-bin/smokeping.cgi and check Apache error logs
No graphs generatedRRD permissions or data directorysudo chown -R smokeping:smokeping /var/lib/smokeping
Smokeping service fails to startConfiguration syntax errorsmokeping --config=/etc/smokeping/config --check
DNS probe not workingMissing dig binary or permissionssudo apt install dnsutils or sudo dnf install bind-utils
Curl probe timeoutsFirewall blocking outbound HTTPSCheck firewall rules and network connectivity
Alerts not sendingMail system not configuredInstall and configure postfix or sendmail

Next steps

Running this in production?

Need this handled for you? Setting up SmokePing once is straightforward. Keeping it patched, monitored, backed up and tuned across environments is the harder part. See how we run infrastructure like this for European SaaS and e-commerce teams.

Automated install script

Run this to automate the entire setup

Need help?

Don't want to manage this yourself?

We handle managed devops services for businesses that depend on uptime. From initial setup to ongoing operations.