Back to projects
DW

dns-watchdog

Tool

DNS record monitoring tool with Slack notifications

About

dns-watchdog monitors your DNS records and sends Slack notifications when mismatches are detected. It queries DNS-over-HTTPS (Google Public DNS) so there's no dependency on local resolvers or OS configuration.

Available as a single binary CLI tool and a GitHub Action, making it easy to run on-demand or on a schedule in CI. Perfect for individuals and small teams who want to verify DNS configurations without relying on external monitoring services.

Features

  • A / MX / TXT / NS / CNAME record monitoring
  • Exact match and substring match modes
  • Slack webhook notifications on mismatch
  • DNS-over-HTTPS via Google Public DNS
  • Single binary, zero runtime dependencies
  • CLI + GitHub Action ready
  • Cross-platform: Linux, macOS, Windows (amd64/arm64)

Installation

go install github.com/daigotanaka0714/dns-watchdog@latest

Quick Start

Create a config.yml:

domain: example.com
checks:
  - type: A
    name: "@"
    expected:
      - "93.184.216.34"
  - type: TXT
    name: "@"
    contains: "v=spf1"
notify:
  slack_webhook_env: "SLACK_WEBHOOK_URL"
  template: "default"

Run the check:

SLACK_WEBHOOK_URL=https://hooks.slack.com/... dns-watchdog

Or use it as a GitHub Action with a cron schedule:

name: DNS Watchdog
on:
  schedule:
    - cron: "0 */6 * * *"
  workflow_dispatch:

jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: daigotanaka0714/dns-watchdog@v1
        env:
          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
          DNS_WATCHDOG_CONFIG: ./config.yml

Tech Stack

Go

Go

Primary language

DoH

DNS-over-HTTPS

dns.google

S

Slack

Webhook notifications

Package Info

License MIT
Type Tool
Distribution GoReleaser