From 23b41b37c1c6b1e76b3aacd15156ee7ed2de14a8 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 8 Jun 2026 14:22:18 +0000 Subject: [PATCH] =?UTF-8?q?docs:=20adicionar=20padr=C3=A3o=20de=20payload?= =?UTF-8?q?=20para=20pings=20de=20health=20check?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/ping-payload.md | 55 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 docs/ping-payload.md diff --git a/docs/ping-payload.md b/docs/ping-payload.md new file mode 100644 index 0000000..e202536 --- /dev/null +++ b/docs/ping-payload.md @@ -0,0 +1,55 @@ +# Ping Payload Standard + +This document defines the standard payload for all health check pings sent to Healthchecks.io across all agents (scripts, bots, services). + +## HTTP Request + +- **Method:** `POST` +- **URL:** `https://hc-ping.com/` + +## Headers + +| Header | Value | +|---|---| +| `User-Agent` | `/` | +| `Content-Type` | `application/json` | + +The `User-Agent` must identify the agent and its version. Examples: + +``` +health-check/1.0.2 +telegram-bot-alerts/2.1.0 +``` + +## Body + +```json +{ + "user": "", + "device": "", + "ips": ["", ""], + "uptime": "" +} +``` + +| Field | Type | Description | +|---|---|---| +| `user` | `string` | Name of the agent sending the ping (script, bot, service) | +| `device` | `string` | Name of the device or host where the agent runs | +| `ips` | `array of strings` | List of IP addresses of the device | +| `uptime` | `string` | Device uptime formatted as `Xd Yh Zm` | + +## Example + +```json +{ + "user": "my-telegram-bot", + "device": "my-server", + "ips": ["192.168.1.10", "10.0.0.5"], + "uptime": "3d 14h 22m" +} +``` + +## Failure Ping + +On error, agents must send a POST to `/fail` with the same body.