Telegram alerts
Telegram is a good fit for personal alerts and small groups. PingArk sends a short message to your chat when a check goes down and when it recovers.
Prerequisites
A Telegram account. You will create a bot with BotFather, then let PingArk find the chat id for you.
Setup
- In Telegram, open a chat with @BotFather and send /newbot. Give the bot a name, then a username ending in bot.
- BotFather replies with a bot token in the form 123456:ABC-DEF.... Copy it.
- Open a chat with your new bot and send it any message, such as "hello". For a group, add the bot to the group instead. This is the step people miss: a bot cannot see a chat until someone has messaged it there.
- In PingArk, open Channels, click Add channel, pick Telegram, and paste the token into Bot token.
- Wait a few seconds, then click Fetch chat id. PingArk reads the chats your bot can reach and fills the Chat id in for you. If your bot can reach more than one chat, pick the right one from the list.
- Click Send test to confirm the message arrives, then save.
Finding the chat id
You do not need to find the chat id by hand. Once you have messaged your bot, the Fetch chat id button in the add-channel modal reads the chats your bot can reach and fills the field in. If several chats come back, PingArk shows a short list so you can pick the right destination.
The "message your bot first" step matters because of how Telegram works: a bot cannot start a conversation, so it only becomes aware of a chat after someone sends it a message there, or adds it to a group. Give it a few seconds after your message before you click Fetch, since Telegram takes a moment to make the update available.
If you would rather do it by hand, send your bot a message and then open this URL in a browser, with your token in place of <token>:
https://api.telegram.org/bot<token>/getUpdatesCopyRead the chat.id from the response. A personal chat id is a positive number, and a group id starts with a minus sign.
{
"ok": true,
"result": [
{
"message": {
"chat": { "id": 149392507, "first_name": "Ada", "type": "private" },
"text": "hello"
}
}
]
}Config fields
| Field | What to enter |
|---|---|
| Bot token | The token BotFather returns, in the form 123456:ABC-DEF.... |
| Chat id | The numeric id of the chat to message. Positive for a personal chat, and starting with a minus sign for a group. Use Fetch chat id to fill this in automatically. |
Test before you save
Once the bot token and chat id are filled in, click Send test in the modal to post a test message to the chat. That confirms the bot can reach the destination before you commit the channel. There is no separate verification step for Telegram, because a working token and chat id are proof enough. You can also send a test later from the channel's menu.
What an alert looks like
Messages are prefixed with PingArk, then DOWN or UP with the check name, so they are easy to spot in a busy chat. Your check description follows when you have set one.
Troubleshooting
If Fetch chat id says there are no messages yet, send your bot another message and wait a few seconds before trying again, since a bot cannot see a chat until it has been messaged there and Telegram only keeps recent updates. For a group, confirm the bot is a member. If the token is not accepted, check you copied all of it from BotFather. If your bot has a webhook configured, PingArk cannot read its updates, so remove the webhook or enter the chat id by hand.
Which plans include which channels is on the pricing page.