Submit a ticketCall us

AnnouncementsFace your biggest database issues head-on

Our new eCourse helps you navigate SQL Server performance blocks by teaching you how to recognize and deal with the three DBA Disruptors: Performance Hog, Blame Shifter, and Query Blocker. Register today to learn how to defend your environment and fend off menacing disruptions.

Register for your free eCourse.

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 Mariusz Handke on Sep 22, 2016

Views: 2,989 Votes: 5 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

Tags

Classifications

Public