Use configuration parsers

Add-on product: Configuration Manager extends Itential Platform with configuration compliance and validation capabilities. It requires Itential Platform as a prerequisite. View platform overview

Configuration parsers define syntax rules for CLI Golden Configurations. Use them to ensure Configuration Manager correctly interprets device configurations for compliance checking.

What are configuration parsers?

Configuration parsers specify how Configuration Manager should read and compare CLI configurations. They define the syntax rules, command structure, and comparison logic for specific device operating systems.

Why parsers matter

Different network operating systems use different CLI syntax:

  • Cisco IOS: Hierarchical with indentation
  • Juniper Junos: XML-like with braces
  • Arista EOS: Similar to Cisco with variations
  • Palo Alto: Set-based commands

Parsers ensure Configuration Manager handles each syntax correctly during compliance checks.

Available parsers

Configuration Manager includes pre-built parsers for common platforms:

ParserOperating SystemVendor
cisco-iosIOS and IOS-XECisco
cisco-nxosNX-OSCisco
cisco-iosxrIOS-XRCisco
juniper-junosJunos OSJuniper
arista-eosEOSArista
paloalto-panosPAN-OSPalo Alto Networks

How parsers work

Parsers process configurations through these steps:

1

Tokenize

Break configuration text into commands and parameters

2

Parse structure

Identify hierarchical relationships and command blocks

3

Normalize

Convert to standardized format for comparison

4

Compare

Match device configuration against golden configuration

5

Report differences

Identify and highlight non-compliant sections

Select a parser

Choose a parser when creating a CLI golden configuration.

To select a parser:

1

Create golden configuration

Click Create (+) and select Golden Configuration

2

Choose CLI type

Select CLI as the configuration type

3

Select parser

Choose the parser that matches your device OS

4

Create

Click Create to use the selected parser

The parser cannot be changed after creating a golden configuration. Choose carefully based on your device OS type.

Parser behavior

Cisco IOS parser

Syntax characteristics:

  • Hierarchical indentation
  • Exclamation marks for comments
  • “no” prefix to negate commands

Example:

interface GigabitEthernet0/1
description Uplink
ip address 10.0.1.1 255.255.255.0
no shutdown
!
router ospf 100
network 10.0.0.0 0.0.255.255 area 0

Parser behavior:

  • Recognizes indentation-based hierarchy
  • Treats ”!” as section delimiter
  • Handles “no” command negation
  • Normalizes whitespace

Juniper Junos parser

Syntax characteristics:

  • Brace-based hierarchy
  • Semicolon statement terminators
  • Set command format

Example:

interfaces {
ge-0/0/1 {
description "Uplink";
unit 0 {
family inet {
address 10.0.1.1/24;
}
}
}
}

Parser behavior:

  • Recognizes brace hierarchy
  • Handles semicolon delimiters
  • Supports set command format
  • Normalizes brace placement

Arista EOS parser

Syntax characteristics:

  • Similar to Cisco IOS
  • Additional EOS-specific commands
  • YAML-like structures for some features

Example:

interface Ethernet1
description Uplink
no switchport
ip address 10.0.1.1/24
!
router ospf 100
network 10.0.0.0/16 area 0.0.0.0

Parser behavior:

  • Handles IOS-like syntax
  • Recognizes EOS extensions
  • Supports CIDR notation
  • Normalizes command variations

Parser comparison rules

Parsers apply these rules during compliance checks:

Whitespace handling

Parsers normalize whitespace:

  • Leading and trailing spaces ignored
  • Multiple spaces treated as single space
  • Tab characters converted to spaces

Example:

# These are equivalent:
ip address 10.0.1.1 255.255.255.0
ip address 10.0.1.1 255.255.255.0

Comment handling

Comments are typically ignored:

  • Cisco: Lines starting with ”!”
  • Juniper: Lines with ”/” and ”/”
  • Configuration comments don’t affect compliance

Example:

# These are equivalent:
! Production interface
interface GigabitEthernet0/1
interface GigabitEthernet0/1

Command ordering

Most parsers treat unordered commands as equivalent:

  • Commands at same hierarchy level
  • Order doesn’t affect compliance
  • Exception: Ordered sections with CLI ordering markers

Case sensitivity

Parser case handling varies:

  • Commands: Usually case-insensitive
  • Values: May be case-sensitive
  • Check parser documentation for specifics

Customize parser behavior

Configure parser options

Some parsers support configuration options:

1

Open Configuration Manager settings

Navigate to Admin Essentials

2

Select Configuration Manager

Open Configuration Manager settings

3

Configure parser options

  • Set comparison strictness
  • Define custom ignore patterns
  • Configure normalization rules
4

Save settings

Apply parser configuration

Ignore patterns

Configure patterns to exclude from compliance:

Examples:

# Ignore timestamp comments
pattern: ^! Last modification:
# Ignore system-generated names
pattern: ^crypto key.*
# Ignore version banners
pattern: ^banner motd

Troubleshoot parser issues

Compliance fails unexpectedly

If compliance fails despite matching configurations:

1

Check parser selection

Verify correct parser for device OS

2

Review syntax

Ensure golden config uses correct syntax

3

Test normalization

Check if whitespace or comments cause issues

4

Validate structure

Confirm hierarchical structure matches parser expectations

Parser errors

If parser reports errors:

1

Validate syntax

Check configuration for syntax errors

2

Check special characters

Verify quotes, braces, and delimiters are correct

3

Review indentation

Ensure proper indentation for hierarchical parsers

4

Test with simple config

Isolate problem by testing with minimal configuration

Best practices

Choose the right parser:

  • Match parser to device OS exactly
  • Don’t use cisco-ios parser for cisco-nxos
  • Test parser with sample configurations
  • Verify parser handles your command set

Write clean configurations:

  • Use consistent indentation
  • Add clear comments for documentation
  • Follow vendor syntax guidelines
  • Avoid vendor-specific shortcuts

Test thoroughly:

  • Validate golden configs with parser
  • Test compliance with known-good devices
  • Verify parser handles edge cases
  • Check for false positives/negatives

Handle parser limitations:

  • Document unsupported commands
  • Use custom ignore patterns for exceptions
  • Consider alternative comparison methods for complex cases
  • Report parser issues to Itential support

Next steps