Submit a ticketCall us

Webinar: Web Help Desk for HR, Facilities and Accounting Departments
This webinar will focus on use cases for HR, Facilities and Accounting.

Having a unified ticketing and asset management system for all the departments in your company can provide end-users with a seamless experience and make things easier for your IT team. Yet, with different business tasks and objectives, many departments don’t fully understand the capabilities of Web Help Desk and how the software can be customized for effective use in their departments.
Register Now.

Home > Success Center > Network Configuration Manager (NCM) > 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 Mariusz Handke on Sep 22, 2016

Views: 456 Votes: 4 Revisions: 18

Overview

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. 

Environment

  • NCM 7.0.x and later

Steps

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.

    Select_Add_New.png
     
  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. 

    create_Criteria_to_ignore.png

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.

Example

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
02:49, 22 Sep 2016

Tags

Classifications

Public