Skip to content

Telegram

Telegram alerts require a bot token + chat ID. Once set up, alerts arrive on your phone with sub-second latency.

  1. Open Telegram, search for @BotFather
  2. Send /newbot
  3. Pick a name (display name) and username (must end in bot, e.g. my_dockmesh_bot)
  4. BotFather replies with the token — looks like 1234567890:ABCdefGHIjklMNOpqrsTUVwxyz

Keep the token secret — anyone with it can post as your bot.

For a personal chat:

  1. Send any message to your bot from your personal Telegram account
  2. Open https://api.telegram.org/bot<YOUR-TOKEN>/getUpdates in a browser
  3. Find "chat":{"id":<YOUR-CHAT-ID>,...} in the JSON
  4. That’s your chat ID (usually a positive number for personal chats)

For a group:

  1. Create a Telegram group, add your bot to it
  2. Send any message in the group
  3. Same getUpdates URL — the chat ID is a negative number for groups (e.g. -123456789)

For a channel:

  1. Create a public or private channel, add your bot as admin with “Post messages” permission
  2. Use @channelname (for public) or the numeric chat ID (for private)

Settings → Channels → New channel → Telegram

FieldValue
Namepersonal-alerts
Bot tokenpaste from BotFather
Chat IDyour chat/group/channel ID
Parse modeHTML (recommended) or MarkdownV2
Silent notificationsoff for critical, on for info

Click Send test.

dockmesh formats alerts as:

🔴 Critical: Container restart loop
Container: analytics_web_1
Host: prod-01
Metric: container_restarts = 5 (in 5m)
Rule: Prod restart loop
View: https://dockmesh.example.com/alerts/123

With HTML parse mode, the title is bold and the link is clickable.

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.

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.

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