Zabbix SLA Reporting
Overview
Zabbix models customer-facing availability as business services (a
tree whose status rolls up from tagged problems) measured by SLAs (an
SLO percentage over daily to annual periods, with a schedule and excluded
downtimes). sla.getsli returns the computed uptime, downtime, SLI and
error budget per period. MSPs use it for monthly customer reports and QBRs.
Read api-patterns first. No tool in this
workflow is admin-gated in Conduit.
Anti-triggers
- What is broken right now - use problem-triage.
- Whether hosts are monitored at all - use
monitoring-coverage. An SLA over
hosts that are disabled or behind a dead proxy reports 100% because it
saw nothing.
Key Concepts
| Object |
Field |
Values |
| Service |
status |
-1 OK; otherwise the severity of the worst problem affecting it |
| SLA |
slo |
Target percentage, e.g. 99.9 |
| SLA |
period |
0 daily, 1 weekly, 2 monthly, 3 quarterly, 4 annually |
| SLA |
status |
0 disabled, 1 enabled |
| SLA |
effective_date |
Unix time the SLA starts counting |
| SLA |
timezone |
Period boundaries follow this zone, not UTC |
| SLI result |
sli |
Achieved percentage for one service in one period |
| SLI result |
uptime / downtime |
Seconds in the period |
| SLI result |
error_budget |
Seconds of downtime left before the SLO is missed (negative = missed) |
| SLI result |
excluded_downtimes |
Planned windows removed from the calculation |
sla.getsli returns periods (each with period_from / period_to),
serviceids, and sli as a two-dimensional array: sli[period][service].
Match columns to serviceids by position.
Common Workflows
Monthly SLA report for one customer
zabbix_services_list with search: {"name": "<customer>"} (or the
customer's service tag via tags), selectChildren: ["serviceid","name"]
and output: ["serviceid","name","status"] to find the customer's
service subtree.
zabbix_slas_list with serviceids and
selectExcludedDowntimes: "extend",
output: ["slaid","name","slo","period","timezone","status","effective_date"].
Skip SLAs with status: 0.
- For each SLA,
zabbix_sla_sli_get with slaid, serviceids (the
customer's services) and either periods: 3 for the last three periods
or period_from / period_to for an exact month.
- Per service and period report SLI against SLO, downtime in minutes, error
budget, and any excluded downtime (planned maintenance) separately so the
customer sees it was excluded rather than hidden.
Customer with no SLAs configured
Many instances have no services or SLAs. Summarize problem history instead,
and say clearly that it is not an SLA figure:
zabbix_events_list with the customer's groupids, source: 0,
value: [1], severities: [4,5], time_from / time_till for the
month, selectHosts: ["name"],
output: ["eventid","clock","name","severity","r_eventid"],
sortfield: "clock". Page with time_till if you get limit rows.
- Collect the non-zero
r_eventid values and fetch them with
zabbix_events_list (eventids, output: ["eventid","clock"]) to get
each recovery time. Duration = recovery clock minus problem clock;
r_eventid: 0 means still open at the end of the window.
- Report the count, the longest five, and total high/disaster minutes per
host.
Capacity trend notes
zabbix_trends_get with itemids, time_from / time_till and
output: ["itemid","clock","value_min","value_avg","value_max"] returns
hourly aggregates for numeric items. Item IDs are not discoverable through
Conduit (zabbix_items_list is opt-in and not listed), so take them from the
Zabbix frontend's Latest data page or from the customer's dashboards
(zabbix_dashboards_list gives dashboard IDs for deep links). Summarize
as weekly peak and average, not hour-by-hour rows.
Gotchas
- Service status is inverted from intuition.
-1 is healthy; any
number from 0 to 5 is a problem severity.
- SLA periods follow the SLA's
timezone. A "November" report from
period_from / period_to in UTC will not match the frontend for a US
customer. Use periods or convert the boundaries to the SLA timezone.
- Nothing before
effective_date. Periods before it come back empty;
that is not 100% uptime.
- No data is not uptime. Hosts in "no data collection" maintenance or
behind a dead proxy contribute no problems. Check coverage before
publishing a perfect number.
- Trends are hourly and numeric only. Text and log items have none.
periods is capped at 100.
Output
A customer-ready table per SLA: service, period, SLO, SLI, downtime
(minutes), error budget, excluded downtime. Follow with the top incidents
of the period (from the event summary) and one sentence of capacity outlook
when trends were pulled. Mark clearly any figure that came from problem
history rather than an SLA.
Related Skills
1---2name: zabbix-sla-reporting3description: >4 Customer availability reporting from Zabbix: the business service tree and5 its status, SLA definitions (SLO, period, schedule, excluded downtime),6 per-period SLI figures from sla.getsli, a problem-history summary for7 customers without configured SLAs, and hourly trend aggregates for8 capacity notes. Read-only.9when_to_use: >-10 When preparing a monthly or quarterly customer report, answering "did we11 meet the SLA", summarizing major incidents for a QBR, or pulling capacity12 trends for a server. Use when: zabbix sla, zabbix sli, uptime report,13 availability report, qbr monitoring, business service status, error14 budget, zabbix trends, capacity report, or monthly monitoring summary.15metadata:16 source: https://skillmd.com/skills/wyre-ai/zabbix-sla-reporting17---1819# Zabbix SLA Reporting2021## Overview2223Zabbix models customer-facing availability as **business services** (a24tree whose status rolls up from tagged problems) measured by **SLAs** (an25SLO percentage over daily to annual periods, with a schedule and excluded26downtimes). `sla.getsli` returns the computed uptime, downtime, SLI and27error budget per period. MSPs use it for monthly customer reports and QBRs.2829Read [api-patterns](../api-patterns/SKILL.md) first. No tool in this30workflow is admin-gated in Conduit.3132## Anti-triggers3334- **What is broken right now** - use [problem-triage](../problem-triage/SKILL.md).35- **Whether hosts are monitored at all** - use36 [monitoring-coverage](../monitoring-coverage/SKILL.md). An SLA over37 hosts that are disabled or behind a dead proxy reports 100% because it38 saw nothing.3940## Key Concepts4142| Object | Field | Values |43|--------|-------|--------|44| Service | `status` | -1 OK; otherwise the severity of the worst problem affecting it |45| SLA | `slo` | Target percentage, e.g. `99.9` |46| SLA | `period` | 0 daily, 1 weekly, 2 monthly, 3 quarterly, 4 annually |47| SLA | `status` | 0 disabled, 1 enabled |48| SLA | `effective_date` | Unix time the SLA starts counting |49| SLA | `timezone` | Period boundaries follow this zone, not UTC |50| SLI result | `sli` | Achieved percentage for one service in one period |51| SLI result | `uptime` / `downtime` | Seconds in the period |52| SLI result | `error_budget` | Seconds of downtime left before the SLO is missed (negative = missed) |53| SLI result | `excluded_downtimes` | Planned windows removed from the calculation |5455`sla.getsli` returns `periods` (each with `period_from` / `period_to`),56`serviceids`, and `sli` as a two-dimensional array: `sli[period][service]`.57Match columns to `serviceids` by position.5859## Common Workflows6061### Monthly SLA report for one customer62631. `zabbix_services_list` with `search: {"name": "<customer>"}` (or the64 customer's service tag via `tags`), `selectChildren: ["serviceid","name"]`65 and `output: ["serviceid","name","status"]` to find the customer's66 service subtree.672. `zabbix_slas_list` with `serviceids` and68 `selectExcludedDowntimes: "extend"`,69 `output: ["slaid","name","slo","period","timezone","status","effective_date"]`.70 Skip SLAs with `status: 0`.713. For each SLA, `zabbix_sla_sli_get` with `slaid`, `serviceids` (the72 customer's services) and either `periods: 3` for the last three periods73 or `period_from` / `period_to` for an exact month.744. Per service and period report SLI against SLO, downtime in minutes, error75 budget, and any excluded downtime (planned maintenance) separately so the76 customer sees it was excluded rather than hidden.7778### Customer with no SLAs configured7980Many instances have no services or SLAs. Summarize problem history instead,81and say clearly that it is not an SLA figure:82831. `zabbix_events_list` with the customer's `groupids`, `source: 0`,84 `value: [1]`, `severities: [4,5]`, `time_from` / `time_till` for the85 month, `selectHosts: ["name"]`,86 `output: ["eventid","clock","name","severity","r_eventid"]`,87 `sortfield: "clock"`. Page with `time_till` if you get `limit` rows.882. Collect the non-zero `r_eventid` values and fetch them with89 `zabbix_events_list` (`eventids`, `output: ["eventid","clock"]`) to get90 each recovery time. Duration = recovery `clock` minus problem `clock`;91 `r_eventid: 0` means still open at the end of the window.923. Report the count, the longest five, and total high/disaster minutes per93 host.9495### Capacity trend notes9697`zabbix_trends_get` with `itemids`, `time_from` / `time_till` and98`output: ["itemid","clock","value_min","value_avg","value_max"]` returns99hourly aggregates for numeric items. Item IDs are not discoverable through100Conduit (`zabbix_items_list` is opt-in and not listed), so take them from the101Zabbix frontend's Latest data page or from the customer's dashboards102(`zabbix_dashboards_list` gives dashboard IDs for deep links). Summarize103as weekly peak and average, not hour-by-hour rows.104105## Gotchas106107- **Service status is inverted from intuition.** `-1` is healthy; any108 number from 0 to 5 is a problem severity.109- **SLA periods follow the SLA's `timezone`.** A "November" report from110 `period_from` / `period_to` in UTC will not match the frontend for a US111 customer. Use `periods` or convert the boundaries to the SLA timezone.112- **Nothing before `effective_date`.** Periods before it come back empty;113 that is not 100% uptime.114- **No data is not uptime.** Hosts in "no data collection" maintenance or115 behind a dead proxy contribute no problems. Check coverage before116 publishing a perfect number.117- **Trends are hourly and numeric only.** Text and log items have none.118- **`periods` is capped at 100.**119120## Output121122A customer-ready table per SLA: service, period, SLO, SLI, downtime123(minutes), error budget, excluded downtime. Follow with the top incidents124of the period (from the event summary) and one sentence of capacity outlook125when trends were pulled. Mark clearly any figure that came from problem126history rather than an SLA.127128## Related Skills129130- [api-patterns](../api-patterns/SKILL.md) - Paging by time range131- [monitoring-coverage](../monitoring-coverage/SKILL.md) - Confirm coverage before reporting