CI deletion strategies for pattern discovery
Summarize
Summary of CI deletion strategies for pattern discovery
When performing Discovery in ServiceNow using patterns, you can manage what happens to configuration items (CIs) in the Configuration Management Database (CMDB) that Discovery can no longer locate. This capability is specific to pattern-based Discovery and not available for probes or sensors. Patterns identify a main CI type (such as an IIS web server) and discover related CIs (like the host machine, configuration files, or hosted websites), which are linked in the CMDB and shown in dependency maps.
Show less
Configuring Deletion Strategies
After initially discovering the main CI and its related CIs with a pattern, you must manually configure deletion strategies in the Related CI Types [sacitopattern] table for each relationship between the main CI and related CI types. These strategies define what action to take for related CIs when Discovery no longer finds them during subsequent runs. Note that for Infrastructure pattern types, you cannot set deletion strategies on the main CI itself.
Deletion Strategy Options
Deletion strategies apply when Discovery successfully finds the main CI but cannot find a related CI. The available options are:
- Keep: Retains the related CI record unchanged (default).
- Delete: Removes the related CI record and its relationship to the main CI from the CMDB.
- Mark as absent: Updates the related CI's Status [installstatus] field to "Absent" without deleting the record or relationship. Exceptions: CIs in cmdbcinetworkadapter and cmdbciipaddress tables are deleted when marked absent.
- Delete relations: Deletes only the relationship between the related CI and the main CI, leaving the CI itself intact.
- Mark as retired: Sets the related CI's Status [installstatus] to "Retired," indicating the CI is no longer in use but does not delete the record or relationship.
Note: Deletion strategies cannot be set for related entries (rules based on related CIs).
Additional Considerations
Deletion strategies allow ServiceNow customers to maintain accurate and clean CMDB data by controlling how stale or missing related CIs are handled after pattern-based Discovery runs. Main CIs can only be deleted if they belong to Application or Cloud Resource pattern types.
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. |