fix(monitoring): let alertmanager read its smtp and ntfy secrets #593
Inga granskare
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
priority
high
priority
low
priority
medium
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-infra!593
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "fix/alertmanager-secret-perms"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
Closes #565.
Cause
Alertmanager runs as
nobody(65534). It read its SMTP password and ntfy token from bind-mounted files owned by the service user with mode0600. Inside the container both reads fail:So every email and ntfy notification has failed since the files were added. The credentials themselves were fine.
Change
type=mount,uid=65534,gid=65534,mode=0400, at the same paths.alertmanager.ymlis unchanged.AlertmanagerDeliveryFailingfires per integration onalertmanager_notification_requests_failed_total. If every integration fails it reaches no one, but it shows on the dashboard. An outside dead-man's switch is a separate task..ua/(local code-analysis output) is git-ignored, soprettier -cu .passes in clones that have it.Verified
/etc/alertmanager/smtp_passwordwith these options. The throwaway secret was removed afterwards.check-alert-rules.py: 54 rules render and parse. Pre-push hooks pass, includingansible-lint.After merge
Apply the monitoring role, then send a test alert and confirm both email and ntfy arrive.