A one-command internet disconnect monitor. It runs SmokePing in Docker and graphs your connection to Google, Cloudflare, and Quad9 (plus your LAN gateway, if detectable) every 60 seconds.
The graphs tell you when your internet dropped and how long it was out — the "smoke" bands show latency jitter and packet loss, and flat gaps mark full outages. The dashboard is bound to localhost only, so it's private by default.
Works on Linux and macOS. The only requirement is Docker.
curl -fsSL https://gist.githubusercontent.com/mehdi89/70ef0664429eec2dd46fa02e4a906c05/raw/smokeping-connectivity.sh | bashIt prints one thing when done:
Open: http://127.0.0.1:8559/
Open that URL in your browser. Re-running the command is safe — it just updates the setup.
First data points appear in ~10–20 minutes. The value grows over hours and days, as you build a history of your connection's behavior.
| Target | Why |
|---|---|
8.8.8.8 (Google), 1.1.1.1 (Cloudflare), 9.9.9.9 (Quad9) |
Internet reachability (WAN). If all go red at once, your uplink/ISP is down. |
| LAN gateway (auto-detected) | Your router. If this goes red too, the problem is local (cable/router). If only the internet anchors fail, it's your ISP. |
- Colored "smoke" band — latency variance (jitter). Normal.
- Red on the line — packet loss.
- Flat gap / 100% loss across all internet targets — you were offline. The x-axis tells you exactly when and for how long.
- Gap on every graph — the monitor itself was off (machine asleep/rebooted).
Set these as environment variables before the command:
# change the dashboard port
curl -fsSL <RAW_URL> | SMOKEPING_PORT=9000 bash
# expose on your LAN instead of localhost-only (no auth — use with care)
curl -fsSL <RAW_URL> | SMOKEPING_BIND=0.0.0.0 bash| Variable | Default | Meaning |
|---|---|---|
SMOKEPING_PORT |
8559 |
Local port for the dashboard |
SMOKEPING_BIND |
127.0.0.1 |
Bind address; 0.0.0.0 exposes it on your network |
By default there are no alerts — most people just want to watch the dashboard. If you want to be notified when the internet goes down (and when it recovers), opt in by providing a Telegram bot or any webhook. A tiny sidecar container then checks the internet every 60s and notifies on transitions.
Telegram:
curl -fsSL <RAW_URL> | ALERT_TELEGRAM_TOKEN=123456:abc ALERT_TELEGRAM_CHAT=987654 bashGeneric webhook (Slack, Discord, n8n, your own endpoint — receives a POST with text=...):
curl -fsSL <RAW_URL> | ALERT_WEBHOOK_URL=https://hooks.example/your/path bash| Variable | Purpose |
|---|---|
ALERT_TELEGRAM_TOKEN + ALERT_TELEGRAM_CHAT |
Send alerts via a Telegram bot |
ALERT_WEBHOOK_URL |
Send alerts as a POST to any URL |
Alerts are edge-triggered (one message on DOWN, one on RECOVERED) with a short debounce, so brief blips won't spam you.
curl -fsSL https://gist.githubusercontent.com/mehdi89/70ef0664429eec2dd46fa02e4a906c05/raw/smokeping-connectivity.sh | bash -s -- --uninstallRemoves the containers but keeps your data (graphs) at ~/.smokeping-connectivity. To wipe everything:
rm -rf ~/.smokeping-connectivity- Uses the maintained
lscr.io/linuxserver/smokepingimage — identical behavior on Linux and macOS, no per-OS package juggling. - Config (
Targets,Database) is pre-seeded before first start, so you get a clean monitor (60s interval, just your anchors) with no demo clutter. - Config and RRD data live in
~/.smokeping-connectivity/. The container restarts automatically with Docker. - Optional alerting runs as a separate
curlimages/curlsidecar that checks internet anchors independently — so it still fires even if SmokePing itself has a problem.
- Docker (install). On macOS, Docker Desktop must be running.
- That's it. SmokePing, fping, RRDtool, and the web server all come inside the image.
Why Docker and not a native install? SmokePing isn't in Homebrew, so there's no clean native macOS path. Docker is the one route that behaves the same on Linux and macOS. (Windows works too under Docker Desktop, though it's not officially covered here yet.)