Submit a ticketCall us

whitepaperYour VM Perplexities Called, and They Need You to Read This.

Virtualization can give you enormous flexibility with future workloads and can be a key enabler for other areas, like cloud computing and disaster recovery. So, how can you get a handle on the performance challenges in your virtual environment and manage deployments without erasing the potential upside? Learn the four key areas you need to be focusing on to help deliver a healthy and well-performing data center.

Get your free white paper.

Home > Success Center > Network Configuration Manager (NCM) > NCM - Knowledgebase Articles > How do I ignore lines in downloaded configs when comparing in NCM

How do I ignore lines in downloaded configs when comparing in NCM

Created by Bill Corgey, last modified by Diane R. Medroso on Nov 08, 2018

Views: 3,377 Votes: 6 Revisions: 20

Updated October 22, 2018


Comparing device configurations is one of NCM's most important features. You can use NCM to compare device configurations from one point in time to another. Or, when downloading a configuration, you can do a comparison and save the configuration only if there are differences.


In many cases, you want the comparison to ignore differences for certain lines. When you compare a running config to a startup config, the startup config sometimes has lines that start with ! (example: !Time). But the corresponding lines in the running config contain words or are blank. To prevent these lines from being identified as different, you can use a Regular Expression (RegEx) to tell NCM to ignore lines that begin with specific characters. 


  • NCM 7.0.x and later


Creating a Regular Expression pattern for ignoring lines

  1. Open the Orion Web Console and choose Settings > NCM Settings > Comparison Criteria In the Configs resource.

    Acccess the orion web console.png
  2. After the Comparison Criteria list is populated, click Add New.

  3. Enter a Title and the appropriate RegEx pattern. Add a Comment if necessary and select Enable NCM to ignore this pattern. Then click OK.

    Note: In the following example ^!Time ignores all lines that begin with !Time. To ignore any line that begins with !, enter ^! as the RegEx pattern. 


To verify that the RegEx pattern provides the expected results, compare two configs that previously returned differences for lines that now should be ignored. 

Reflecting the change in charts and Config Change Reports

In order for charts and Config Change Reports to reflect that these lines are being ignored, download new configs for the devices where these lines were identified as different. When the tables in the database are updated, NCM will use the data to populate the charts and reports. 

Guidelines for using RegEx in NCM

  • NCM comparison can use Regular Expressions to ignore individual lines. You cannot write a .NET-compliant RegEx to ignore multiple lines. You must create a RegEx for each line.
  • NCM also samples in BLOBs. The BLOB can consist of several lines. If a single line of the BLOB is not properly ignored, the entire BLOB will be identified as different.
  • It is best to keep the expressions as simple as possible. Most lines can be safely ignored with only one or two words in the line being represented in the Regular Expression comparison criteria.


The following example shows some common differences found when NCM compares a running config to a startup config.






Line 1 - ! = !  (no change)

Line 2 - the !Last configuration change is not  on the same line in the running config

Line 3 - the !NVRAM is not  on the same line in the running config

Line 4 - the ! is not  on the same line in the running config


In order to have NCM ignore Line 4, you can add the RegEx pattern ^!, which ignores any line with a ! at the beginning. This pattern causes NCM to ignore all three lines, so you don't need separate RegEx patterns to ignore ! followed by another word, such as !NVRAM or !Time



Last modified