Blocky is a high-performance, privacy-first DNS proxy written in Go. It blocks ads and trackers at the DNS level, forwards queries to upstream resolvers over DoT or DoH, and serves your entire network from a single binary. Because every device on your network depends on it for name resolution, a silent Blocky failure means broken internet for everyone — and you won't know until someone complains. Vigilmon gives you proactive uptime monitoring, latency tracking, and alerting so you catch problems before your users do.
What You'll Set Up
- DNS service process availability check via the HTTP API
- Upstream resolver connectivity monitoring (DoT/DoH uplinks)
- Blocklist download and refresh job health via heartbeat monitors
- HTTP API endpoint response time tracking
- DNS-over-HTTPS endpoint availability
- Prometheus metrics endpoint health check
- Redis cache connectivity (if configured)
Prerequisites
- Blocky running on a Linux server (port 53 DNS, port 4000 HTTP API, port 4001 HTTPS)
- The Blocky HTTP API enabled in your
config.yml - A free Vigilmon account
Step 1: Monitor the Blocky HTTP API (Core Health Check)
Blocky exposes a REST API on port 4000 that serves as the primary health signal. The /api/blocking/status endpoint returns the current blocking state and is a reliable liveness probe.
- Log in to vigilmon.online and click Add Monitor.
- Set Type to
HTTP / HTTPS. - Enter the URL:
http://YOUR_SERVER_IP:4000/api/blocking/status - Set Check interval to
1 minute. - Set Expected HTTP status to
200. - Click Save.
A non-200 response means Blocky's API is down or unreachable. Pair this with an alert so you're paged immediately.
Step 2: Monitor the DNS-over-HTTPS Endpoint
If you expose Blocky's DoH endpoint externally (port 4001 HTTPS or via a reverse proxy), add a dedicated monitor:
- Click Add Monitor → HTTP / HTTPS.
- URL:
https://dns.yourdomain.com/dns-query?name=example.com&type=A - Expected HTTP status:
200 - Check interval:
2 minutes - Keyword match (optional):
answer— confirms the response body contains DNS answer data. - Click Save.
This catches TLS certificate problems, reverse-proxy misconfigurations, and Blocky crashes that only affect the HTTPS listener.
Step 3: Monitor the Prometheus Metrics Endpoint
Blocky exposes Prometheus metrics at /metrics (port 4000 by default). Even if you don't scrape them with Prometheus, the endpoint being reachable confirms the HTTP server is fully functional:
- Add Monitor → HTTP / HTTPS.
- URL:
http://YOUR_SERVER_IP:4000/metrics - Expected HTTP status:
200 - Check interval:
5 minutes - Keyword match:
blocky_— any Blocky metric name confirms the scrape is real. - Save.
Step 4: Heartbeat Monitor for Blocklist Refresh Jobs
Blocky downloads blocklists on startup and refreshes them on a schedule. A failed refresh leaves stale lists in memory — new malware domains slip through. Use a Vigilmon heartbeat monitor to track refresh job execution.
Create the heartbeat
- Click Add Monitor → Heartbeat.
- Name:
Blocky blocklist refresh - Grace period:
25 hours(to allow daily refresh cycles with margin). - Copy the unique heartbeat URL shown after saving.
Ping the heartbeat from a cron job
Blocky doesn't ping URLs natively, so wrap the refresh in a cron job that calls the Blocky refresh API and then pings Vigilmon:
# /etc/cron.d/blocky-refresh — runs daily at 03:00
0 3 * * * root curl -s -X POST http://localhost:4000/api/lists/refresh && \
curl -s https://vigilmon.online/api/heartbeat/YOUR_HEARTBEAT_TOKEN
Replace YOUR_HEARTBEAT_TOKEN with the token from your heartbeat monitor. If the refresh API call fails, the && operator prevents the heartbeat ping — Vigilmon will alert you when the grace period expires.
Step 5: Monitor Upstream Resolver Connectivity
Blocky forwards queries to upstream resolvers (Cloudflare, Quad9, your ISP, etc.) over DoT or DoH. If all upstreams are unreachable, Blocky returns SERVFAIL for every query. Use Vigilmon to probe the upstreams Blocky depends on:
DoT upstream (port 853)
- Add Monitor → TCP Port.
- Host:
1.1.1.1(or your configured upstream) - Port:
853 - Check interval:
5 minutes - Save.
DoH upstream (HTTPS)
- Add Monitor → HTTP / HTTPS.
- URL:
https://cloudflare-dns.com/dns-query?name=example.com&type=A - Expected HTTP status:
200 - Check interval:
5 minutes - Save.
Add one monitor per critical upstream. If any go red, you know whether a Blocky failure is upstream-induced or local.
Step 6: Monitor Redis Cache Connectivity (If Configured)
Blocky can use Redis as a shared query cache across multiple instances. If Redis is misconfigured or down, cache misses spike and query latency increases. Monitor Redis with a TCP port check:
- Add Monitor → TCP Port.
- Host:
localhost(or your Redis host) - Port:
6379 - Check interval:
2 minutes - Save.
Name it Redis (Blocky cache) so alerts are immediately identifiable.
Step 7: Configure Alerting
- In Vigilmon, go to Settings → Notifications.
- Add your preferred channel: email, Slack, PagerDuty, or webhook.
- For the core API monitor (Step 1), set alert after
1 failed check— DNS failures are user-visible immediately. - For blocklist refresh and upstream monitors, set alert after
2 failed checksto reduce noise from transient hiccups. - Enable recovery notifications so you know when Blocky comes back online without having to check manually.
Step 8: Build a Status Dashboard
Group all Blocky monitors into a single status page:
- Go to Status Pages → New Status Page.
- Name:
DNS Infrastructure - Add all monitors from this tutorial.
- Toggle Public if you want your team to check status without logging in.
- Save and copy the URL.
Bookmark the status page on your router or network management workstation so you can check DNS health at a glance.
Key Metrics to Watch
| Signal | Monitor Type | Alert Threshold |
|---|---|---|
| HTTP API /api/blocking/status | HTTP | Any non-200 |
| DoH endpoint /dns-query | HTTP | Any non-200 |
| Prometheus /metrics | HTTP | Any non-200 |
| Blocklist refresh job | Heartbeat | Grace period exceeded |
| Upstream DoT (port 853) | TCP | Connection refused |
| Upstream DoH (HTTPS) | HTTP | Any non-200 |
| Redis cache (port 6379) | TCP | Connection refused |
Conclusion
Blocky is a single point of failure for your entire network's DNS resolution. With Vigilmon you get API-level health checks, upstream resolver probes, blocklist refresh job tracking, and DoH endpoint availability monitoring — all in a few minutes of setup. When something breaks, you'll be alerted before the first user complaint arrives.
Sign up for Vigilmon — free tier includes all the monitors in this tutorial.