Schedule icon
Commands icon
Docker icon
Get icon
If icon
SlackIncomingWebhook icon
Set icon

Detect DNS Record Changes and Alert Slack

Watch a DNS record on a schedule and alert Slack the moment its answer changes.

Categories
CloudInfrastructure

DNS drift is invisible until it is an outage - or worse, a hijack. This blueprint resolves your record every 30 minutes, compares the answer against a KV baseline, and alerts Slack on any change. First run just seeds the baseline.

How it works

  1. resolve_now (io.kestra.plugin.scripts.shell.Commands on Alpine with bind-tools) digs the record, sorts answers, and emits the joined value via the ::{"outputs": ...}:: protocol.
  2. load_previous (io.kestra.plugin.core.kv.Get) reads the stored baseline, tolerant of a missing key.
  3. changed (io.kestra.plugin.core.flow.If) branches: changed -> alert_change + save_new_value; otherwise (or first run) seed_or_log keeps the baseline current.
  4. The errors block alerts when resolution itself fails.

What you get

  • Same-hour detection of DNS changes.
  • A persistent KV baseline you can query from other flows.
  • Failure alerts so a broken resolver never reads as "no change".

Who it's for

  • Teams tracking their own DNS for accidental edits.
  • Security engineers watching for hijacking or takeover.
  • Anyone burned by a TTL surprise.

Why orchestrate this with Kestra

dig returns an answer; the flow adds state (KV), a diff, an alert, and history - and the next step (auto-rollback, open a ticket, verify against expected IP) is one task away.

Prerequisites

  • Docker available on the Kestra Worker.
  • A Slack webhook.

Secrets

  • SLACK_WEBHOOK_URL: webhook for change and failure alerts.

Quick start

  1. Add the Slack webhook secret.
  2. Set record and record_type.
  3. Run twice: first seeds the baseline, second confirms no change.
  4. Change the record and watch the alert.

How to extend

  • Compare against an expected IP instead of the previous value.
  • Track multiple records with a ForEach.
  • Fail the execution on change for pipeline gating.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.