Pattern-based targeted discovery
Automatically discover the newly provisioned cloud resources and store their information in the ServiceNow® ServiceNow® Configuration Management Database (CMDB) by using pattern-based targeted discovery.
After the cloud provisions the resources mentioned in the resource template, such as Azure Resource Manager (ARM) or CloudFormation Template (CFT), it sends a response to the Cloud Provisioning and Governance application. The response contains information about the provisioned resources. Cloud Provisioning and Governance uses this information to launch a discovery—called targeted discovery—to discover only the newly provisioned or modified resources and update their attributes in the appropriate CMDB CI class.
The pattern-based targeted discovery offers an easier alternative to the existing CAPI-based approach. Cloud Provisioning and Governance uses single-resource-discovery patterns to discover only the newly provisioned or modified resources. Contrary to the other patterns, the single-resource-discovery pattern doesn’t scan the entire cloud landscape for changes. It only discovers the newly provisioned or modified resource of a given type.
The Cloud Resource Types [sn_capi_resource_type] table stores the one-to-one association between the resource type and the single-resource-discovery pattern used to discover the resource. Cloud Provisioning and Governance uses the sn_capi_resource_type table to identify the appropriate pattern for the given resource type. For more information on patterns, see Discovery patterns used by ITOM Visibility.
In the base system, Cloud Provisioning and Governance supports pattern-based targeted discovery for a wide variety of resource types. If required, you can use custom patterns that you created to perform targeted discovery. For more information, see Associate a resource type with a single-resource-discovery pattern.
- The CAPI-based targeted discovery isn’t implemented for the resource type.
- The sn_cmp.targeted.disco.patterns system property is set to True.
- The sn_capi_resource_type table contains a one-to-one association between the resource type and the single-resource-discovery pattern.
For example, If you use CFT to provision an Amazon S3 bucket, Cloud Provisioning and Governance reads the resource type from the cloud response (AWS::S3::Bucket), and then identifies the appropriate pattern ( AWS S3) from the sn_capi_resource_type table. Then, it invokes the pattern to discover the newly provisioned Amazon S3 bucket only, and update its attributes in the appropriate CMDB CI class (Cloud Object Storage [cmbd_ci_cloud_object_storage] table).
If both CAPI-based targeted discovery and pattern-based targeted discovery are implemented for the resource type, then the system uses CAPI-based targeted discovery.
If both CAPI-based and pattern-based targeted discovery are not implemented for the resource type, the resource type is classified as a generic cloud resource in the Cloud Resources [cmdb_ci_cmp_resource] table. In such cases, you can create a single-resource-discovery pattern and associate it with the resource type. For more information, see Create or customize patterns and Associate a resource type with a single-resource-discovery pattern.
Associate a resource type with a single-resource-discovery pattern
Define a one-to-one association between the resource type and the single-resource-discovery pattern in the Cloud Resource Types [sn_capi_resource_type] table. The pattern-based targeted discovery feature uses this information to invoke the appropriate pattern and discover the provisioned resource.
Before you begin
- Ensure that the Cloud Provisioning and Governance application is deployed.
- Ensure that the latest Discovery and Service Mapping is installed.
- Ensure that the application scope is Cloud API.
Role required: sn_cmp.cloud_service_designer or sn_cmp.cloud_admin