Configuration Property Parsing Implementation
Configuration Property Parsing in rConfig V8 Pro automatically extracts specific data points from device configuration files using regular expressions. This provides an alternative to SNMP polling for collecting device properties, particularly useful when SNMP is unavailable, disabled, or when specific configuration details aren’t exposed via SNMP. Property extraction happens automatically during device backups, integrating seamlessly with rConfig’s configuration management workflow.
Understanding Configuration Property Parsing
Section titled “Understanding Configuration Property Parsing”What It Provides
Section titled “What It Provides”Automated data extraction: Parse configuration files to extract hostnames, software versions, IP addresses, NTP servers, DNS settings, routing protocols, interface details, and any other data present in configurations.
SNMP alternative: Collect device properties when SNMP is disabled, blocked, or unsupported by extracting directly from configuration output.
Configuration-specific data: Access information that SNMP doesn’t expose, such as configured services, ACL details, routing policies, or vendor-specific settings.
Historical tracking: Track changes to extracted properties over time, providing audit trails for configuration elements.
How It Works
Section titled “How It Works”During device backups, rConfig’s parsing engine:
- Executes configured commands and captures output
- Applies defined regex patterns to command output
- Extracts values matching the patterns
- Stores extracted values as device properties
- Logs property changes for historical tracking
Properties are linked to specific commands, so extraction only occurs when those commands execute during backups.
Prerequisites
Section titled “Prerequisites”- rConfig V8 Pro installation
- Devices configured and backing up successfully
- Basic understanding of regular expressions (regex)
- Sample configuration files for testing
Step 1: Understand Property-Command Relationship
Section titled “Step 1: Understand Property-Command Relationship”Configuration Properties are linked to specific commands. Before creating properties, identify which commands generate the output you want to parse.
Common Commands by Vendor
Section titled “Common Commands by Vendor”Cisco IOS/IOS-XE:
show running-config
- Full configurationshow version
- Software/hardware detailsshow ip interface brief
- Interface summary
Juniper JUNOS:
show configuration
- Full configurationshow version
- System informationshow interfaces terse
- Interface summary
Aruba/HP:
show running-config
- Full configurationshow version
- System detailsshow vlans
- VLAN information
Critical point: Properties only extract data when their linked command executes during backups. Verify commands are included in device command groups.
Step 2: Access Configuration Properties
Section titled “Step 2: Access Configuration Properties”Navigate to Settings → Configuration → Configuration Properties to view the Configuration Properties management interface.

Step 3: Create Your First Configuration Property
Section titled “Step 3: Create Your First Configuration Property”Click Add Configuration Property and configure:
Example: Extract Hostname
Section titled “Example: Extract Hostname”Configuration:
- Name:
Hostname
(descriptive, appears in reports) - Description:
Device hostname extracted from running configuration
- Command: Select
show running-config
(or device equivalent) - Regex Pattern:
/^hostname\s+(\S+)/m
- Active: ✓ (enabled)
Click Save.
Understanding the Regex Pattern
Section titled “Understanding the Regex Pattern”/^hostname\s+(\S+)/m
Pattern breakdown:
/
- Regex delimiter (required)^
- Start of line (with/m
flag matches each line start)hostname
- Literal text to match\s+
- One or more whitespace characters(\S+)
- Capture group: One or more non-whitespace characters (extracted value)/m
- Multiline flag (makes^
and$
match line boundaries)
Matches: hostname router1
Extracts: router1
Step 4: Test Your Configuration Property
Section titled “Step 4: Test Your Configuration Property”Before deploying to production, test regex patterns against real configuration data.
Using rConfig Live Test Feature
Section titled “Using rConfig Live Test Feature”- From Configuration Properties table, click Test next to your property
- Select a device with backed-up configurations
- Select the configuration file to test against
- Click Config Property Test button
- Review results:
- Whether pattern matched
- Extracted value(s)
- Any errors
Using External Tools
Section titled “Using External Tools”For complex patterns, use regex101.com:
- Copy sample configuration section
- Paste into test string field
- Enter regex pattern
- Set flavor to PCRE (PHP)
- Verify matching and capture
- Refine until correct
Testing workflow: Always test patterns externally before creating properties in rConfig, then verify using rConfig’s test feature with actual device configurations.
Step 5: Run Backup to Extract Properties
Section titled “Step 5: Run Backup to Extract Properties”Once property is created and tested:
- Navigate to Devices → [Your Device]
- Run manual backup (or wait for scheduled backup)
- After backup completes, go to Device Details → Properties tab
- Extracted property appears with its value and timestamp

Step 6: View Properties in Inventory Reports
Section titled “Step 6: View Properties in Inventory Reports”Configuration-parsed properties integrate with inventory exports:
- Navigate to Devices → Inventory Report
- Generate report
- Download CSV/Excel
- Configuration properties appear as columns alongside SNMP properties and device fields
Regex Pattern Library
Section titled “Regex Pattern Library”Basic Extractions
Section titled “Basic Extractions”Hostname
Section titled “Hostname”/^hostname\s+(\S+)/m
Matches: hostname router1
Extracts: router1
Software Version
Section titled “Software Version”/^version\s+(\S+)/m
Matches: version 15.7
Extracts: 15.7
Domain Name
Section titled “Domain Name”/^ip domain name\s+(\S+)/m
Matches: ip domain name example.com
Extracts: example.com
Network Service Extractions
Section titled “Network Service Extractions”NTP Servers
Section titled “NTP Servers”/^ntp server\s+(\S+)/m
Matches: ntp server ie.pool.ntp.org
Extracts: ie.pool.ntp.org
Note: Multiple matches extract all NTP servers.
DNS Name Servers
Section titled “DNS Name Servers”/^ip name-server\s+(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/m
Matches: ip name-server 8.8.8.8
Extracts: 8.8.8.8
SNMP Community String
Section titled “SNMP Community String”/^snmp-server community\s+(\S+)/m
Matches: snmp-server community public RO
Extracts: public
Syslog Hosts
Section titled “Syslog Hosts”/^logging host\s+(\S+)/m
Matches: logging host 192.168.1.10
Extracts: 192.168.1.10
Interface Extractions
Section titled “Interface Extractions”Loopback Interfaces
Section titled “Loopback Interfaces”/^interface Loopback(\d+)/m
Matches: interface Loopback0
Extracts: 0
For full interface name:
/^interface (Loopback\d+)/m
Extracts: Loopback0
IP Addresses
Section titled “IP Addresses”/ip address\s+(\d+\.\d+\.\d+\.\d+)/
Matches: ip address 192.168.1.1 255.255.255.0
Extracts: 192.168.1.1
Routing Protocol Extractions
Section titled “Routing Protocol Extractions”BGP Networks
Section titled “BGP Networks”/^\s*network\s+(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/m
Matches: network 10.0.0.0
Extracts: 10.0.0.0
Context: Within BGP configuration sections.
OSPF Process IDs
Section titled “OSPF Process IDs”/^router ospf\s+(\d+)/m
Matches: router ospf 100
Extracts: 100
Hardware/System Extractions
Section titled “Hardware/System Extractions”Processor Board ID
Section titled “Processor Board ID”/Processor board ID (\S+)/
Matches: Processor board ID 9FM4W37HHOV
Extracts: 9FM4W37HHOV
System Image File
Section titled “System Image File”/System image file is "([^"]+)"/
Matches: System image file is "bootflash:packages.conf"
Extracts: bootflash:packages.conf
Configuration Register
Section titled “Configuration Register”/Configuration register is (\S+)/
Matches: Configuration register is 0x2102
Extracts: 0x2102
Memory Size
Section titled “Memory Size”/(\d+K bytes of physical memory)/
Matches: 3984840K bytes of physical memory
Extracts: 3984840K bytes of physical memory
License Level
Section titled “License Level”/License Level:\s+(\S+)/
Matches: License Level: ax
Extracts: ax
Security Extractions
Section titled “Security Extractions”Enable Secret (Hashed)
Section titled “Enable Secret (Hashed)”/^enable secret 5 (.+)$/m
Matches: enable secret 5 $1$PYMP$ShFY8kvekfirjMFGsPnRZ0
Extracts: $1$PYMP$ShFY8kvekfirjMFGsPnRZ0
Crypto Key Names
Section titled “Crypto Key Names”/^crypto pki trustpoint\s+(\S+)/m
Matches: crypto pki trustpoint myCA
Extracts: myCA
Advanced Regex Patterns
Section titled “Advanced Regex Patterns”Multiple Line Matching
Section titled “Multiple Line Matching”Extract values requiring context across multiple lines:
/^interface GigabitEthernet0\/0[\s\S]*?ip address\s+(\d+\.\d+\.\d+\.\d+)/m
Purpose: Extract IP address specifically from GigabitEthernet0/0 interface block.
Explanation: [\s\S]*?
matches any characters (including newlines) non-greedily until finding the IP address pattern within that interface block.
Optional Elements
Section titled “Optional Elements”Handle configurations where elements may or may not be present:
/^ntp server\s+(\S+)(?:\s+prefer)?/m
Purpose: Extract NTP server whether or not prefer
keyword is present.
Explanation: (?:\s+prefer)?
is a non-capturing optional group matching the prefer keyword if present.
Named Capture Groups
Section titled “Named Capture Groups”For clarity in complex patterns:
/^interface\s+(?<interface>\S+)[\s\S]*?ip address\s+(?<ip>\d+\.\d+\.\d+\.\d+)/m
Purpose: Extract both interface name and IP address with clear naming.
Note: Named groups improve readability but rConfig extracts the first captured group by default.
Best Practices
Section titled “Best Practices”Start Simple
Section titled “Start Simple”Begin with basic single-line extractions. Test thoroughly before adding complexity. A working simple pattern is better than a broken complex one.
Test Extensively
Section titled “Test Extensively”Never deploy untested patterns. Use both regex101.com and rConfig’s test feature against real configurations before enabling properties.
Document Thoroughly
Section titled “Document Thoroughly”Use clear property names and detailed descriptions explaining what’s extracted and why.
Good: NTP Servers
with description Extracts all configured NTP server addresses from running configuration
Bad: regex1
with no description
Handle Vendor Variations
Section titled “Handle Vendor Variations”Different vendors use different syntax for the same concept:
Cisco: ntp server 1.1.1.1
Juniper: set system ntp server 1.1.1.1
Create vendor-specific properties or flexible regex patterns accommodating variations.
Expect Multiple Matches
Section titled “Expect Multiple Matches”Some properties (NTP servers, DNS servers, interfaces) naturally return multiple values. This is expected and supported—rConfig stores all matches.
Link to Correct Commands
Section titled “Link to Correct Commands”Verify your property links to commands actually executing on target devices. A perfect regex pattern linked to a non-existent command extracts nothing.
Monitor Extraction Success
Section titled “Monitor Extraction Success”Review logs periodically to verify properties extract successfully across your device population. Look for patterns of failures indicating regex issues or command problems.
Keep Patterns Efficient
Section titled “Keep Patterns Efficient”Avoid overly complex regex causing performance issues. If a pattern takes >100ms to execute, simplify it or break into multiple properties.
Troubleshooting
Section titled “Troubleshooting”Property Not Extracting Values
Section titled “Property Not Extracting Values”Symptoms: Property shows in device details but has no value or NULL value.
Diagnosis and resolution:
-
Regex doesn’t match configuration format
- Test regex against actual config using rConfig test feature or regex101.com
- Verify pattern matches your device’s specific output format
- Check for vendor variations in syntax
-
Property linked to wrong command
- Verify command assigned to property matches command actually executing
- Check device’s command group includes the required command
- Review backup logs to confirm command executed
-
Command not executing during backup
- Verify command exists in device’s command group
- Check command is enabled and not disabled
- Review backup logs for command execution
-
Regex syntax error
- Validate syntax in regex101.com with PCRE (PHP) flavor
- Check for unescaped special characters
- Verify delimiters and flags are correct
-
Missing multiline flag
- Add
/m
flag to pattern:/pattern/m
- Required when using
^
or$
anchors to match line boundaries
- Add
Debugging steps:
# View recent parsing logstail -f /var/www/html/rconfig8/current/storage/logs/laravel.log | grep -i "property\|parsing"
# Check if command output existsls -la /var/www/html/rconfig8/current/storage/app/config_files/
Property Extracts Wrong Values
Section titled “Property Extracts Wrong Values”Symptoms: Property extracts data but it’s incorrect, incomplete, or includes unwanted text.
Possible causes and resolutions:
-
Regex too broad
- Add anchors:
^
for line start,$
for line end - Make matching more specific with additional context
- Example: Change
/hostname (\S+)/
to/^hostname\s+(\S+)/m
- Add anchors:
-
Capture group positioning wrong
- Verify parentheses capture only desired value
- Check for multiple capture groups (rConfig uses first)
- Test in regex101.com to see what’s captured
-
Pattern matches more than intended
- Add more specific context before/after capture
- Use word boundaries:
\b
- Add negative lookaheads/lookbehinds for exclusions
Example fix:
# Too broad - matches comments too/hostname (\S+)/
# Better - anchored to line start, requires whitespace/^hostname\s+(\S+)/m
Multiple Unwanted Matches
Section titled “Multiple Unwanted Matches”Symptoms: Property extracts too many values, including unintended matches.
Resolution:
-
Make pattern more specific:
# Too broad/server (\S+)/# More specific - only NTP servers/^ntp server\s+(\S+)/m -
Add context requirements:
# Only match within specific section/^router bgp \d+[\s\S]*?network\s+(\d+\.\d+\.\d+\.\d+)/m -
Use negative lookbehind/lookahead:
# Match IP but not if followed by "secondary"/ip address\s+(\d+\.\d+\.\d+\.\d+)(?!\s+\d+\.\d+\.\d+\.\d+\s+secondary)/
Performance Issues
Section titled “Performance Issues”Symptoms: Backups slow down significantly after adding properties, or timeouts occur.
Possible causes and resolutions:
-
Overly complex regex with catastrophic backtracking
- Simplify pattern
- Avoid nested quantifiers:
(a+)+
- Use possessive quantifiers:
++
or atomic groups:(?>...)
- Test pattern performance in regex101.com debugger
-
Too many properties per command
- Limit to 10-15 properties per command
- Combine related extractions into fewer, more efficient patterns
- Prioritize essential properties
-
Very large configuration files
- Consider extracting only from specific sections
- Use more targeted patterns rather than
.*
or[\s\S]*
Viewing and Managing Properties
Section titled “Viewing and Managing Properties”Device Details Panel
Section titled “Device Details Panel”Access extracted properties for specific devices:
- Navigate to Devices → [Device Name]
- Click Properties tab
- View all SNMP-polled and configuration-parsed properties with values and timestamps
Configuration Properties Management
Section titled “Configuration Properties Management”Manage all property definitions:
- Navigate to Settings → Configuration → Configuration Properties
- View, edit, delete, or test properties
- Enable/disable properties without deleting
- Clone properties for creating variations

Integration with Other Features
Section titled “Integration with Other Features”Device Inventory Reports
Section titled “Device Inventory Reports”Configuration properties appear in inventory exports alongside:
- Device core fields (hostname, IP, vendor, model)
- SNMP-polled properties
- Custom fields
Export workflow:
- Navigate to Devices → Inventory Report
- Select devices or groups
- Generate and download report
- All properties appear as columns
Activity Logs
Section titled “Activity Logs”All property extraction events are logged:
- Navigate to Settings → Logs → Activity Logs
- Filter by device name or property name
- Review extraction success/failure and value changes
- Export logs for analysis
API Access
Section titled “API Access”Properties are accessible via rConfig API:
# Get device propertiescurl -X GET https://rconfig.example.com/api/devices/123/properties \ -H "Authorization: Bearer YOUR_API_TOKEN"
Response includes both SNMP and configuration-parsed properties.
Practical Use Cases
Section titled “Practical Use Cases”Compliance Validation
Section titled “Compliance Validation”Goal: Verify all devices use approved NTP servers.
Implementation:
- Property Name:
NTP Servers
- Regex:
/^ntp server\s+(\S+)/m
- Workflow: Export inventory, filter for devices with non-approved NTP servers, generate remediation list
Version Auditing
Section titled “Version Auditing”Goal: Identify devices running outdated software.
Implementation:
- Property Name:
Software Version
- Regex:
/^version\s+(\S+)/m
- Workflow: Export inventory, identify devices below minimum version, prioritize upgrades
DNS Consistency
Section titled “DNS Consistency”Goal: Ensure all devices use corporate DNS servers.
Implementation:
- Property Name:
DNS Name Servers
- Regex:
/^ip name-server\s+(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/m
- Workflow: Verify all devices list approved DNS servers, identify non-compliant configurations
Security Audit
Section titled “Security Audit”Goal: Track which devices have enable secrets configured.
Implementation:
- Property Name:
Enable Secret Configured
- Regex:
/^enable secret/m
- Workflow: Identify devices missing enable secrets, ensure password policies enforced
Related Documentation
Section titled “Related Documentation”- Configuration Property Parsing Concepts - Understanding when to use config parsing
- SNMP Polling Implementation - Complementary extraction method
- Device Inventory - How properties integrate with inventory
- Commands - Configuring commands for property extraction
Quick Reference
Section titled “Quick Reference”Common Regex Elements
Section titled “Common Regex Elements”Pattern | Meaning |
---|---|
^ | Start of line (with /m flag) |
$ | End of line (with /m flag) |
\s | Whitespace character |
\S | Non-whitespace character |
\d | Digit (0-9) |
+ | One or more of preceding |
* | Zero or more of preceding |
? | Zero or one of preceding (optional) |
() | Capture group (extracts value) |
(?:) | Non-capturing group |
. | Any character except newline |
[\s\S] | Any character including newline |
/m | Multiline flag |
/i | Case-insensitive flag |
Testing Workflow
Section titled “Testing Workflow”- Identify target data in sample configuration
- Write regex pattern
- Test in regex101.com (PCRE/PHP flavor)
- Create property in rConfig
- Test using rConfig test feature
- Run backup on test device
- Verify extraction in device properties
- Deploy to production devices
Property Creation Checklist
Section titled “Property Creation Checklist”Summary
Section titled “Summary”Configuration Property Parsing provides powerful automated data extraction from device configurations using regular expressions. This capability complements SNMP polling, enabling comprehensive device inventory management even when SNMP is unavailable or when configuration-specific data is required.
Key Takeaways
Section titled “Key Takeaways”Regex-based extraction: Properties use regular expressions to extract specific values from command output, providing flexibility for any data present in configurations.
Command linkage: Properties only extract when linked commands execute during backups. Verify command inclusion in device command groups.
Test thoroughly: Always test regex patterns with regex101.com and rConfig’s test feature before production deployment to avoid extraction failures.
Start simple, expand strategically: Begin with basic single-line patterns, verify they work, then add complexity as needed for advanced extractions.
Document extensively: Clear names and descriptions are essential for maintainability, especially when multiple administrators manage properties.
Monitor and optimize: Review logs regularly to track extraction success rates, identify failing patterns, and optimize performance.
With properly configured properties, rConfig automatically maintains up-to-date device inventory from configuration data, supporting compliance validation, version auditing, and operational visibility across your network infrastructure.