fix(monitoring): stop three alerts re-notifying, and add .editorconfig #213

Merged
ivuorinen merged 2 commits from ivuorinen/fix/alert-noise-trim-only-digest-gatus into main 2026-11-01 16:31:08 +00:00 AGit
Owner

Two commits; each message explains its change. The Node-RED weekly-digest fix is made in the editor, not in this PR.

Two commits; each message explains its change. The Node-RED weekly-digest fix is made in the editor, not in this PR.
LF, UTF-8, a final newline, no trailing whitespace and two-space indents
(four for Python) are what every tracked file already uses, so an editor
that reads this writes the same. Checked with editorconfig-checker 4.0.2
across the tree: zero errors, and probe files with each kind of violation
fail.

Two sections loosen only the indent size, each with its reason in the
file: Markdown, whose list continuations align under the item marker, and
node-exporter-full.yaml, generated with one-space JSON because two spaces
put it over check-added-large-files' 500 KB limit.

The continuation lines it flagged in six scripts and tests were aligned
to odd columns; they now indent in steps of two (four in Python). All of
it is leading whitespace inside jq, awk and Python, which ignore it:
check-generated.sh regenerates every dashboard and the Longhorn CRD
schemas byte for byte, and the old and new normalize.jq give identical
output on all 16 local inputs tried. run-all.sh's closing heredoc is
printed, so its list items take two spaces after the number to keep the
continuation lines aligned under the text.

shfmt keeps its own -i 2 -ci flags; given flags, it ignores .editorconfig.
fix(monitoring): stop three alerts re-notifying for nothing
All checks were successful
validate / render (pull_request) Successful in 2m15s
validate / hooks (pull_request) Successful in 4m10s
5a2fc7b566
ntfy was getting about eight notifications a day, all from Alertmanager,
none failed or duplicated. Two of the three alerts behind them were wrong
by design, and the third double-fired on every Gatus rollout.

LonghornBackupStale left out trim-only volumes by a name pattern that
matched only Prometheus's PVC. kavita-library and audiobookshelf-audiobooks
joined trim-only later, so, with no backup by design, they fired from
their 27th hour and could never clear. The rule now reads the group label
from the PVC itself, the label Longhorn acts on, through kube-state-metrics'
kube_persistentvolumeclaim_labels (one allowlist entry), and the name
patterns are gone: a volume joining trim-only needs no rule change.

GatusEndpointDown and GatusDNSCheckFailing kept the scraped pod's `pod`
and `instance`, so a Gatus rollout resolved every failing check and fired
it again five minutes later on the new pod's series. On 2026-11-01 that
sent "(RESOLVED)" for bugsink, which answered 503 throughout. Both now
aggregate those labels away with max. That rollout left 15 s between the
two pods' series, so keep_firing_for is not added: it would only delay
real resolutions.

NodeRedFlowNeverRan for weekly-digest came from the flow: its filter
returned null when nothing was dead, which skipped the heartbeat. The flow
lives on the Node-RED volume, so that fix is made in the editor; the
flows README and docs/13-node-red.md now say every successful exit must
reach the heartbeat.

tests/alert-rules.bats gains a fixture for each rule. Both failed against
the old rules the way production did, and seven mutations of the new ones
(label filter dropped or misspelt, exclusion removed, threshold moved,
only pod aggregated, min for max, DNS left unaggregated) each fail one.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ivuorinen/turingpi-cluster!213
No description provided.