[Phase 4] Implement Drift Detection and Auto-Remediation #36
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Implement drift detection using gNMI Subscribe to monitor device configuration in real-time and trigger remediation when unauthorized changes occur.
Context
Configuration drift happens when device configuration diverges from the intended state (e.g., manual CLI changes, device bugs). Using gNMI ON_CHANGE subscriptions, we can detect drift in real-time and optionally auto-remediate by re-applying intent from InfraHub.
Tasks
DriftMonitorservice using gNMI Subscribe@flow handle_driftto process drift events@flow drift_remediationfor auto-fixfabric-orch drift statuspause_flow_run()for human approvalArchitecture
Drift Monitor Service
Prefect Drift Flows
CLI Integration
Output Files
src/services/__init__.pysrc/services/drift_monitor.pysrc/flows/drift.pysrc/flows/remediation.pygNMI Subscribe Notes
Based on Phase 1 findings, ON_CHANGE subscriptions work best with native YANG paths (not OpenConfig). Key paths to monitor:
Acceptance Criteria
pause_flow_run()Related