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 Configuration Items (CIs) that exist in the Configuration Management Database (CMDB) but are no longer found by Discovery are handled. This capability is specific to pattern discovery and not available for probes or sensors. Patterns identify a main CI type (such as an IIS web server or Tomcat server) and also discover related CIs that support or depend on the main CI.
Show less
How deletion strategies work
After initially discovering the main CI and its related CIs using a pattern, you must manually configure deletion strategies for each related CI type in the Related CI Types [sacitopattern] table. This configuration specifies what action to take when Discovery finds the main CI again but cannot find a related CI. Deletion strategies do not apply to the main CI for Infrastructure pattern types but can be applied to main CIs for Application or Cloud Resource patterns.
Available deletion strategy options for related CIs
- Keep: Retains the CI record without changes (default option).
- Delete: Removes the CI record and its relationship with the main CI from the CMDB.
- Mark as absent: Sets the CI’s status to Absent, indicating Discovery cannot locate it, without deleting the record or relationships. (Note: For the
cmdbcinetworkadapterandcmdbciipaddresstables, marking as absent will delete the CI.) - Delete relations: Deletes only the relationships between the related CI and the main CI, leaving the CI record intact.
- Mark as retired: Updates the CI’s status to Retired, indicating it is no longer used by Discovery, without deleting the record or relationships.
Practical implications for ServiceNow customers
By configuring deletion strategies for related CIs discovered via patterns, you can maintain CMDB accuracy and control how outdated or missing related CIs are managed automatically during subsequent Discovery runs. This helps prevent stale data and ensures your CMDB reflects the current state of your infrastructure and applications accurately. It is important to manually define these strategies for each related CI type after initial discovery and to understand that the main CI deletion is limited to specific 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. |