CI deletion strategies for pattern discovery
Summarize
Summary of CI deletion strategies for pattern discovery
When using pattern-based discovery in ServiceNow, you can control how to handle configuration items (CIs) in the CMDB that Discovery can no longer detect. This feature applies exclusively to pattern discovery, not probes or sensors. Patterns focus on identifying a main CI type (e.g., IIS web server), along with related CIs (such as the hosting Windows machine, configuration files, and hosted websites), and automatically populate the CMDB.
Show less
After the initial discovery, you must manually configure deletion strategies for each related CI type by creating entries in the Related CI Types [sacitopattern] table. These strategies determine what happens to related CIs when subsequent discoveries fail to find them, provided the main CI is still found.
Key Features
- Scope of deletion strategies: Available only for related CIs, not for main CIs of Infrastructure patterns or related entries (rules based on related CIs).
- Deletion strategy conditions: Applied only if Discovery reruns with the pattern, finds the main CI, but does not find the related CI.
- Deletion strategy options for related CIs:
- Keep: Retains the CI record without changes (default).
- Delete: Removes the CI record and its relationship to the main CI from the CMDB.
- Mark as absent: Changes the CI’s installstatus to “Absent,” indicating Discovery cannot find it, without deleting the CI or relationship. (Note: For cmdbcinetworkadapter and cmdbciipaddress, marking as absent deletes the CI.)
- Delete relations: Removes only the relationship between the related CI and the main CI.
- Mark as retired: Changes the installstatus to “Retired,” indicating Discovery no longer uses the CI, without deleting the CI or relationship.
- Main CI deletion: Allowed only for Application or Cloud Resource pattern types, not Infrastructure patterns.
Practical Application for ServiceNow Customers
By configuring deletion strategies, you can maintain CMDB accuracy and prevent stale or orphaned CIs related to your discovered main CIs. This ensures your CMDB reflects the current state of your environment while providing flexibility in how missing related CIs are handled—whether preserved, marked for follow-up, or deleted. This approach supports better CMDB hygiene, reduces clutter, and improves the reliability of your configuration data for ITSM and other processes.
When you perform discovery with a pattern, you can choose what to do with configuration items (CIs) that are in the Configuration Management Database (CMDB) but Discovery can no longer find.
- The Windows machine that hosts the web server
- The configuration files for the IIS server
- The website that the IIS server hosts
After you discover the main CI and its related CIs for the first time using a pattern, you must manually configure an entry in the Related CI Types [sa_ci_to_pattern] table for each relation between the main CI and a related CI type. These records are where you determine the deletion strategy for each related CI based on its type. Note that you cannot set a deletion strategy for the main CI for Infrastructure pattern type.
- After you run Discovery with the pattern again.
- Discovery successfully finds the main CI but cannot find the related CI.
These deletion strategy options are available:
| Value | Description |
|---|---|
| Keep | Preserves the configuration file CI record and makes no other changes to the record. This option is the default setting. |
| Delete | Deletes the configuration file CI record from the CMDB, and the relationship to the main CI. |
| Mark as absent | Marks the Status [install_status] field of the
configuration file CI record as Absent, meaning that
Discovery cannot find the tracked configuration file. This status does not
instruct the system to delete the actual CI or the relationship. Note: There are
two tables that do have their CIs deleted if marked as absent:
cmdb_ci_network_adapter and cmdb_ci_ip_address. |
| Delete relations | Deletes only the CI relationships between the related CI and the main CI. |
| Mark as retired | Marks the Status [install_status] field of the configuration file CI record as Retired, meaning that Discovery no longer uses this configuration file. This status does not instruct the system to delete the actual CI or the relationship. |