Skip to content

Notification and delivery

7 min readRecon Atlas

An alert you ignore trains you to ignore the next one. Send few messages, each one actionable from its first line. Critical and high go out immediately; everything else waits for a digest. Do the filtering in the pipeline, keep notify’s config for routing only, and set a budget for how many alerts a week you will tolerate before you tune.


The monitoring guide covers installing notify and writing ~/.config/notify/provider-config.yaml. This part assumes it works and adds structure: separate channels for urgency levels, and templates.

All delivery is Passive with respect to the target: messages go to your own chat providers, never to the program.

# ~/.config/notify/provider-config.yaml: one id per urgency, so routing is a flag, not a filter
discord:
- id: "triage"
discord_channel: "triage-now"
discord_username: "auto-triage"
discord_format: "{{data}}"
discord_webhook_url: "https://discord.com/api/webhooks/XXXX/YYYY"
- id: "digest"
discord_channel: "triage-digest"
discord_username: "auto-triage"
discord_format: "{{data}}"
discord_webhook_url: "https://discord.com/api/webhooks/AAAA/BBBB"
telegram:
- id: "triage-tg"
telegram_api_key: "123456:ABCDEF"
telegram_chat_id: "123456789"
telegram_format: "{{data}}"
telegram_parsemode: "None" # None, Markdown, MarkdownV2 or HTML; None avoids escaping surprises
telegram_preview: false # no link previews: a preview fetches the URL from the chat provider
slack:
- id: "triage-slack"
slack_channel: "triage"
slack_username: "auto-triage"
slack_format: "{{data}}"
slack_webhook_url: "https://hooks.slack.com/services/XXXX"
Terminal window
# Send a test line to each id
for id in triage digest; do echo "test from $(hostname) to $id" | notify -id "$id" -silent; done

Two settings deserve a reason. telegram_preview: false matters because a link preview makes the chat provider’s servers fetch the URL you posted, which is traffic to the target from an address you do not control. Keep previews off on any channel that carries target URLs; check the equivalent setting for Discord and Slack in their webhook docs. telegram_parsemode: "None" avoids a message failing because a URL contains a character Markdown treats as markup.

A finding message has a fixed shape. The worked pipeline uses this one:

# Immediate alert: two lines, same order every time
[CRITICAL] example | exposed-env | https://dev.example.com/.env
verified: rematched | evidence: evidence/2d7bbe2f093b189d | run: 2026-11-13T021704Z
# Daily digest: a header, counts by severity, then one line per finding
Digest example 2026-11-14: 3 findings
medium: 3
medium jenkins-panel http://jenkins.example.com:8080/login
medium grafana-detect https://grafana.example.com/login
medium swagger-api https://dev.example.com/swagger-ui/

Each message carries the program, the severity, what matched, where, whether the verification re-run matched, and a path to the evidence folder. It never carries the leaked secret or a response body. Chat providers store messages indefinitely, and a webhook can leak.

At 3 AM you read the lock-screen preview, which shows roughly one line. That line must answer: do I get up?

Field Example Why it is in line one
Severity, in capitals [CRITICAL] Decides urgency at a glance
Program example You run several; a critical on a VDP is less urgent than on a paid program
What exposed-env Tells you the class without opening anything
Where https://dev.example.com/.env You recognise a host you care about, or a host you know is noisy

Line two (verified, evidence path, run) is for when you are at the keyboard. If line one cannot fit, shorten the URL to host plus path, never drop the severity or the program.

[CRITICAL] example | exposed-env | https://dev.example.com/.env
verified: rematched | evidence: evidence/2d7bbe2f093b189d | run: 2026-11-13T021704Z

This record asserts the exposed-env template matched https://dev.example.com/.env, the verification re-run matched again, and stage 8 sent those two lines to the triage id.

This record does not assert that a secret inside the file still works. The message has no body on purpose. Open evidence/2d7bbe2f093b189d/response.txt on your machine before you write a report.

medium jenkins-panel http://jenkins.example.com:8080/login

This record asserts a medium finding for template jenkins-panel at that URL was appended to digest/queue.tsv. It waits there until digest mode runs.

This record does not assert that default credentials work, or that the panel is in scope beyond the host string that reached the queue. In the morning, test it, suppress it with a reason, or leave it parked.

STALE 28h: /home/hunter/pipeline/programs/example/state/heartbeat

The health check prints this when the file’s age is greater than 26 hours, then sends it to notify id health.

This record asserts that file’s mtime is 28 hours old, so the finish block did not rewrite it on the last expected night. It does not assert the VPS is down. You received the line, so the box was up enough to run the check. Read current/run.log for the FATAL or the missing run.

The pipeline appends medium findings to digest/queue.tsv. Running it in digest mode sends one message and moves the queue to digest/sent-<stamp>.tsv, so a digest is never sent twice.

Terminal window
# Send the daily digest for one program (schedule this once a day, after the night run)
PROGRAM=example ~/pipeline/bin/auto-triage.sh digest

The aggregation inside digest mode is a small awk count:

Terminal window
# Count queued findings by severity, the digest's second section
awk -F'\t' '{c[$1]++} END {for (s in c) printf " %s: %d\n", s, c[s]}' digest/queue.tsv

A weekly summary reads the run logs and the sent digests, so it also tells you about the pipeline’s health, not only findings:

Terminal window
# Weekly summary for one program: runs, failures, new hosts, findings by severity, for the last 7 days
P=~/pipeline/programs/example; since=$(date -u -d '7 days ago' +%F)
{
echo "Weekly $(basename "$P") since $since"
echo " runs: $(find "$P/runs" -mindepth 1 -maxdepth 1 -newermt "$since" | wc -l)"
echo " warnings: $(find "$P/runs" -name run.log -newermt "$since" -exec grep -h 'WARN\|FATAL' {} + | wc -l)"
echo " new hosts: $(find "$P/runs" -name new-hosts.txt -newermt "$since" -exec cat {} + | sort -u | wc -l)"
find "$P/runs" -name triage.tsv -newermt "$since" -exec cat {} + | cut -f1 | sort | uniq -c | awk '{print " " $2 ": " $1}'
} | notify -id digest -bulk -silent

Chat apps are easy to mute, and a muted chat is how a critical sits unread until lunch. For the few findings that justify waking you, use a push service whose whole job is an alert you notice.

ntfy publishes a message with a single HTTP request to a topic. Anyone who knows a topic name on the public server can read it. Use a long random topic name, protect the topic with an access token, or self-host ntfy. Priority urgent (5) gives the strongest alert on the phone app.

Terminal window
# Escalate one critical through ntfy: title, urgent priority, a tag for the icon, a short body
curl -s -H "Title: CRITICAL example exposed-env" -H "Priority: urgent" -H "Tags: rotating_light" -d "dev.example.com/.env rematched. evidence/2d7bbe2f093b189d" "https://ntfy.sh/$NTFY_TOPIC"
Terminal window
# Same, to a protected topic with an access token kept in your secrets file (check the ntfy docs for token setup)
curl -s -H "Authorization: Bearer $NTFY_TOKEN" -H "Priority: urgent" -d "CRITICAL example exposed-env" "https://ntfy.example.net/$NTFY_TOPIC"

Pushover is a paid app with an HTTP API. Emergency priority (2) repeats until you acknowledge, which is exactly right for a critical and exactly wrong for anything else. Emergency messages need retry and expire values; check the Pushover API docs for current limits.

Terminal window
# Emergency-priority Pushover alert: repeats every 60 s for up to 30 min until acknowledged
curl -s --form-string "token=$PUSHOVER_APP" --form-string "user=$PUSHOVER_USER" --form-string "priority=2" --form-string "retry=60" --form-string "expire=1800" --form-string "message=CRITICAL example exposed-env dev.example.com/.env" https://api.pushover.net/1/messages.json

To wire escalation into the worked pipeline, add one line to the critical branch of stage 8 that calls one of these commands after notify. Keep it to critical with status rematched; an unconfirmed critical can wait for the normal alert.

notify can filter and format, and so can the pipeline. Doing the same filtering in both places makes behaviour hard to predict. Decide once.

Decision Pipeline side notify config side Why
Is this finding in scope Yes No Scope is enforced before traffic; notify never sees out-of-scope data
Has the human seen it already (ledger) Yes No Needs state; notify has none
Is it suppressed Yes No Needs your reasons file
Which severity goes now and which waits Yes, by choosing the id No Routing logic belongs with the rest of the logic, under version control
Which channel and provider an id maps to No Yes Changing Discord for Telegram should not touch the pipeline
Message text format Yes, the template Only {{data}} One place defines what a message says
Rate of sending Pipeline limits count per run -rate-limit and -delay flags as a backstop Protects you from being rate-limited by the chat provider
Splitting long messages No -char-limit Provider limits differ; notify knows them

Alert fatigue is the most common way a working pipeline becomes useless. You stop reading because most messages do not matter, then you miss the one that does.

Pick a number of immediate alerts per week you are willing to receive, for example 5 across all programs. This number is a personal choice, not a standard; it depends on how many programs you run and how much you can act on.

Week’s immediate alerts What it means Action
Under budget, and some were real Healthy Nothing
Under budget, none were real Healthy alert count, poor precision Raise the bar: require rematched for immediate alerts
Over budget You will start ignoring them Find the template or host that produced most of them; suppress, re-route to digest, or fix the scoring
Zero, for weeks Either a quiet target or a dead pipeline Check the heartbeat (Part 9) before believing it is quiet
Terminal window
# Which templates produced this week's immediate alerts (critical and high)
find ~/pipeline/programs/*/runs -name triage.tsv -newermt "$(date -u -d '7 days ago' +%F)" -exec cat {} + | awk -F'\t' '$1=="critical"||$1=="high"{print $2}' | sort | uniq -c | sort -rn

You will mute it at some point: a holiday, a busy week, a noisy template. Plan for that instead of pretending it will not happen.

  • Muting must not lose findings. Everything is in the run folders, the evidence folders and triage.tsv. The morning review reads files, not chat history.
  • Muting must not hide pipeline death. The heartbeat check alerts through a different channel than findings.
  • Unmuting starts with the files. Read current/queue.tsv and the week’s triage.tsv files, not the 200 unread messages.

Every alert ends in a person making a decision, written down: test it, suppress it with a reason, or move it to reports/. If an alert type never leads to a decision, it should not be an alert. That rule, applied weekly, keeps the pipeline honest.

Next, see where a model helps and where it must stay out in LLM-assisted triage.

Connections4 backlinks · 3 outgoingFull graph →
Open local graph around this page
Open full graph →
Click a node to open · Drag to reposition · Scroll to zoom

Recon AtlasFor authorized testing only. Your scope is the map edge.