Add Telegram receiver to Alertmanager as default route #42
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/pal-e-platform#42
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Lineage
plan-pal-e-platform→ Phase 3 (Alerting) → Phase 3a (Telegram Alerting)Repo
forgejo_admin/pal-e-platformUser Story
As the platform operator
I want Alertmanager to push alerts to a Telegram group
So that the entire team gets notified on their phones instantly when something breaks (MTTR)
Context
Phase 3 (PR #35, merged) deployed PrometheusRules, Alertmanager routing with a dormant Slack receiver, and an Alertmanager Tailscale funnel. Alerts fire and are visible in the Alertmanager UI, but they don't push to anyone's phone yet.
Telegram is the chosen push channel because it has native Alertmanager support (
telegram_configs), zero infrastructure overhead, and reliable mobile push notifications. A Telegram group "Pal-E Alerts" has been created with the bot@personal_assistant_ldraney_bot. The group chat ID is the alerting target — adding a new developer means adding them to the Telegram group. No infrastructure changes per developer.Key technical facts:
defaultnull receiver and conditional Slack receiveralertmanager.configinterraform/main.tfroute.receiveris currently"default"(null — alerts go nowhere except the UI)telegram_configs— this is a first-class receiver typeFile Targets
Files to modify:
terraform/main.tf— addtelegramreceiver withtelegram_configsto the Alertmanager config in kube-prometheus-stack Helm values. Changeroute.receiverfrom"default"to"telegram". Addset_sensitiveblocks for bot token and chat ID.terraform/variables.tf— addtelegram_bot_token(sensitive) andtelegram_chat_id(sensitive) variablesFiles NOT to touch:
.woodpecker.yaml— unrelatedterraform/dashboards/— unrelatedsalt/— unrelatedAcceptance Criteria
telegramreceiver added to Alertmanager config withtelegram_configs:bot_tokenfrom TF variable (injected viaset_sensitive, NOT in yamlencode block)chat_idfrom TF variable (injected viaset_sensitive)parse_mode: "HTML"for rich formattingsend_resolved: true(notify when alert clears)route.receiverchanged from"default"to"telegram""default"null receiver kept as fallbacktelegram_bot_tokenvariable: type string, sensitive, no defaulttelegram_chat_idvariable: type string, sensitive, no defaulttofu validatepassestofu fmtappliedTest Expectations
tofu planshows changes to kube-prometheus-stack Helm release (Alertmanager config update)telegramreceiver as default routeConstraints
set_sensitive(likegrafana.adminPassword) — never put it in theyamlencodeblock where it would appear in plan outputset_sensitivefor consistencyset_sensitivepath for telegram_configs follows the Helm chart structure:alertmanager.config.receivers[N].telegram_configs[0].bot_token— verify the correct index N (it depends on where in theconcatthe telegram receiver is placed)dynamic "set_sensitive"pattern used for the Slack webhook URL in PR #35Checklist
Closes #42in bodytofu planoutput included in PR descriptiontofu fmtandtofu validatepassRelated
project-pal-e-platform— projectphase-observability-3a-telegram-alerting— phase note in pal-e-docs