Telegram
Telegram alerts require a bot token + chat ID. Once set up, alerts arrive on your phone with sub-second latency.
Create a Telegram bot
Section titled “Create a Telegram bot”- Open Telegram, search for
@BotFather - Send
/newbot - Pick a name (display name) and username (must end in
bot, e.g.my_dockmesh_bot) - BotFather replies with the token — looks like
1234567890:ABCdefGHIjklMNOpqrsTUVwxyz
Keep the token secret — anyone with it can post as your bot.
Get a chat ID
Section titled “Get a chat ID”For a personal chat:
- Send any message to your bot from your personal Telegram account
- Open
https://api.telegram.org/bot<YOUR-TOKEN>/getUpdatesin a browser - Find
"chat":{"id":<YOUR-CHAT-ID>,...}in the JSON - That’s your chat ID (usually a positive number for personal chats)
For a group:
- Create a Telegram group, add your bot to it
- Send any message in the group
- Same
getUpdatesURL — the chat ID is a negative number for groups (e.g.-123456789)
For a channel:
- Create a public or private channel, add your bot as admin with “Post messages” permission
- Use
@channelname(for public) or the numeric chat ID (for private)
Add to dockmesh
Section titled “Add to dockmesh”Telegram is not a built-in channel type — dockmesh ships email, Slack, Discord, Teams, ntfy, Gotify, PagerDuty, Pushover, plus a generic webhook. The supported pattern is to use the Generic webhook channel pointed at the Telegram Bot API:
Alerts → Channels → New channel → Generic webhook
| Field | Value |
|---|---|
| Name | personal-alerts |
| URL | https://api.telegram.org/bot<TOKEN>/sendMessage?chat_id=<CHAT_ID>&text={{message}} |
{{message}} is the dockmesh-rendered alert text the webhook channel posts as the request body or query parameter, depending on how you configure it. For richer formatting (parse modes, silent notifications, HTML), put a tiny relay in front of dockmesh — a Cloudflare Worker, an n8n flow, or your own Telegram bot — that translates dockmesh’s webhook payload into a full sendMessage call.
Click Send test to confirm the Bot accepts the request.
Payload
Section titled “Payload”The generic webhook channel POSTs the alert as JSON. Build your Telegram-side relay to read the metric, value, threshold, rule name, and container, then format the actual Telegram message however you want — bold, plain, inline keyboard buttons, whatever the Bot API supports.
Multiple chats
Section titled “Multiple chats”Create one dockmesh channel per Telegram destination:
- Personal DM: severity = critical only (for on-call)
- Team group: all severities
- Public channel: curated (only specific rules)
Attach different channels to different rules.
Silent notifications
Section titled “Silent notifications”For non-urgent alerts, enable Silent notifications — Telegram delivers the message without sound/vibration. Useful for info-level alerts you want to log but not be paged for.
Troubleshooting
Section titled “Troubleshooting”chat not found:
- Chat ID is wrong. Re-check via
getUpdates - For groups, make sure you added the bot before getting the chat ID (messages before bot was added don’t count)
bot was blocked by the user:
- You blocked the bot in Telegram. Unblock it
- Happens sometimes when testing — the “Stop” button in bot chat blocks it
No getUpdates output:
- Make sure you sent at least one message to the bot first
- Messages older than 24 hours don’t appear in
getUpdates— send a fresh one
See also
Section titled “See also”- Alerts — alert rule config
- Integrations · ntfy.sh — alternative push notification system (self-hostable)