Skip to content

Configuration Property Parsing - Extract Network Data with Regex Patterns

Configuration Property Parsing - Extract Network Data with Regex Patterns

Section titled “Configuration Property Parsing - Extract Network Data with Regex Patterns”

Configuration Property Parsing extracts structured data from unstructured configuration files using regular expressions. While SNMP Polling queries devices for standardized hardware and software details, Configuration Parsing mines the gold buried in your backed-up configs—VLANs, routing protocols, ACL counts, NTP servers, and any other configuration-specific data.

Configuration Property Parsing: Intelligence from Your Configs

Section titled “Configuration Property Parsing: Intelligence from Your Configs”

Every time rConfig backs up a device configuration, it can automatically run regex patterns against the output to extract specific values. These extracted properties become dynamic device attributes, just like SNMP-polled data, available for reporting and analysis.

The magic: You define the pattern once, and rConfig extracts the data automatically with every backup. No manual parsing, no custom scripts, no spreadsheet work.

Configuration Property Parsing uses three components:

  1. Commands - The rConfig commands that generate configuration output (e.g., show running-config, display current-configuration)
  2. Regex Patterns - Regular expressions that match and capture specific values from command output
  3. Property Definitions - Named extraction rules that link regex patterns to specific commands
  1. Device backup executes (manual, scheduled, or CLI)
  2. Configuration captured for all assigned commands
  3. rConfig checks if any Configuration Properties are linked to the executed commands
  4. If yes, regex patterns run against the command output
  5. Matching values extracted and stored as device properties
  6. Properties displayed in device details and inventory reports

Key insight: Parsing happens automatically during backups. The same operation that captures configs also extracts intelligence from them.

Configuration-Specific Data: Extract details that exist only in configs—VLAN lists, BGP networks, routing protocol timers, interface descriptions, ACL names.

SNMP-Disabled Environments: Security-focused networks often disable SNMP. Configuration parsing works regardless of SNMP status.

Vendor-Specific Details: Extract proprietary configuration elements that don’t have SNMP OIDs—Cisco VRFs, Juniper policies, Aruba controller roles.

Custom Properties: Need to track custom config elements unique to your environment? Write a regex, extract the data.

Compliance Validation: Extract security settings (NTP servers, SNMP communities, syslog hosts) to verify compliance with standards.

Audit Trails: Track which devices have specific features enabled—EIGRP vs OSPF, crypto policies, QoS configurations.

  • SNMP unavailable: The only option when SNMP is disabled or unsupported
  • Configuration-centric data: Details that live in configs, not SNMP MIBs
  • Vendor-specific syntax: Parsing handles any config format with the right regex
  • Custom tracking needs: Extract anything that appears in text output
  • Already backing up: Zero additional overhead—parsing piggybacks on existing backups

See SNMP Polling Concepts for comparison, but generally:

  • Standardized hardware details: Serial numbers, model info, interface MACs
  • Runtime statistics: Uptime, CPU, memory—things not in static configs
  • Cross-vendor consistency: Standard SNMP MIBs work across vendors
  • Simpler setup: OIDs are more straightforward than regex patterns

Best practice: Use both. SNMP for standardized hardware/software details, configuration parsing for config-specific intelligence.

Configuration Properties are explicitly linked to specific commands. This means:

  • A property tied to show running-config extracts data when that command runs
  • Different properties can target different commands (show version, show ip route summary, etc.)
  • Multiple properties can extract different values from the same command output

Example scenario: You have three properties linked to show running-config:

  1. Extract hostname
  2. Extract NTP servers
  3. Extract SNMP community strings

One command execution, three automated extractions.

Configuration parsing lives and dies by regex quality. Good regex patterns are:

  • Specific enough to match only the intended values
  • Flexible enough to handle config variations
  • Efficient to avoid performance overhead
  • Tested against real configuration samples

Simple - Extracting single values with consistent syntax:

/^hostname\s+(\S+)/m

Extracts: hostname router1router1

Moderate - Extracting structured data with variations:

/^ntp server\s+(\S+)/m

Extracts: All NTP server addresses from multiple ntp server lines

Complex - Multi-line patterns or conditional matching:

/^interface\s+\S+[\s\S]*?ip address\s+(\d+\.\d+\.\d+\.\d+)/m

Extracts: IP addresses under interface configurations

Never deploy untested regex. Use tools like regex101.com to validate patterns against sample configurations before creating properties in rConfig.

Better yet, use rConfig’s built-in Config Property Test feature to test against actual device configurations stored in the system.

Common property categories:

System Information

  • Hostnames
  • Domain names
  • System images/boot files
  • Software versions
  • Configuration registers

Network Services

  • NTP servers
  • DNS servers
  • Syslog hosts
  • SNMP community strings
  • TACACS/RADIUS servers

Routing Protocols

  • BGP networks
  • OSPF/EIGRP areas
  • Redistributed routes
  • Route map names

Security Elements

  • ACL names and counts
  • Crypto policies
  • AAA configurations
  • Enable secrets (hashed)

Interface Details

  • Loopback interfaces
  • Interface descriptions
  • IP addresses
  • VLAN assignments

Hardware Identifiers

  • Processor board IDs
  • Serial numbers (when in show version output)
  • Memory specifications
  • License levels

Regex execution against configuration files is fast:

  • Each pattern: 1-10ms (typical)
  • 10 properties per device: 10-100ms additional time
  • For most deployments, this is negligible

Configuration parsing scales linearly:

  • 100 devices, 10 properties each = ~1000 regex operations
  • Even at 10ms per operation, that’s ~10 seconds total
  • Operations run in parallel during backup jobs

Larger configs take slightly longer to parse:

  • 1KB config: 5ms
  • 100KB config: 50ms
  • Performance remains excellent even for massive configs

Configuration-parsed properties join SNMP-polled properties in Device Inventory:

  • Inventory reports include both SNMP and config-parsed data
  • Properties are queryable (in future V8+ releases)
  • Historical tracking via activity logs
  • Export to external systems via API or CSV

The combination gives you comprehensive device intelligence: SNMP for standardized data, config parsing for environment-specific details.

Comparison: Config Parsing vs SNMP Polling

Section titled “Comparison: Config Parsing vs SNMP Polling”
AspectConfig ParsingSNMP Polling
Data SourceBacked-up config filesLive SNMP query
Setup ComplexityModerate (regex skills needed)Moderate (OIDs, credentials)
Data TypesConfiguration-specificHardware, software, runtime
SNMP RequiredNoYes
Vendor VariabilityHigh (config syntax varies)Low (standard MIBs)
Real-TimeReflects last backupCurrent device state
Regex KnowledgeRequired for custom patternsNot required
Works When SNMP DisabledYesNo
  • SNMP is disabled or unavailable
  • You need config-specific details (VLANs, protocols, policies)
  • The data doesn’t have a corresponding SNMP OID
  • You’re already backing up configs regularly
  • You need vendor-specific configuration elements
  • You need standardized hardware/software details
  • Real-time operational data is important (uptime, stats)
  • You want cross-vendor consistency
  • The data is available via standard MIBs
  • You need runtime information not in configs
  • Building comprehensive device inventory
  • You want both config intelligence and hardware details
  • Maximum visibility is the goal
  • Different teams need different data types

Always validate regex against real config samples. Use regex101.com or rConfig’s test feature.

Most config parsing needs ^ and $ to match line boundaries. Add the /m flag:

/^hostname\s+(\S+)/m

Use parentheses to capture the value you want:

/ip address\s+(\d+\.\d+\.\d+\.\d+)/ # Captures the IP

Use \s+ for flexible whitespace matching, \S+ for non-whitespace sequences.

Anchor patterns to avoid false matches:

/^ntp server\s+(\S+)/m # Only matches lines starting with "ntp server"

Some configs use tabs, some use spaces. Some have trailing comments. Build flexibility into patterns.

In rConfig, give properties clear names and descriptions explaining what they extract.

Configuration Property Parsing turns your configuration backups into structured data. While SNMP Polling handles standardized hardware and operational details, config parsing extracts the configuration-specific intelligence that makes your network unique.

It’s most valuable when:

  • You need config-specific data at scale
  • SNMP isn’t available or doesn’t expose the data you need
  • You’re already backing up configurations regularly
  • You want to track custom configuration elements

Combined with SNMP Polling, Configuration Parsing gives you complete visibility into your network infrastructure—hardware, software, runtime stats, and configuration intelligence—all captured automatically with every backup.