Playbook: uptime monitors and alerts
Three alerting layers exist, all on the control plane (no agent needed for setup):
| Layer | What it watches | Operations |
|---|---|---|
| Uptime monitors | External probes of a URL or host (http, tcp, ping) | uptime_* |
| Server metric alerts | CPU, RAM, disk, swap, load, network and container health thresholds on one server | server_alert_rules_*, server_alert_channels_* |
| Event routing | Platform events (agent offline, backup failed, cert expiring, …) to chat or email | notify_connections_*, notify_destinations_*, notify_rules_* |
Token: operate for monitors, rules and tests. Creating channels or connections
stores a secret target, so it needs full + webhooks:admin. Deleting a monitor needs
data:delete. Uptime checks and alerts are on every plan.
1. Uptime monitors
Section titled “1. Uptime monitors”-
Discover what to watch:
uptime_discoversuggests monitors from the fleet’s sites and apps. -
Create:
uptime_monitors_create, oruptime_monitors_bulk_create {body: {monitors: [...]}}for up to 100 at once:{ "body": { "name": "shop homepage", "type": "http", "target": "https://shop.example.com/","intervalSec": 60, "expectCode": 200, "expectKeyword": "Add to cart","channelIds": ["<uptime channel uuid>"] } }typeishttp(a URL),tcp(host:port) orping(a host).intervalSecis at least 30. -
Check now:
uptime_monitors_check {mid}. List and stats:uptime_monitors_list. Incidents:uptime_incidents. -
Pause or edit:
uptime_monitors_update {mid, body: {paused: true}}.
Channels for uptime alerts: uptime_channels_list, then
uptime_channels_create {body: {type: "webhook"|"slack"|"telegram"|"email", name, target}}
(full + webhooks:admin). Test one with uptime_channels_test {cid}.
Public status page: uptime_status_page_set {body: {slug, title?, public?, monitorIds?}}
(full). Read it back with uptime_status_page_get.
2. Server metric alerts
Section titled “2. Server metric alerts”-
Pick channels:
server_alert_channels_list {id}, or create one withserver_alert_channels_create {id, body: {type, name, target}}(full+webhooks:admin). -
Create a rule with
server_alert_rules_create {id, body}:{ "title": "Disk almost full", "metric": "disk", "operator": ">", "threshold": 90,"durationSec": 300, "severity": "critical", "channelIds": ["<channel uuid>"] }metricis one ofcpu,ram,disk,swap,load,net,containers_unhealthy,containers_down,containers_update_available,mem_pressure(memory pressure %, PSI),swap_in(pages/s swapped in) ortop_ip_share(% of the last minute’s requests from one client IP; the alert names the IP and site). The last three need agent 0.2.143 or newer — on older agents the rule never fires. Prefermem_pressure/swap_inoverswap: a full swap on an idle box is harmless.operatoris>,<or==. -
Test with
server_alert_channels_test {id, cid}. Pause or edit withserver_alert_rules_update.
For history, servers_metrics_history {id, query: {range: "24h"}} and
containers_metrics_history {id, name} return the time series behind these alerts.
3. Event routing to chat
Section titled “3. Event routing to chat”-
notify_connections_listshows the connected apps (Slack, Telegram, Discord, Teams, Google Chat, WhatsApp, email, webhook) and their destinations. -
Connect a new one (
full+webhooks:admin):notify_connections_create {body: {app_id, label, secret?, first_destination: {name, target}}}. Add destinations later withnotify_destinations_create {id, body: {name, target}}. -
Route events with
notify_rules_create {body}:{ "name": "Prod incidents", "events": ["<event id>"], "min_severity": "warning","scope_kind": "servers", "scope_server_ids": ["<server uuid>"],"destination_ids": ["<destination uuid>"], "cooldown_sec": 600, "enabled": true }The event ids are
backup.failed,backup.done,server.down,server.up,ssl.expiring,ssl.renewed,os.updates,aiops.insight,deploy.done,deploy.failed,security.alert,resource.cap,domain.expiring,domain.dns_drift(a served domain no longer resolves to its server),cron.failed,uptime.downanduptime.up.server.downfires only after the server has been offline for 3 minutes (10 minutes after an agent update).scope_kindisallorservers. -
Test with
notify_destinations_test {did}.
In-app notifications are listed with notifications_list and marked read with
notifications_read_all. Every uptime incident writes an uptime.down item there even
without a rule; outage items (server.down, uptime.down) get resolved_at when the
outage ends.