Skip to content

rConfig - Device Configuration Property Parsing

7 mins V7 Pro

Configuration Property Extraction is a feature in rConfig that allows you to extract specific values from full device configuration outputs using regular expressions. Like SNMP properties, these extracted properties are displayed in the Device View page and included in Inventory Reports. These properties are parsed and extracted every time a configuration backup or download occurs for a device.

  1. Explicit Command Linkage: Configuration Properties are directly linked to rConfig commands, meaning the extraction process occurs each time the associated command is executed (e.g., a show run command).
  2. UI Integration: Newly created properties are accessible through the Device Details panel or the Configuration Properties table for management.
  3. Real-time Testing: You can test the functionality of a Configuration Property directly within rConfig.

Screenshot showing Configuration Properties section

Steps to Set Up Configuration Property Extraction

Section titled “Steps to Set Up Configuration Property Extraction”
  • Navigate to the Commands section.
  • Click the Configuration Properties button located at the top-right of the table.
  • Alternatively, you can access Configuration Properties from the Device Details panel.

Screenshot showing navigation to Configuration Properties

Screenshot showing navigation to Configuration Properties

Step 2: Create a New Configuration Property

Section titled “Step 2: Create a New Configuration Property”
  • Open the Configuration Properties table and click New Configuration Property.
  • Fill in the required fields:
    • Property Name: Provide a memorable name.
    • Regex Pattern: Enter the full regular expression pattern, including delimiters and any switches.
    • Command: Select the rConfig command this property will be linked to.
  • Open any configuration output for the selected command.
  • Click the Config Property Test button.
  • Select the Configuration Property to test and run it against the selected configuration output.
  • Validate the results to ensure your regex works as expected.

Tip: Use online tools like regex101.com for advanced regex validation before implementing. Gen AI tools like can also help solve advanced Regular Expressions.

Screenshot showing Configuration Property test popup

After setting up Configuration Properties, you can view the extracted values in the Device Details panel. These properties are also included in Inventory Reports for detailed analysis and auditing.

Screenshot showing Device Details panel with Configuration Properties

For inspiration, below are tested examples for extracting values from a Cisco show run configuration:

/^hostname\s+(\S+)/m
  • Description: Extracts the device hostname.
  • Example Result: router1
/ip address\s+(\d+\.\d+\.\d+\.\d+)/
  • Description: Extracts the first IP address.
  • Example Result: 192.168.50.10
/^snmp-server community\s+(\S+)/m
  • Description: Extracts the SNMP community string.
  • Example Result: public
/^ntp server\s+(\S+)/m
  • Description: Extracts the NTP server address.
  • Example Result: ie.pool.ntp.org
/^version\s+(\S+)/m
  • Description: Extracts the software version.
  • Example Result: 15.7
/^interface Loopback(\d+)/m
  • Description: Extracts all loopback interfaces.
  • Example Results: Loopback0, Loopback1, Loopback30
/^crypto pki\s+(\S+)/m
  • Example Result: trustpoint
/^ip domain name\s+(\S+)/m
  • Example Result: rconfigdev.com
/^enable secret 5 (.+)$/m
  • Example Result: $1$PYMP$ShFY8kvekfirjMFGsPnRZ0
/^ip name-server\s+(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/m
  • Example Results: 8.8.8.8, 1.1.1.1, 3.3.3.3, 4.4.4.4
/^\s*network\s+(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/m
  • Example Results: 1.1.1.1, 2.2.2.2, 5.5.5.5, 6.6.6.6
/System image file is "([^"]+)"/
  • Example Result: bootflash:packages.conf
/Configuration register is (\S+)/
  • Example Result: 0x2102
/License Level:\s+(\S+)/
  • Example Result: ax
/(\d+K bytes of physical memory)/
  • Example Result: 3984840K bytes of physical memory
/Processor board ID (\S+)/
  • Example Result: 9FM4W37HHOV

If a newly created Configuration Property is not working as expected:

  1. Ensure the regular expression is valid using the Config Property Test feature.
  2. Review configuration outputs to confirm the pattern matches.
  3. Use the debug command for troubleshooting.
  4. Validate patterns using online tools such as regex101.
  • Efficiency: Test your regex with sample configurations before implementation.
  • Scalability: Design regex patterns to accommodate variations in device configurations.
  • Documentation: Keep a record of tested regex patterns for reuse.

Configuration Property Extraction adds flexibility and precision to rConfig by enabling custom data parsing directly from device configurations. With tools for real-time testing and robust regex support, this feature ensures accurate data retrieval for enhanced device management.