Latency Monitoring
    RRD Graphs

    Deploy SmokePing on a VPS

    Run SmokePing latency and packet loss monitoring on a RamNode VPS — FPing, DNS and TCP probes, RRD graphs, nginx with FastCGI, alerts, and TLS.

    SmokePing does periodic latency/loss measurement (ping, or other probes) and renders RRD-backed graphs. Target: Ubuntu 24.04 LTS VPS, 1 vCPU / 1GB RAM is fine for dozens of targets at moderate polling intervals.

    1. Base packages

    shell
    apt update && apt -y upgrade
    apt -y install smokeping nginx fcgiwrap speedy-cgi-perl librrds-perl

    The Ubuntu package installs to /etc/smokeping/, RRDs to /var/lib/smokeping/, and sets up an smokeping system user automatically. It also ships with /usr/sbin/smokeping as a daemon and a default systemd unit.

    2. General config

    /etc/smokeping/config.d/General:

    shell
    *** General ***
    
    owner    = RamNode NOC
    contact  = noc@ramnode.com
    mailhost = localhost
    sendmail = /usr/sbin/sendmail
    imgcache = /var/lib/smokeping/cache
    imgurl   = ../smokeping-cgi/cache
    datadir  = /var/lib/smokeping/data
    piddir   = /var/run/smokeping
    smokemail = /etc/smokeping/smokemail.dist
    cgiurl   = http://smokeping.example.com/smokeping-cgi/smokeping.cgi
    
    # CDF percentile slope
    slaves = 

    3. Presentation (thresholds, graph look)

    /etc/smokeping/config.d/Presentation:

    shell
    *** Presentation ***
    
    template = /etc/smokeping/basepage.html
    charset  = utf-8
    
    + charts
    menu = Charts
    title = The most interesting graphs
    
    ++ loss
    sorter = Loss(dsc)
    menu = Top Loss
    title = Top Loss
    
    ++ ping
    sorter = Median(dsc)
    menu = Top Ping
    title = Top Ping
    
    + overview
    width = 600
    height = 50
    range = 10h
    
    ++ mymenu
    menu = Round Trip Times
    title = Round Trip Time Statistics
    
    + detail
    width = 800
    height = 200
    unison_tolerance = 2
    
    "Last 3 Hours"    3h
    "Last 30 Hours"   30h
    "Last 10 Days"    10d
    "Last 400 Days"   400d

    4. Probes

    /etc/smokeping/config.d/Probes:

    shell
    *** Probes ***
    
    + FPing
    binary = /usr/bin/fping
    step  = 300
    offset = 50%
    pings = 20
    
    + DNS
    binary = /usr/bin/dig
    pings  = 5
    step   = 300
    
    + TCPPing
    binary = /usr/bin/tcpping
    pings  = 5
    step   = 300

    Install fping if not already present:

    shell
    apt -y install fping

    5. Targets

    /etc/smokeping/config.d/Targets:

    shell
    *** Targets ***
    
    probe = FPing
    
    menu = Top
    title = Network Latency Overview
    remark = RamNode monitored targets
    
    + Datacenters
    
    menu = Datacenters
    title = Datacenter Uplinks
    
    ++ dc_atl
    menu = Atlanta uplink
    title = Atlanta DC Uplink
    host = gw-atl.ramnode.internal
    
    ++ dc_ny
    menu = New York uplink
    title = New York DC Uplink
    host = gw-ny.ramnode.internal
    
    + Customers
    
    menu = Customer Nodes
    title = Customer-facing Nodes
    
    ++ kvm01
    menu = kvm01
    title = KVM Hypervisor 01
    host = kvm01.ramnode.com
    
    ++ nlxsvz71
    menu = nlxsvz71
    title = OpenVZ dest node
    host = nlxsvz71.ramnode.com

    Add as many ++ target stanzas as you have hosts. Nested + Group sections build the menu tree.

    6. Validate config

    shell
    smokeping --check --config=/etc/smokeping/config

    7. Start the daemon

    shell
    systemctl enable --now smokeping
    systemctl status smokeping

    RRDs start populating in /var/lib/smokeping/data/ — give it a couple of polling cycles (5 min default step) before graphs show real data.

    8. Web frontend (CGI via nginx + fcgiwrap)

    The Debian/Ubuntu smokeping package installs the CGI to /usr/lib/smokeping/cgi-bin/smokeping.cgi (path may vary — confirm with dpkg -L smokeping | grep cgi).

    Enable fcgiwrap:

    shell
    systemctl enable --now fcgiwrap

    /etc/nginx/sites-available/smokeping:

    shell
    server {
        listen 80;
        server_name smokeping.example.com;
    
        location /smokeping-cgi/ {
            alias /usr/lib/smokeping/;  # confirm actual path with dpkg -L smokeping
            gzip off;
    
            location ~ \.cgi$ {
                include fastcgi_params;
                fastcgi_pass unix:/run/fcgiwrap.socket;
                fastcgi_param SCRIPT_FILENAME $request_filename;
            }
        }
    
        location / {
            return 302 /smokeping-cgi/smokeping.cgi;
        }
    }
    shell
    ln -s /etc/nginx/sites-available/smokeping /etc/nginx/sites-enabled/
    nginx -t && systemctl reload nginx
    certbot --nginx -d smokeping.example.com

    Add basic auth if this shouldn't be public:

    shell
    apt -y install apache2-utils
    htpasswd -c /etc/nginx/.smokeping-htpasswd noc
    shell
    location /smokeping-cgi/ {
        auth_basic "SmokePing";
        auth_basic_user_file /etc/nginx/.smokeping-htpasswd;
        ...
    }

    9. Alerting (optional)

    /etc/smokeping/config.d/Alerts:

    shell
    *** Alerts ***
    to = noc@ramnode.com
    from = smokeping@ramnode.com
    
    + loss20
    type = loss
    pattern = >0%,*12*
    comment = loss on at least 1 of the last 12 probes
    
    + dupPL
    type = loss
    pattern = ==0%,==0%,>0%,>0%,>0%,>0%,>0%
    comment = loss pattern following a change

    Attach an alerts = loss20 line under any target's Targets stanza to apply.

    10. Firewall

    shell
    ufw allow 80/tcp
    ufw allow 443/tcp
    ufw enable

    11. Cross-check against Nagios

    You already have Nagios 4 with check_public_activity and check_cpu.py ported. SmokePing is complementary — it shows latency/loss trends, Nagios gives pass/fail thresholds. Consider a Nagios passive check that reads the SmokePing RRD via rrdtool fetch if you want threshold alerts driven off the same latency data instead of duplicating fping checks in NRPE.

    Post-install checklist

    • Confirm fping runs setuid or has CAP_NET_RAW (Ubuntu package usually handles this via dpkg-statoverride; check with getcap /usr/bin/fping)
    • Lock down /smokeping-cgi/ with basic auth or IP allowlist
    • Tune step/pings per probe if you want tighter granularity on critical uplinks
    • Set up RRD backups (/var/lib/smokeping/data/) — losing these loses historical trend data