Exclusion Rules
Use the Exclusion Rules page to manage the rules that define which lines or blocks of code to ignore when comparing configurations. Ignoring expected or inconsequential differences helps streamline the comparison process and reduce the noise.
Ignoring non-substantive differences, such as timestamps, empty lines, hostnames, or certificate blocks, makes it easier to focus on meaningful changes. It also prevents SolarWinds Observability SaaS from flagging expected differences when comparing a downloaded configuration to a baseline.
SolarWinds Observability SaaS uses regular expressions to identify content to ignore during comparisons.
Types of exclusion rules
Predefined exclusion rules
Each organization has a default set of exclusion rules, previously used as an ignore baseline in Configuration Management.
-
You can enable or disable predefined rules.
-
Edit predefined rules to fit your needs.
-
Delete predefined exclusion rules.
Custom exclusion rules
You can create your own exclusion rules using regular expressions.
The patterns must follow ECMAScript syntax. For syntax details, see Regular expression syntax cheat sheet.
See Regular expression examples for some regular expressions that are commonly used to exclude lines and blocks. Other resources, such as www.Regular-Expressions.info, are available online to help you learn more about regular expressions.
Create an exclusion rule
Create a regular expression to identify what should be ignored when comparing configurations.
-
Click Settings > Configuration Management > Exclusion Rules, and then click Create Exclusion Rule.
Exclusion Rules can also be accessed from configuration text diffs. Open a device configuration diff under Network > Configuration Management > Config Changes, then either:Open the Create Exclusion Rule modal directly from the diff view to create a rule based on the selected configuration, or
Click the link in the diff view to navigate to Settings > Configuration Management > Exclusion Rules to review and manage all rules.
-
Enter a descriptive name.
-
Choose the type of match:
-
To exclude a single line, select Match Lines and enter a regular expression that identifies the beginning of the line into the Regular Expression box.
-
To exclude a block of text:
-
Select Match Blocks.
-
Enter a regular expression that identifies the beginning of the block into Block Start.
Consider generating regex patterns automatically using AI. See Generate regex patterns using AI.
-
Enter a regular expression that identifies the end of the block into Block End.
The search for the pattern that identifies the end of the block is "lazy." That means if the pattern occurs multiple times, only the first occurrence of the pattern is found.
-
-
-
Optionally, you can add more details about this exclusion rule into Comments.
-
Test the new exclusion rule:
-
Select a network device.
-
Select a configuration (Running or Startup).
The configuration appears on the right. Ignored lines or blocks are highlighted.
-
-
Enable the exclusion rule to apply it during comparisons.
-
Click Save to return to the Exclusion Rules page.
Regular expression examples
The following are examples of regular expression patterns you can use to exclude configuration lines or blocks from comparison.
| Match | Regular Expression/Block Start | Block End | Description |
|---|---|---|---|
| Lines | ^! Last
|
N/A | Ignores the !Last Configuration change line in Cisco configurations. |
| Lines | ^!Time:
|
N/A | Ignores the line with time settings, such as !Time: Fri Sep 12 05:52:54 2025. |
| Lines | ^ntp clock-period
|
N/A |
Ignores the |
| Lines | ^wlccp ap username cisco
|
N/A | Ignores the wlccp line in Cisco access point configurations. |
| Block | certificate ca
|
quit
|
Ignores all lines in a certificate block that starts with certificate ca and ends with quit. |
| Block | ^!Command
|
version \S+
|
This ignored a whole Cisco configuration header, such as: !Command: show startup-config !Time: Fri Sep 12 05:52:54 2025 !Startup config saved at: Mon Sep 8 13:14:41 2025 version 5.2(1)N1(1) |
Generate regex patterns using AI
Create regular expression patterns from configuration lines using AI.
SolarWinds recommends caution when using AI-generated patterns.
- Always review and validate any generated patterns before using them.
- Do not share confidential or sensitive data with the AI model.
Known Limitations
- Generated patterns may need adjustments. Review all patterns before use.
- Whitespace: Extra or missing spaces may be simplified or removed.
- Command keywords: Variable parts, such as interface names, or IPs, may appear as fixed text.
- Structured data: JSON or similar formats may be altered or incomplete.
Enable/Disable AI Regex Generator
By default, the AI Regex Generator is enabled. When creating an exclusion rule, you can see the Create Pattern button in the Match Pattern tile.
-
Go to Settings > AI.
-
Toggle AI Regex Generator on/off.
Generate regex patterns using AI
-
In Match Preview, select a device and configuration file.
-
Select a line or block of lines:
-
Single line: Click the line.
-
Block of lines:
- Drag and Drop: Click and hold the first line, drag to the last line, then release.
- Shift + Click: Click the first line, hold Shift, then click the last line.
Only the first and last lines of the block are sent to the AI.
-
-
Click Generate Pattern.
- The generated pattern appears in the Regular Expression input fields.
- Existing patterns are overwritten.
- The correct matching mode (lines or blocks) is applied automatically.
You can use the generated pattern as-is or edit it.
Change or clear selection
-
Click a different line to change the selection.
-
Click the selected line again or select Clear Selection in the toolbar to remove the selection.
Enable/disable exclusion rules
To ensure that lines/blocks are ignored, the exclusion rule must be enabled.
To temporarily include lines/blocks when comparing configurations, disable the exclusion rule.
-
Click Settings > Configuration Management > Exclusion Rules.
-
To enable an exclusion rule, click the vertical ellipsis next to it and click Enable.
-
To disable an exclusion rule, click the vertical ellipsis next to it and click Disable.
Edit an exclusion rule
To change the regular expression or its name, complete these steps:
-
Click Settings > Configuration Management > Exclusion Rules.
-
Click the vertical ellipsis for an exclusion rule and click Edit. Update the exclusion rule definition and save your changes.
Delete exclusion rules
If an exclusion rule is no longer relevant, delete it.
-
Click Settings > Configuration Management > Exclusion Rules.
-
Click the vertical ellipsis for an exclusion rule and click Delete. The rule is removed and no longer affects comparisons.