OpenUptime

Uptime alerts in Telegram

Have your own Telegram bot message you, a group or a channel when a monitor goes down and when it recovers.

Set it up

  1. Message @BotFather in Telegram, send /newbot, follow the prompts and copy the bot token it gives you.
  2. Start a chat with the bot, or add it to the group or channel that should get the alerts, and send it a message.
  3. Open https://api.telegram.org/bot<token>/getUpdates in a browser and copy the chat id. Group ids are negative, and supergroup and channel ids start with -100.
  4. In OpenUptime, open Alerting, choose Add channel and pick Telegram.
  5. Paste the bot token and the chat id.
  6. Save, then press Test: a test message arrives within seconds, and the delivery log below the channels shows whether it went through.

What arrives

When a monitor goes down

🔴 Checkout API is down — Expected 200, got 503

When it recovers

✅ Checkout API has recovered

Good to know about Telegram

  • Alerts come from your bot, so you control who can see them and can remove the bot at any time.
  • To post in a channel, the bot must be an administrator of it.

On every channel

  • Every channel is available on every plan, Free included.
  • Choose per monitor which channels it alerts, or turn a channel on for every new monitor.
  • Until someone acknowledges an incident, it can repeat on the mobile app (up to 10 times, by email too if you choose) and escalate to other channels in up to 3 levels.
  • A failed delivery is retried, and the delivery log shows what was sent to which channel and why anything failed.

Get Telegram alerts

Add a monitor, connect the channel and press Test. The Free plan includes every alert channel.

Questions

getUpdates returns an empty list. What now?

Send a new message to the bot or in the group after adding it, then reload the page. In groups with privacy mode on, a command such as /start addressed to the bot makes it show up.

Can several monitors share one bot?

Yes. One bot can post to many chats; add a channel in OpenUptime for each chat id and choose per monitor which ones it alerts.

Telegram 网站宕机告警

监控宕机和恢复时,让你自己的 Telegram 机器人给你、群组或频道发消息。

配置步骤

  1. 在 Telegram 里给 @BotFather 发消息,发送 /newbot,按提示操作,复制它给你的机器人令牌。
  2. 和机器人开始对话,或者把它加入要接收告警的群组或频道,并发一条消息。
  3. 在浏览器中打开 https://api.telegram.org/bot<token>/getUpdates,复制 chat id。群组的 id 是负数,超级群组和频道的 id 以 -100 开头。
  4. 在 OpenUptime 中打开“告警”,点击“添加渠道”,选择 Telegram。
  5. 粘贴机器人令牌和 chat id。
  6. 保存后点击“测试”:几秒内就会收到一条测试消息,渠道列表下方的投递记录会显示是否发送成功。

收到的内容

监控宕机时

🔴 Checkout API is down — Expected 200, got 503

恢复时

✅ Checkout API has recovered

关于 Telegram 的说明

  • 告警由你自己的机器人发送,你可以控制谁能看到,也可以随时移除机器人。
  • 要发到频道,机器人必须是该频道的管理员。

所有渠道通用

  • 所有渠道在所有套餐中都可用,包括免费版。
  • 可以为每个监控选择要通知的渠道,也可以让某个渠道默认对所有新监控开启。
  • 在有人确认事件之前,告警可以在手机 App 上重复提醒(最多 10 次,也可以选择同时发邮件),并最多分 3 级升级到其他渠道。
  • 投递失败会自动重试,投递记录会显示发到了哪个渠道、失败的原因是什么。

接收 Telegram 告警

添加一个监控,连接渠道并点击“测试”。免费版包含所有告警渠道。

常见问题

getUpdates 返回空列表怎么办?

在加入机器人之后,再给它或在群里发一条新消息,然后刷新页面。如果群组开启了隐私模式,发一条给机器人的命令(例如 /start)就能看到。

多个监控能共用一个机器人吗?

可以。一个机器人可以发到多个聊天;为每个 chat id 在 OpenUptime 里添加一个渠道,再在每个监控上选择要通知哪些。