How to Create a Discovery Pattern Extension Section for an SNMP-Based Pattern to Query Custom OIDs<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } .kb-wrapper { font-family: Lato, sans-serif; font-size: 12pt; line-height: 1.7; color: #1a1a1a; max-width: 100%; } .kb-wrapper h2 { font-size: 14pt; font-weight: 900; color: #032D42; border-bottom: 2px solid #e8fce4; padding-bottom: 4px; margin-top: 28px; margin-bottom: 12px; } .kb-wrapper h3 { font-size: 12pt; font-weight: 900; color: #032D42; margin-top: 20px; margin-bottom: 8px; } .kb-wrapper p { margin: 0 0 10px 0; } .kb-wrapper ul, .kb-wrapper ol { margin: 0 0 12px 0; padding-left: 24px; } .kb-wrapper ul > li, .kb-wrapper ol > li { margin-bottom: 6px; } /* Numbered steps */ .kb-wrapper .steps-list { list-style: none; padding-left: 0; counter-reset: step-counter; } .kb-wrapper .steps-list > li { counter-increment: step-counter; display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px; } .kb-wrapper .steps-list > li::before { content: counter(step-counter); min-width: 28px; height: 28px; background-color: #032D42; color: #63DF4E; font-size: 11pt; font-weight: 900; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; } .kb-wrapper .steps-list > li .step-body { flex: 1; } .kb-wrapper .steps-list > li .step-body p { margin: 0 0 6px 0; } .kb-wrapper .steps-list > li .step-body ul { margin-top: 6px; } /* Note callout */ .kb-wrapper .callout-note { border-left: 4px solid #52B8FF; background: #e6f4ff; padding: 10px 14px; margin: 14px 0; font-size: 12pt; } .kb-wrapper .callout-warning { border-left: 4px solid #e6a817; background: #fff4e0; padding: 10px 14px; margin: 14px 0; font-size: 12pt; } /* Inline code */ .kb-wrapper code { background: #e6f0f5; color: #032D42; border: 1px solid #b8cfd8; border-radius: 3px; padding: 1px 5px; font-size: 11pt; font-family: 'Courier New', monospace; } /* Related links */ .kb-wrapper .related-links a { color: #032D42; text-decoration: underline; } .kb-wrapper .related-links ul { list-style: disc; padding-left: 24px; } .kb-wrapper .related-links ul > li { margin-bottom: 6px; } .kb-wrapper .link-disclaimer { font-size: 10pt; font-style: italic; margin: 2px 0 8px 0; color: #444; } Summary This article describes how to create a Pattern Extension section within an existing SNMP-based Discovery pattern to add custom steps that query OIDs not included in the out-of-the-box (OOB) pattern. Extension sections allow additional data collection using MIB libraries installed on the MID Server without modifying the base pattern. Facts Pattern Extensions allow custom steps to be added to an existing pattern without directly modifying it, preserving upgradability.SNMP-based patterns communicate with target devices via the MID Server using SNMP probes.The MID Server ships with a set of OOB MIB libraries. Additional vendor-specific MIBs can be installed on the MID Server to expand OID query capability.Extension sections run in the context of the pattern's existing connection and can leverage the same SNMP session established by the base pattern.Variables populated by OID queries in extension steps can be used to set CI attributes or perform conditional logic just as in standard pattern steps.Pattern Extensions are stored as separate records from the base pattern and are not overwritten during upgrades. Release All Versions Instructions Prerequisites Before creating the extension, confirm the following: The target OIDs are defined in a MIB file that is installed on the MID Server. Verify by navigating to MID Server > MIB Modules and confirming the relevant MIB module is listed. If the MIB is not yet loaded, see KB2988825 How to Load an SNMP MIB Module for a MID Server to use for Discovery.The base SNMP pattern has been identified and is discoverable in the Pattern Designer (navigate to Discovery Definition > Pattern Designer or All > Pattern Designer).You have the itil_admin or discovery_admin role, or equivalent write access to Discovery patterns. Note: Avoid modifying the OOB base pattern directly. Using Pattern Extensions keeps customizations separate from the base pattern and reduces the risk of those changes being overwritten. Customers retain full ownership of any custom extension logic and are responsible for maintaining it across upgrades. Create the Pattern Extension Section Navigate to Discovery Definition > Pattern Designer and open the SNMP-based pattern you want to extend. In the pattern record, locate the Extensions tab (or the Extension Sections related list, depending on your release). Click New to create a new extension section. Provide a descriptive Name for the extension section that identifies its purpose (for example, Custom OID Collection - Vendor MIB). Set the Pattern field to the base SNMP pattern you are extending. Set the Section type to Extension if not already defaulted. Save the extension section record to enable step authoring. Add SNMP OID Query Steps Within the extension section, click Add Step and select SNMP as the step type. In the step configuration, set the Operation to the appropriate SNMP operation for your use case: Get — retrieves the value of a single OID.Get Next — walks to the next OID in the MIB tree.Walk — retrieves all OIDs beneath a given OID subtree (table walk). In the OID field, enter the OID you want to query. You may enter the numeric OID (for example, 1.3.6.1.4.1.9.9.109.1.1.1.1.3) or, if the MIB is loaded on the MID Server, the human-readable OID name from the MIB (for example, cpmCPUTotal5minRev). Note: Using the numeric OID is more reliable when the human-readable name may not resolve consistently across environments. Verify OID availability in the MIB module list before using the named form. Define the Output variable name where the OID query result will be stored (for example, cpu_utilization_5min). This variable is available to subsequent steps in the extension section. If the OID returns a table (multiple rows), enable the Multi-row or Table option as applicable, and configure the variable mapping to capture each column's value. Add additional SNMP steps as needed for each OID you want to query. Repeat steps 1–5 of this section for each additional OID. Map Results to CI Attributes After the SNMP query step(s), add a Set Parameter Value step (or equivalent field-mapping step in your release) to write the queried value into the target CI class attribute. In the step configuration, select the CI attribute (field) on the target CI class where the value should be stored, and map it to the output variable populated by the preceding SNMP step. If the queried value requires transformation (for example, unit conversion or string parsing), add a Parse Variables or Run Script step between the SNMP query and the attribute mapping step to process the raw OID value before writing it to the CI. Validate and Test Save all steps in the extension section. Use the Test Pattern functionality in the Pattern Designer to run the pattern against a known SNMP-enabled target device. Supply a target IP address that is reachable by the MID Server. Review the pattern execution log output. Confirm that: The SNMP steps in the extension section executed without errors.The expected OID values were returned and stored in the output variables.The CI attribute mapping steps wrote the values to the correct fields on the CI record. If an OID query returns no data or an error, verify the following: The MIB containing the OID is installed on the MID Server (MID Server > MIB Modules).The target device supports the queried OID and returns a value via SNMP for that device type.The SNMP credentials (community string or SNMPv3 credentials) used by Discovery have sufficient permissions to query the OID.The MID Server is reachable from the target device on the SNMP port (default UDP 161). Warning: SNMP Walk operations against large MIB subtrees can generate significant network traffic and increase discovery execution time. Scope Walk operations to the minimum required OID subtree to limit impact. Related Links Enhance patterns without changing their identification logicSNMP probe MIB modulesSNMP support for DiscoveryKB2988825 How to Load an SNMP MIB Module for a MID Server to use for Discovery