calculate_availability
Calculate availability percentage and SLA uptime metrics from alert history, including MTTR and per-device breakdown. Filter by device, group, time range, and severity.
Instructions
Calculate availability percentage from alert history. Computes SLA-style uptime metrics, MTTR, and per-device breakdown from cleared and active alerts.
Common mistakes: hours_back defaults to 720 (30 days). Narrow scope with device_id/group_id for performance.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| group_id | No | Optional device group ID filter | |
| device_id | No | Optional device ID filter | |
| hours_back | No | Hours to look back (default 30 days) | |
| severity_threshold | No | Minimum severity for downtime (critical, error, warning, info) | error |