From caa7f3b7057f6832369ab1fb36520c9d74a5828c Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 8 Jun 2026 16:32:39 +0000 Subject: [PATCH] =?UTF-8?q?docs:=20documentar=20exibi=C3=A7=C3=A3o=20do=20?= =?UTF-8?q?body=20nas=20notifica=C3=A7=C3=B5es=20do=20Telegram?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/ping-payload.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/docs/ping-payload.md b/docs/ping-payload.md index d3df316..1654600 100644 --- a/docs/ping-payload.md +++ b/docs/ping-payload.md @@ -104,3 +104,30 @@ ping(url, agent="my-bot", device="server", timeout=5) ## Failure Ping On error, agents must send a POST to `/fail` with the same body. The `ping_fail` function handles this automatically. + +--- + +## Telegram Notifications + +Healthchecks.io includes the ping body as **Last Ping Body** in Telegram notifications (UP, DOWN, and failure events). The body is displayed as raw JSON with syntax highlighting. + +Example of what appears in the Telegram message: + +``` +🟢 The check mySoccer is now UP. + +Project: FastAPI +Tags: Telegram, Soccer +Period: 2 minutes +Total Pings: 860 +Last Ping: Success, a second ago +Last Ping Body: +{"user":"ronaldo","device":"sandbox","ips":["192.168.122.71","fe80::f9f:d854:2bed:e454","100.70.8.112"],"uptime":"0d 2h 47m"} +``` + +### Implications for payload design + +- Keep field names short and meaningful — they appear directly in the notification +- `user` identifies who sent the ping (agent name) +- `device` and `uptime` give immediate context for diagnosing incidents without leaving Telegram +- Avoid sensitive data in the body (IPs are acceptable; avoid tokens or passwords)