Rapid7 CI Lookup Rule Not Matching Existing CIs - Customized IP Address Rule Creates Unclassed Hardware CIsIssue The CI lookup rule for the Rapid7 integration does not match an existing CI that has the same IP address, and a new CI is created instead. Symptoms An IP based CI lookup rule for source Rapid7 InsightVM does not match an existing CI with an identical IP addressA new CI is created in cmdb_ci_unclassed_hardware for a host that already exists in the CMDBThe lookup rule named IP Address exists on the instance but is not part of the shipped Rapid7 rule setAfter upgrading the plugin, the shipped rules IP Only and IP and Network do not appear and the custom rule is still presentDiscovered items are associated with the newly created CI instead of the existing CI Facts CI lookup rules identify configuration items for host data received from Vulnerability Response integrationsLookup rules are source specific and are evaluated by lowest Order value firstEvaluation stops when a rule returns a single CI as a matchIf no rule matches, the asset is sent to the IRE, which creates a CI in the Unclassed Hardware classCI lookup rules are shipped with their integration pluginShipped rules for source Rapid7 InsightVM observed in plugin version 30.3.2 are listed below Shipped Rule NamePurposeIP OnlyMatches a CI on IP addressIP and NetworkMatches a CI on IP address and network A rule named IP Address is not shipped with the plugin and indicates a customized or manually created ruleA plugin upgrade does not overwrite or remove customized lookup rulesDeactivate lookup rules instead of deleting them, because removed rules cannot be recoveredRules and changes to rules should be tested before use to avoid duplicate or orphaned records Release All releases Cause The instance contains a customized CI lookup rule named IP Address that does not return a match for CIs with the same IP address. The upgrade to the latest plugin version did not replace this rule or add the shipped IP Only and IP and Network rules to the instance. When no lookup rule matches, the IRE applies its own identification rules and creates a CI in the Unclassed Hardware class, which results in duplicate CIs. Resolution Option 1: Import the Shipped Lookup Rule and Deactivate the Custom Rule (Recommended) Update the Rapid7 Integration for Security Operations plugin to the latest version through All > System Applications > All Available Applications > All or the Application Manager.Identify an instance where the unmodified plugin is installed. If none exists, install the plugin on a personal or subproduction instance.On that instance, navigate to All > Security Operations > CMDB > CI Lookup Rules and filter on Source = Rapid7 InsightVM.Open the shipped IP rule, right-click the form header, and select Export > XML.On the target subproduction instance, navigate to the same CI Lookup Rules list, right-click the list header, and select Import XML.Open the customized IP Address rule and clear the Active check box. Do not delete the rule.Open the imported shipped rule, confirm the Order value and select the Active check box.Retest the lookup with an IP address that matches an existing CI and confirm that the discovered item references the existing CI.Click Apply Changes on the CI Lookup Rules list page to rerun the rules on existing discovered items.Repeat the same steps on the production instance after validation. Important: Test in a subproduction instance before changing production. Reapplying rules on large discovered item tables can take several hours. Option 2: Correct the Customized Rule (Alternative) Navigate to All > Security Operations > CMDB > CI Lookup Rules and open the customized rule.Review Lookup method, Condition, and Order against the shipped IP rule.Copy the shipped rule and modify the copy instead of editing the shipped rule.Test the corrected rule in a subproduction instance and then click Apply Changes. Important Notes Do not delete CI lookup rules. Deactivate them to preserve configuration and historyDo not modify shipped rules directly. Copy them and modify the copyUnclassed Hardware CIs created before the fix are not removed automatically, so review them under your CMDB data governance processA plugin upgrade alone does not resolve this issue when a customized rule is in placeDeveloping, modifying, and maintaining custom CI lookup rules and scripts is outside the scope of ServiceNow Technical Support and should be handled by the application development team, Solution Architect, or Expert Services