How to create Telegram bot and use it with RMON

Send alerts to Telegram

You need a Telegram bot you control, a destination where it can post, and permission to create notification channels in the intended RMON group. This example uses a public channel named @example_alerts; replace it with your own destination.

1. Create or select a bot

  1. Open the official BotFather conversation.
  2. Send /newbot and follow the prompts to choose the bot's display name and username.
  3. Retain the returned bot token securely for RMON's Token field. If your team already has a suitable bot, obtain its current token from the bot administrator.

See Telegram's bot-token instructions for creation and token management.

2. Prepare the destination

Scroll horizontally to view the full table.

DestinationPreparationRMON Channel name
Public channelAdd the bot and allow it to post messages.The public username including @, for example @example_alerts.
Private group or channelAdd the bot with posting access. Obtain the numeric chat ID from the Telegram administrator.The complete numeric ID, including any leading minus sign.
Private conversationThe recipient opens the bot and starts the conversation.The recipient chat ID obtained for that bot.

A destination's display title is not its identifier. For a newly configured bot, an administrator can find chat IDs in Bot API updates after sending a message to it. Coordinate with whoever operates the bot before inspecting updates if it already serves another application.

3. Connect the bot to RMON

  1. Switch to the intended RMON group and open Channels.
  2. In the Telegram section, click + Add.
  3. Paste the bot credential into Token and the destination identifier into Channel name. Select the group when available and save.
  4. Click Test. Open the Telegram destination and confirm that the test message appears there.
  5. Edit the required check, select this Telegram destination on Notifications, and save.

For the public-channel example, Channel name is @example_alerts, not Example alerts and not a t.me link. Keep the token out of the name and description.

Verify and maintain delivery

Follow the disposable-check exercise to confirm incident and recovery messages. Repeat the channel test after replacing the bot token, moving the destination or changing the bot's posting permissions.

If the destination cannot be found, recheck its identifier and bot membership. If a private conversation receives nothing, confirm the recipient started the correct bot. If the channel test succeeds but incidents are missing, inspect the destination selected on the check and the latest alert history.