Werk #19734: Fix wrong response fields for SLA outage-count and state-percentage computations
| Component | REST API | ||||||
| Title | Fix wrong response fields for SLA outage-count and state-percentage computations | ||||||
| Date | Jul 6, 2026 | ||||||
| Level | Trivial Change | ||||||
| Class | Bug Fix | ||||||
| Compatibility | Compatible - no manual interaction needed | ||||||
| Checkmk versions & editions |
|
Outage-count computations returned the wrong response shape
Previously, computing an SLA definition that uses the "service outage count" plugin returned broken results via the REST API:
- The response had the wrong shape entirely - it looked like a "service state percentage" result instead of an outage-count result.
- The requirement's
threshold_countandallowed_durationwere missing from the response entirely. - The requirement's
observed_stateshowed up as a plain number (e.g."2") instead of the expected state name (e.g."crit"). - An irrelevant
monitoring_levelsblock, which only applies to the "service state percentage" plugin, was included in outage-count results too.
This has been fixed. Outage-count computations now return their own correct
response shape, with observed_state, threshold_count, and allowed_duration
all present and correctly typed.
CRIT results showed up as "writ" in state-percentage computations
Independently of the above, computing an SLA definition that uses the "service
state percentage" plugin returned "writ" instead of "crit" for observed_state
whenever the underlying rule was based on the CRIT state. This has been fixed as
well.