dns-monitor: a single-binary DNS uptime and drift monitor in Go

dns-monitor is a lightweight DNS uptime and drift monitor. It periodically resolves a set of configured DNS records, compares the answers against an expected set, persists every probe to SQLite, and serves an HTMX dashboard. Single Go binary, no external database.

Dashboard Dashboard — current status per target plus a tail of recent checks.

Features

  • YAML-driven targets — declare DNS records to watch (A, AAAA, CNAME, MX, TXT, …) with per-target expected answers.
  • Drift detection — each check is compared against the expected value set; mismatches are flagged in the history.
  • SQLite history — every probe result is persisted via modernc.org/sqlite (pure Go — no CGO, no external DB).
  • HTMX dashboard — server-rendered status page, no JS build step.
  • Single binary, single file — one Go binary plus one SQLite file; trivial to run locally or in a container.
  • Multi-arch container imagelinux/amd64 and linux/arm64 published to GHCR on every push to main.

Target detail Target detail — latest answer, uptime / latency stats, and per-target history.

Architecture

A single process with two cooperating loops backed by SQLite:

  1. Scheduler — on each tick of the configured interval, resolves every target concurrently using the Go resolver, compares the answer set against the target’s expect list, and writes a row to the checks table.
  2. HTTP server — serves an HTMX-rendered dashboard that reads the latest check per target plus recent history, so the UI stays a thin view over the database.

There is no queue, no worker pool, no external state — the database is the source of truth and the process is stateless beyond it.

Tech Stack

  • Language: Go 1.25
  • Database: SQLite (modernc.org/sqlite, pure Go)
  • Config: YAML
  • UI: html/template + HTMX
  • Docs: Astro Starlight, deployed to GitHub Pages
  • Packaging: Docker (distroless runtime), GitHub Actions → GHCR
×