Deluge's daemon/client architecture is its biggest strength in resource-constrained homelab environments — deluged runs headlessly on a Raspberry Pi or low-RAM NAS while deluge-web serves the browser interface from the same box. But that split architecture introduces a failure mode that single-process BitTorrent clients don't have: the Web UI can be fully reachable while the daemon it depends on is down, leaving users staring at "Not connected to daemon." Vigilmon lets you monitor the Web UI, the JSON-RPC API, and the daemon's TCP port independently so you know exactly which layer failed.
What You'll Set Up
- HTTP monitor for the Deluge Web UI (port 8112)
- JSON-RPC API health check via the session endpoint
- TCP probe for the Deluge daemon RPC port (port 58846)
- SSL certificate expiry alerts for reverse-proxied HTTPS deployments
- Heartbeat monitor for Deluge daemon stats and disk space health
Prerequisites
- Deluge installed with
delugedrunning on port 58846 anddeluge-webon port 8112 - Web UI accessible over HTTP or HTTPS
- A free Vigilmon account
Step 1: Monitor the Deluge Web UI
The Deluge Web UI is served by deluge-web, a Python HTTP server running on port 8112. A GET / returning HTTP 200 with the Ext.js application payload confirms that deluge-web is alive.
- Log in to vigilmon.online and click Add Monitor.
- Set Type to
HTTP / HTTPS. - Enter your Deluge Web UI URL:
http://your-server:8112/ - Set Check interval to
1 minute. - Set Expected HTTP status to
200. - Under Keyword check, enter
Delugeto confirm you're getting the Deluge web app, not a default nginx page. - Click Save.
This catches deluge-web crashing, the Python process running out of memory, or the port becoming unreachable due to a firewall rule change. It does not catch daemon failures — the Web UI will return 200 even when the daemon is down.
Step 2: Monitor the Deluge JSON-RPC API
Deluge Web uses a JSON-RPC over HTTP API at /json. The auth.check_session method accepts any session ID and returns false for an unauthenticated session — but a valid JSON-RPC response confirms the API endpoint is processing requests:
POST http://your-server:8112/json
Content-Type: application/json
{"method": "auth.check_session", "params": ["sessionid"], "id": 1}
Expected response:
{"result": false, "error": null, "id": 1}
A 500 response or a non-JSON body means deluge-web is broken at the API layer even if the / page is loading.
Add this monitor in Vigilmon:
- Click Add Monitor → HTTP / HTTPS.
- URL:
http://your-server:8112/json - Method:
POST - Request body:
{"method": "auth.check_session", "params": ["sessionid"], "id": 1} - Request header:
Content-Type: application/json - Expected status:
200. - Keyword check:
result— confirms the JSON-RPC response is well-formed. - Check interval:
2 minutes. - Click Save.
Step 3: Monitor the Deluge Daemon TCP Port
The Deluge daemon (deluged) listens on TCP port 58846 for RPC connections from deluge-web and desktop clients. If deluged crashes, the Web UI will appear fully functional but show "Not connected to daemon" and refuse to display or manage torrents.
Monitor this TCP port directly:
- Click Add Monitor → TCP Port.
- Host:
your-server - Port:
58846 - Check interval:
1 minute. - Click Save.
A TCP failure here is the authoritative signal that deluged is down — escalate this alert to your highest-priority channel since no torrent activity is possible until the daemon restarts.
On systemd-based Linux, verify the daemon service is configured to restart automatically:
sudo systemctl status deluged
# If not enabled:
sudo systemctl enable deluged
Add the restart policy to /etc/systemd/system/deluged.service if missing:
[Service]
Restart=on-failure
RestartSec=10s
Step 4: SSL Certificate Alerts for HTTPS Deluge Deployments
Deluge Web does not support HTTPS natively — you run it behind nginx or Caddy for SSL termination. Monitor the certificate on your proxy domain:
- Open the HTTPS monitor pointing to
https://deluge.yourdomain.com/. - Enable Monitor SSL certificate.
- Set Alert when certificate expires in less than
21 days. - Click Save.
A sample nginx configuration for Deluge:
server {
listen 443 ssl;
server_name deluge.yourdomain.com;
ssl_certificate /etc/letsencrypt/live/deluge.yourdomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/deluge.yourdomain.com/privkey.pem;
location / {
proxy_pass http://localhost:8112;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
Step 5: Heartbeat Monitoring for Daemon Stats and Disk Space
The core.get_stats JSON-RPC method returns real-time download speed, upload speed, free disk space, and cumulative payload statistics from the daemon. A scheduled heartbeat that calls this method and checks for free space catches disk-full conditions before Deluge auto-pauses all downloads.
- In Vigilmon, click Add Monitor → Cron Heartbeat.
- Set Expected ping interval to
15 minutes. - Copy the heartbeat URL (e.g.
https://vigilmon.online/heartbeat/abc123). - Add a cron job on your Deluge server:
crontab -e
*/15 * * * * COOKIE=$(curl -s -c /tmp/deluge_cookies.txt -b /tmp/deluge_cookies.txt \
-X POST http://localhost:8112/json \
-H "Content-Type: application/json" \
-d '{"method":"auth.login","params":["your-web-password"],"id":1}' | \
grep -o '"result": *true') && \
[ -n "$COOKIE" ] && \
FREE=$(curl -s -b /tmp/deluge_cookies.txt \
-X POST http://localhost:8112/json \
-H "Content-Type: application/json" \
-d '{"method":"core.get_stats","params":[],"id":2}' | \
python3 -c "import sys,json; d=json.load(sys.stdin); print(d['result']['free_space'])") && \
[ "$FREE" -gt 1073741824 ] && \
curl -s https://vigilmon.online/heartbeat/abc123
This script:
- Authenticates to
deluge-web - Calls
core.get_statsto get daemon statistics includingfree_space - Checks that free disk space exceeds 1 GB (adjust to your threshold)
- Only pings the Vigilmon heartbeat if both the daemon is reachable AND disk space is sufficient
If the daemon is down, the authentication fails and the heartbeat is skipped. If disk space drops below 1 GB, Deluge will soon auto-pause downloads and the heartbeat stops — Vigilmon alerts after the interval passes.
Step 6: Configure Alert Channels
- Go to Alert Channels in Vigilmon and add email, Slack, or a webhook.
- Set Consecutive failures before alert to
2on the Web UI HTTP monitor. - Set Consecutive failures to
1on the TCP port monitor — a daemon failure breaks all torrent activity immediately and needs immediate attention.
Summary
| Monitor | URL / Check | What It Catches |
|---|---|---|
| Web UI | http://your-server:8112/ | deluge-web crash, port unreachable |
| JSON-RPC API | POST /json (auth.check_session) | API layer broken, Python errors |
| Daemon TCP | TCP :58846 | deluged crash, "Not connected to daemon" |
| SSL certificate | Your reverse-proxy domain | Let's Encrypt renewal failure |
| Cron heartbeat | core.get_stats method | Daemon unreachable, disk full condition |
The layered architecture of deluged + deluge-web means you can have a green HTTP check while torrents are completely stalled. With Vigilmon monitoring all three layers — Web UI, JSON-RPC API, and the daemon TCP port — plus a disk space heartbeat, you have the full observability picture that catches every failure mode before your download queue piles up.