dnsmonitor

command module
v0.0.0-...-ea59013 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2023 License: MIT Imports: 17 Imported by: 0

README

DNSMonitor - A simple DNS monitor written in go

Go Report Card

DNSMonitor is a small commandline utility which queries a DNS server for a specific hostname(s) records on a regular interval, optionally alerting you (Gotify) on any DNS change.

Features

  • Defaults to the network-configured DNS, however a separate DNS server can be specified
  • Polling interval (default every 5 minutes)
  • Supports querying of A, MX, CNAME, TXT & NS records (see usage)
  • Optionally send update alerts to Gotify

Usage examples

dnsmonitor www.example.com

Monitor the A records of www.example.com on a 5-minute interval.

dnsmonitor mx:example.com

Monitor the MX records of example.com on a 5-minute interval.

dnsmonitor ns:example.com txt:example.com www.example.com

Monitor the NS & TXT records of example.com, and the A records of www.example.com on a 5-minute interval.

dnsmonitor -d 1.1.1.1 example.com -i 10

Monitor the A records of example.com on a 10-minute interval using the DNS server on 1.1.1.1.

See dnsmonitor -h for all options.

Notifications

Currently sending notifications to Gotify is supported.

Create a default configuration file in ~/.config/dnsmonitor.json or use the -c flag to spefify an alternative configuration file and set the values:

Gotify

Create a new App on your gotify instance which will generate a unique token.

{
  "gotify_server":"<https://your-gotify-server/>",
  "gotify_token":"<token>"
}

Installing

Multiple OS/Architecture binaries are supplied with releases. Extract the binary, make it executable, and move it to a location such as /usr/local/bin.

Updating

DNSMonitor comes with a built-in self-updater:

dnsmonitor -u

Instaling from source

Go >= 1.11 required:

go get github.com/axllent/dnsmonitor

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL