Skip to Content
OpenPerf

Respond

Telegram

Send alert notifications to a Telegram group through a bot.

The Telegram integration posts alert notifications to Telegram groups. You add a bot to a group, and the group becomes a chat you can choose in each alert.

Connect a group

Only owners and admins can connect chats. The chat must be a group or a supergroup; private chats and channels cannot be connected.

  1. Open Settings → Integrations.
  2. In the Alerts group, click Add channel in the Telegram row. If Telegram already has chats, click the row and use Add channel on the Telegram page.
  3. In the Connect a Telegram chat dialog, click Open Telegram.
  4. In Telegram, pick the group that should get alerts and add the bot to it.
  5. The bot writes Connected to followed by the name of your organization. The dialog in OpenPerf closes by itself and a message confirms that the group is connected.

The link works once and for 10 minutes. After that the bot answers This link has expired. Create a new one in OpenPerf. Click Add channel again to get a new link.

If the Telegram row is dimmed and has no Add channel button, Telegram is not configured on your OpenPerf server.

Send alerts to the group

A connected group gets nothing until an alert uses it. Open an alert in Settings → Alerts and turn the group on under Team chats. See Alerts.

The Telegram page lists the groups by title with the number of alerts that use each, the time of the last message and a status: Active or Error.

To check a group, open its three-dot menu and click Send test. OpenPerf posts a test message right away and tells you whether Telegram accepted it.

What a message contains

  • A bold title, for example New error: TypeError, Spike: TypeError, Firing: Checkout errors or Resolved: Checkout errors.
  • A summary. For an error it is the error message. For a metric it is a sentence such as Error count is 240, above 100 in the last 5 min.
  • One line per field: Project, Environment and Rule. Alerts about an error add Culprit and Level, and a spike adds Events.
  • An Open in OpenPerf link. It opens the error, or the alert when the notification is about a metric.

Link previews are turned off.

Disconnect a group

On the Telegram page, open the three-dot menu of the group and click Disconnect. Alerts stop posting to the group, and it is removed from every alert that used it.

The bot stays in the group. Remove it in Telegram if you no longer need it.

Limits

  • When the bot is removed from the group, the chat gets the Error status and alerts skip it. Add the bot back to the group and the status returns to Active.
  • When Telegram turns a group into a supergroup, OpenPerf keeps posting to it. You do not need to connect it again.
  • A message longer than 4,096 characters is sent without the fields.
  • A message that fails for a temporary reason is retried, up to 5 attempts in total.
  • Long text is cut: titles at 200 characters, summaries at 1,500 and field values at 300.

On this page