Network Management

NCM compliance rule to find a string for a RegEx does not work

When using a find string in a Compliance/Policy rule for a line in a configuration that is literally a Regular Expression, it will fail to match.

First published date

10/11/2018 3:58 PM

Last published date

6/21/2023 6:47 PM

Overview

When using a find string in a compliance/policy rule for a line in a configuration that is literally a regular expression, it fails to find a match.

Product section

Network Configuration Manager

Cause

NA

Resolution

By default, when using a ‘Find String' in a compliance/policy rule, some characters are still interpreted as patterns in a regular expression; for device configuration lines that contain these characters, the policy will not match without escaping (‘\’) these characters.

This behavior can be changed to process strings exactly as they appear without interpreting any characters. To change the default behavior:

  1. Open the Orion Platform Advanced Configuration Global Settings page.
  2. Scroll to the NCM.BusinessLayer category and select the ComplianceRegexEscapeEnabled checkbox.

Please note that if there have already been workarounds where one has escaped out the special characters/regular expression to work, enabling this feature will break these rules, so they must be adjusted accordingly.