How to Create an Extension Section for the Network Switch or Network Router Patterns to Get the Firmware Version SummaryOut of the Box, Discovery does not collect or populate the Firmware version for Network Gear such as Network Switches or Network Routers. This is by design and working as expected. However some Network Device Manufacturers such as Cisco and Juniper include the Firmware version along with other data about the device in the sysDescr OID which is queried and collected during the Classification stage. You can modify the discovery logic in identification sections without changing the identification sections themselves, by adding extension sections to either the Network Switch or Network Router patterns you can parse the Firmware version from the sysDescr that was already collected during the Classification phase. This Article will show Step by Step instructions on how to implement this. This article is is intended to be a guide to help you get started with configuring your own custom pattern extension, ServiceNow Support is unable to assist with extending this to suit your environment. We can refer you to Professional Services who will be able to extend this further to meet your needs, please note that this is a billed service.ReleaseAll ReleasesInstructionsI. Create The Extension Section 1. Navigate to the Pattern Designer > Discovery Patterns module. 2. Open the Network Switch infrastructure pattern in Pattern Designer. 3. In the Extensions section Click New. 4. Name the new extension section "Get Firmware Version - Network Switch". 5. Leave the Order field to whatever it defaulted to and Click Done. II. Create A Step to Get The Firmware Version 1. Click the name of the new extension section to open it in Pattern Debugger. 2. Create the first step of the extension by selecting the Parse Variable operation and name the new step Get Cisco Firmware Version. 3. Click the Precondition Checkbox and add the condition $sysDescr Is Not Empty. 4. In the mandatory Enter Variable field enter $sysDescr. 5. From the Define Parsing choice list select Regular Expression. 6. Create a variable in the Variables section and name it fw_version. 7. In the Regular Expression field enter Cisco.*Version\s([^,]+), III. Create Additional Steps to Get The Firmware Version From Other Manufacturers (Optional) If you want to get the Firmware from other Manufacturers you can create a new step below Get Cisco Firmware Version and repeat the process with the below changes. Do this once for each Manufacturer. 1. Change the name to Get <manufacturer> Firmware Version. 2. Change the precondition to $fw_version Is Empty. 3. In the Regular Expression field enter a Regex that will parse only the firmware version. You may need to play around with this if not familiar with Regex. Below are some examples. Arista.*version\s([^\s]+) Juniper.*JUNOS\s([^,]+) IV. Set The IP Switch Table to a Temp Table We'll now preserve the attributes already collected in the Identification Section to a Temp table before modifying it to avoid any data loss. 1. Create a New Step under your last Get <manufacturer> Firmware Version step, select the Transform Table operation, and name the step Set IP Switch table to Temp Table 2. Click the Precondition Checkbox and add the condition $fw_version Is Not Empty. 3. In the * Source field enter $cmdb_ci_ip_switch 4. In the * Target field enter $temp_cmdb_ci_ip_switch 5. In the Target Field Name field enter firmware_version and in the Value field next to this enter $fw_version V. Set The Temp Table back to the IP Switch Table Now that we have the firmware_version set to the Temp Table with the other attributes from the Identification Section we can copy it back over to the IP Switch Table 1. Create a New Step under the Set IP Switch table to Temp Table step and name it Set Temp table back to IP Switch Table 2. Click the Precondition Checkbox and add the condition $fw_version Is Not Empty. 3. In the * Source field enter $temp_cmdb_ci_ip_switch 4. In the * Target field enter $cmdb_ci_ip_switch 5. In the Target Field Name field enter firmware_version and in the Value field next to this enter $fw_version VI. Save the Pattern and Sync the Pattern to MID Servers Related LinksFor the Network Router Pattern Repeat the Same Process Above and replace any instance of cmdb_ci_ip_switch with cmdb_ci_ip_router.