Set alert rule
Create or update an alert rule on an application. metric "down" fires when the app is not running (threshold is 1); "restart_loop" fires when restarts grow past threshold within the window; "memory_pct" fires when memory stays above threshold percent of its cgroup limit for the window. duration_minutes (1-60) is the consecutive-minutes window. An open rule fires once and closes with a note when the condition clears. Pass rule_id to update an existing rule. Requires deploy scope. Since 25 September 2026 the metrics also include "cpu_pct" (percent 1-10000, 100 = one full core, evaluated on the report against the sample-weighted bucket average), "agent_offline" and "backup_failed" (both threshold 1, evaluated by the platform's minute cron tick with a daily fallback — an offline agent cannot report itself). The failover metrics "standby_stale" and "drill_failed" ride the pair of a standby (its primary application): standby_stale fires when the pair's scheduled sync is at least max(30, duration_minutes) minutes past due and no drill is running (threshold is 1); drill_failed fires while the pair's latest finished drill ended failed, closing when a later drill verifies (threshold is 1). Both are created automatically, enabled, on the pair's first verified sync; evidence carries only state, ages and closed failure codes — never a location, address or app data; with failover disabled they resolve and never open.
Request
- Base URL: https://api.imprezahost.com/v1
- URL: https://api.imprezahost.com/v1/platform/deployments/custom/{deployment_id}/alert-rules
- Auth: API key in header X-API-Key and API key in header X-API-Secret
Path parameters
The application (dpl_...).
Request body
Response
API response envelope. For apply operations acceptance is queued, not verified completion.
Changes
No recorded changes to this operation across all 1 revision of this API.