Add Telegram receiver as default Alertmanager route #40
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#40
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 my phone via Telegram
So that I detect incidents immediately without checking a dashboard (MTTR)
Context
Phase 3 (PR #35) deployed PrometheusRules and an Alertmanager Tailscale funnel with a dormant Slack receiver. This issue adds Telegram as the primary notification channel.
The Telegram bot already exists and is verified:
@personal_assistant_ldraney_bot("Personal Assistant")~/secrets/telegram/bot_token~/secrets/telegram/chat_id(value:5892513378)Alertmanager natively supports Telegram via
telegram_configs— this is a first-class receiver, not a webhook hack.Current Alertmanager config (from PR #35) in kube-prometheus-stack Helm values:
route.receiver: "default"(null receiver)slack_webhook_urlis non-empty — currently unused)group_by: ["alertname", "namespace"]group_wait: 30s,group_interval: 5m,repeat_interval: 12hFile Targets
Files to modify:
terraform/main.tf— modify thealertmanagerconfig section in kube-prometheus-stack Helm values: addtelegramreceiver withtelegram_configs, changeroute.receiverfrom"default"to"telegram", keepdefaultreceiver as fallbackterraform/variables.tf— addtelegram_bot_token(sensitive, no default) andtelegram_chat_id(sensitive, no default) variablesFiles NOT to touch:
terraform/dashboards/— unrelated.woodpecker.yaml— just merged, unrelatedsalt/— not relevantAcceptance Criteria
telegram_bot_tokenvariable added (type string, sensitive, no default)telegram_chat_idvariable added (type string, sensitive, no default)telegram_bot_tokeninjected viaset_sensitive(same pattern as Slack webhook URL — must NOT appear in yamlencode)route.receiver: "telegram"(was"default")group_wait: 30s,group_interval: 5m,repeat_interval: 4h(changed from 12h — more appropriate for Telegram push notifications)tofu validatepassestofu fmtappliedTest Expectations
tofu planshows changes to kube-prometheus-stack Helm values and new Alertmanager configtelegramas the default receiverConstraints
telegram_bot_tokenMUST be injected viaset_sensitive— it cannot appear in theyamlencode()block or it will be exposed in plan output. Follow the samedynamic "set_sensitive"pattern used forslack_webhook_urlin PR #35.telegram_chat_idcan safely go inyamlencode()since it's just a number (not a secret), but marking it sensitive in the variable definition keeps it out of plan output as a precautiondefaultnull receiver — it's the fallback if Telegram config failssend_resolved: trueso you get notified when alerts clear (not just when they fire)Checklist
Closes #40in bodytofu planoutput included in PR descriptiontofu fmtandtofu validatepassRelated
project-pal-e-platform— projectphase-observability-3a-telegram-alerting— phase note in pal-e-docs