CI deletion strategies for pattern discovery
Summarize
Summary of CI deletion strategies for pattern discovery
With pattern-based Discovery in ServiceNow, you can manage Configuration Items (CIs) in the CMDB that Discovery no longer detects. This functionality is specific to pattern discovery and not available for probes or sensors. When you discover a main CI type—such as an IIS web server—Discovery also populates related CIs like the hosting Windows machine, configuration files, and hosted websites. Managing these related CIs effectively requires setting deletion strategies to handle cases where Discovery cannot find these related CIs in subsequent runs.
Show less
Setting Deletion Strategies
After initial pattern discovery, you must manually configure deletion strategies in the Related CI Types [sacitopattern] table for each relationship between the main CI and its related CI types. These deletion strategies apply when Discovery:
- Successfully finds the main CI again
- Fails to find the related CI
Note that deletion strategies cannot be set for the main CI if it is an Infrastructure pattern type. Main CI deletion is only allowed for Application or Cloud Resource pattern types.
Available Deletion Strategies for Related CIs
- Keep (default): Retains the CI record with no changes.
- Delete: Removes the CI record and its relationship to the main CI from the CMDB.
- Mark as absent: Sets the CI’s Status [installstatus] to "Absent" indicating it was not found, without deleting the record or relationships. (Exceptions: CIs in cmdbcinetworkadapter and cmdbciipaddress are deleted if marked absent.)
- Delete relations: Deletes only the relationships between the related CI and the main CI, preserving the CI itself.
- Mark as retired: Sets the CI’s Status [installstatus] to "Retired" indicating Discovery no longer uses this CI, without deleting the record or relationships.
Deletion strategies do not apply to related entries, which are rules based on related CIs.
Practical Benefits for ServiceNow Customers
By configuring deletion strategies, you can maintain CMDB accuracy and integrity during repeated discovery runs. This ensures that outdated or missing related CIs are properly handled—whether by retention, marking, or removal—thus preventing data clutter and improving CMDB reliability. The ability to delete main CIs is restricted to specific pattern types, helping you maintain control over critical infrastructure data.
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. |