NCM Compliance Audit - Setting up the test logic for non-compliance
search cancel

NCM Compliance Audit - Setting up the test logic for non-compliance

book

Article ID: 451817

calendar_today

Updated On:

Products

VMware Smart Assurance Network Observability

Issue/Introduction

A RegEx-based compliance test configured with Match type "Contains" and a pattern that should flag a violation (e.g. logging <IpAddress>) instead marks devices containing that line as compliant, when the intent is for its presence to mark the device non-compliant.

Environment

  • Product: DX NetOps Network Configuration Manager (NCM)
  • Version: 25.4
  • Component: Automation Library — Compliance Test (RegEx-based), Rule/Scope tabs

Cause

On the Rule tab, Match type "Contains" is designed so the test/step passes (compliant) when the pattern is found in the device configuration — it does not mark presence as a violation.

There is no invert/negate toggle on the Rule tab itself; pass/fail-on-presence logic is controlled separately, on the Scope tab.

Resolution

  1. Open the compliance test in the Automation Library Editor.
  2. Go to the Scope tab (not Rule).
  3. Set the Scope option to "Not Contains" (as opposed to "Contains Any" or "Contains All").
  4. Leave the Rule tab's pattern and remedy as configured (pattern to detect, remedy command to fix it) — no change needed there.
  5. Save, then re-run Compliance Audit against a device known to contain the flagged line and confirm it now reports as non-compliant/failed rather than compliant.

Additional Information