patch_compliance
Evaluate patch-compliance SLA by calculating the percentage of endpoints on the target patch level, comparing it to the required threshold, and listing non-compliant endpoints.
Instructions
[READ] Patch-compliance SLA measure: % of the fleet on the target patch level.
Reframes patch_status (the patch-level distribution) as an SLA/compliance verdict: what fraction of the fleet is on the target level, whether that meets the SLA, and which endpoints are non-compliant. Compliance is an exact string match on patchLevel — a transparent check, not a version-semantics parser. Injected-only: pass 'endpoints' (inventory rows); no live collection.
Args: endpoints: Injected inventory rows to evaluate (e.g. from endpoint_list). target_patch: Desired patch level; omit to use the fleet-majority level. sla_pct: Compliance SLA threshold percent; default 95.0. limit: Max non-compliant endpoints to return (default 200).
Returns dict: {endpointsEvaluated, targetPatch, targetSource, slaTargetPct, complianceRatePct, compliantCount, verdict, nonCompliantCount, nonCompliant:{items[], returned, limit, truncated}, note}. The rate is always computed over the whole fleet, never over the capped list.
Example: patch_compliance(endpoints=[{"hostname":"tc01","patchLevel":"2026-06"}, {"hostname":"tc02","patchLevel":"2026-05"}], target_patch="2026-06").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| sla_pct | No | ||
| endpoints | Yes | ||
| target_patch | No |