drift_report
Identify endpoints that have drifted from the fleet baseline (patch, agent, OS, profile), deriving the baseline from fleet majority when none is set.
Instructions
[READ] Report endpoints drifted from a per-field baseline (patch/agent/OS/profile).
Answers "which endpoints have drifted from the fleet?" With no baseline it derives one by fleet majority (the most common value per field is treated as intended), so it works before any gold image is declared. Pass 'endpoints' for pure analysis, or a target to pull live inventory.
Args: baseline: Field→intended-value map; omit to derive the fleet majority. fields: Inventory fields to check (default agentVersion, patchLevel, osBuild, profileId). endpoints: Injected inventory rows; skips live collection. target: Endpoint-management target name from config; omit for the default. limit: Max drifted endpoints to return (default 200).
Returns dict: {totalEndpoints, baselineSource, baseline, fieldsChecked, driftedCount, compliantCount, driftByField, driftedEndpoints:{items[], returned, limit, truncated}}. driftedCount is the full count; when driftedEndpoints.truncated is true, re-run with a higher limit.
Example: drift_report(endpoints=[{"hostname":"tc01","patchLevel":"2026-06"}, {"hostname":"tc02","patchLevel":"2026-05"}]).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| fields | No | ||
| target | No | ||
| baseline | No | ||
| endpoints | No |