A small self-contained monitoring dashboard: it fetches all A records of a DNS zone via zone transfer (AXFR), pings every host on a schedule and shows the current status in a web dashboard — plus a JSON API with CSV export.
- Dashboard (single page, dark theme, zero external dependencies — no CDN, works in offline networks): KPI tiles (total / online / unreachable / never online / new today), three tabs, live search, sortable columns (IPs sort numerically), status pills, pagination, auto-refresh every 60 s
- Status-change log: only real transitions (online ↔ unreachable) are persisted — the database stays tiny (a few hundred KB) no matter how long the app runs
- JSON API with
?format=csvon every list endpoint (UTF-8 BOM, opens cleanly in Excel), interactive docs via Swagger at/docs - Health endpoint including disk usage
| Endpoint | Description |
|---|---|
GET /api/results |
Current ping status per host/IP pair |
GET /api/hosts/today |
Hostnames first seen today |
GET /api/hosts/never_online |
Hosts that never had a single successful ping |
GET /api/changes?limit=200 |
Latest status transitions, newest first |
DELETE /api/hosts/never_online |
Remove those hosts (they reappear on the next round while still in DNS) |
GET /health |
Status + disk usage |
python main.py starts two processes: a uvicorn web server and a scheduler
loop. Each round the scheduler transfers the zone, pings all hosts
concurrently (bounded by a semaphore) and records the round in a single SQLite
transaction:
hostnames— every hostname ever seen, withcreated_atcurrent_status— exactly one row per host/IP pair (status, last checked, last online)status_changes— append-only log of real transitions only
SQLite runs in WAL mode so both processes can work concurrently. The code
avoids INSERT … ON CONFLICT DO UPDATE on purpose — it works on SQLite 3.22+
(e.g. Ubuntu 18.04).
Requires Python 3.9+ and a DNS server that allows zone transfers (AXFR) for
the machine running the app — see Windows DNS server config.md for a
Windows DNS example.
python3 -m venv venv
./venv/bin/pip install -r requirements.txt
# edit app.config in main.py: dns_server, dns_zone, server_ip
./venv/bin/python main.pyThen open http://<server_ip>:8000.
More screenshots (hostnames redacted): new hosts · never online
GPLv2 — see LICENSE.
