To deduplicate configuration items for configuration compliance, work through each de-duplication task in the Duplicate CI Remediator. For each task you pick one main CI, decide how the other duplicates are handled, and then remediate the set. Deduplication also updates the discovered items linked to those CIs, and their test results follow the CI. That second effect reaches past the CI record itself, so plan for it before you enable compliance on the affected classes.
How the Duplicate CI Remediator affects compliance data
In the Xanadu, Yokohama, Brazil and Australia releases, the Duplicate CI Remediator is updated with the sn_sec_cmn_src_ci.cmdb_ci property. Whenever a deduplication task updates CIs, it also updates the discovered items related to those CIs, so their test results pick up the change.
The sn_sec_cmn.update_on_ci_change property defaults to true, so a CI change also updates the related test results. The external ID of each test result is updated, and the risk score, assignment rules, remediation task rules and remediation target rule are evaluated again.
If a test result already exists for the same test and CI, the existing result is updated and the current one closes with the substate invalidCI. Setting the property to false instead creates a new test result and closes the existing one as invalidCI. Decide on this before the run, because it changes how the history of each result reads.
Configuration Compliance renamed some terms in v14.9. Test Result Group is now Remediation Task, Group Rules are now Remediation Task Rules, and Policy is now Test group. Match older notes and rules to these names before you act on them.
If the CIs came from identification, the steps for building them are in creating CIs for configuration compliance with the identification and reconciliation engine. If the discovered items came from an import, the import steps are in importing Microsoft Defender for Cloud results into configuration compliance.
Confirm roles and properties before the first run
Viewing and editing the de-duplication properties requires the sn_cmdb_admin or admin role, so arrange that access before the run date. The properties below sit under Configuration > CMDB Properties > Duplicate CI Remediator Properties. Confirm their names and defaults on your own instance before you rely on them.
- glide.duplicate_ci_remediator.dry_run defaults to false. Set it to true to run the remediator without updating any records. The work notes for the task then describe the changes a real remediation would make.
- glide.duplicate_ci_remediator.max.cis defaults to 1000. Above that count, support for reconciliation is limited. The threshold never exceeds 5,000, even if you enter a higher value.
- glide.duplicate_ci_remediator.max.field_length defaults to 4000. Attributes whose maximum length is above this value are left out of the Select Main CI, Merge Attribute Values and Determine Duplicate CI Actions tabs. An attribute whose maximum length equals the value is listed, but its data is truncated to that length. Raising the value can affect the performance of de-duplication tasks.
- glide.duplicate_ci_remediator.related_items_blacklist lists related tables, in the form table.reference column, that are excluded from merging. Its default is cert_task.cmdb_ci, cert_audit_result.configuration_item, discovery_log.cmdb_ci, alm_hardware.ci, alm_asset.ci and fm_expense_line.ci.
Choose the main CI in a de-duplication task
The Identification and Reconciliation Engine groups each set of duplicate CIs it detects into a de-duplication task. The task lists every duplicate CI in the set and the data that showed it was a duplicate, so review that before you choose a main CI. Remediation consolidates the set into a single CI.
Bulk processing runs through the De-duplication Dashboard and de-duplication templates in CMDB Workspace. For a single task, use the Duplicate CI Remediator wizard. If Otto for CMDB is installed on the instance, the wizard also offers an option that uses the De-duplication task resolution assistant skill.
On the Select Main CI tab, the main CI is the duplicate that stays active after the others are reconciled into it. You can also choose not to consolidate any data and keep the main CI as it is.
Large sets change this tab. When a task has more duplicates than the max.cis threshold allows, only the Recommended list of main CIs appears, with only the Use Main CI option. Those recommendations rely only on the oldest created, newest updated and most recently discovered CIs.
The duplicate_of attribute ties the rest of the set to the main CI. After remediation, the main CI’s duplicate_of is empty, and every other duplicate in the set points to it. If your instance was upgraded to the New York release or later, older duplicates whose main CI is not known show the value Unknown.
Manual edits to duplicate_of are restricted. A CI cannot be its own main CI, and a CI and its main CI must belong to the same domain. Chains are not allowed. If you set a CI as a duplicate of another duplicate, it is instead set as a duplicate of that duplicate’s main CI, and the operation fails when that main CI is Unknown. If a main CI is made a duplicate of another CI, it stops being a main CI, and its former duplicates move to the new main CI.
Work through the wizard’s reconciliation options
Merge attribute values and relationships
The wizard lets you set reconciliation options for attributes, relationships and related items. Attribute conflicts and CI relationships are reconciled only when the set is below the large-set threshold. Above it, only the default related items are reconciled.
The default related items list applies to all de-duplication tasks, and every item on it is selected by default. Changing the selection for one task does not change the default list itself. Tables named in the related_items_blacklist property are excluded from merging.
Attributes and related items associated with assets are not supported for merging. Asset related tables are not in the default related items list, so they cannot be merged.
Duplicate serial numbers behave differently from duplicate CMDB CIs. When remediation is applied to duplicate serial numbers, the merge of relationships from the duplicate records is not applied.
Choose what happens to the duplicates
You can retire or delete the rest of the duplicate CIs, or assign custom values to their attributes. The choice determines what each duplicate looks like afterwards, so decide it per task rather than by habit.
Handle related tables and change requests
Related tables can carry business rules or workflows that block the update of a CI reference to the main CI, which can make the task fail. The glide.duplicate_ci_remediator.merge_related_items_enhanced property defaults to true and lets remediation ignore database errors and skip business rules in those tables. The De-duplication Related Table Configurations table holds the per-table settings. By default the base system disables workflows and proceeds with errors for the Change and Task CI tables.
Where that setting is off, or a related table has no entry, change requests behave differently. A CI on a change request whose state is not New is removed from that request when the CI is deleted. A CI on a request in the New state is updated to the main CI. The business rule Ready only CI when not New prevents requests outside the New state from being updated, which keeps them valid.
Problem and incident tasks remain valid after remediation, because the system merges the main CI into them even when the duplicate was deleted.
Check the outcome after remediation
Open the main CI and confirm its attributes and relationships. Confirm each former duplicate carries the expected duplicate_of value and the attribute change you set. Then open the CI’s test results, because they follow the CI. If a risk score differs from what you expected, check it against the rules in the configuration compliance calculator rules.
Plan large sets and special cases
Run a small task first. Set glide.duplicate_ci_remediator.dry_run to true, read the work notes, and then set it back to false, its default, before the real run.
When a task has more duplicates than glide.duplicate_ci_remediator.max.cis allows, split the work into smaller tasks or raise the threshold within the 5,000 ceiling. Change one property at a time and record each value before and after, because raising the threshold or the field length can affect performance.
For help planning this work, see ServiceNow implementation.
Questions about edge cases in deduplication runs
What do I do if the identification engine does not generate a de-duplication task?
Under some circumstances the engine does not generate a de-duplication task for duplicate CIs, and the duplication stays in place until a task exists. Create the de-duplication task manually, then remediate it through the same wizard as any other task.
When does the restricted mode option appear?
The Use the Duplicate CI Remediator (Restricted Mode) option appears only when the glide.duplicate_ci_remediator.enable_restricted_mode property is set to true. The property is added through System Properties [sys_properties] and defaults to false. Use the option when a task times out while loading, which can happen with a large number of related items, because it restricts the use of related items so remediation can proceed.