Skip to content
Statance

Alert rules

Server metric alert rules: metrics, comparisons, durations and recovery notifications.

Alert rules watch the metrics your agents report. A rule fires when its condition holds for notify_after minutes, opening an incident and notifying its recipients.

Fields

FieldDescription
server_idsServers to watch. Empty array = all servers, including ones added later.
metricSee below.
compareHIGHER, LOWER, EQUAL, DOESNT_EQUAL
valueThreshold.
notify_afterMinutes the condition must hold before alerting.
notify_on_closeSend a recovery alert when the condition clears.
channel_idsRecipients to notify.

Metrics

MetricMeaningUnit
downServer stopped reporting (no compare/value needed)—
CPU_overallCPU busy%
MEM_usedMemory used%
MEM_freeMemory free%
CPU_tempCPU temperature°C
CPU_loadavg1-minute load average—
DISK_usedHighest usage across mounts%

Example

curl -X POST https://api.statance.com/v1/alerts \
  -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" \
  -d '{"server_ids":[],"metric":"CPU_overall","compare":"HIGHER","value":90,
       "notify_after":10,"notify_on_close":true,"channel_ids":["ch_..."]}'

Next: Notifications →