GCP Cloud SQL pattern-based discovery
Summarize
Summary of GCP Cloud SQL pattern-based discovery
This pattern-based discovery for GCP Cloud SQL instances enables ServiceNow customers to automatically identify Cloud SQL instances and their databases within their Google Cloud Platform (GCP) environment. It leverages the Discovery and Service Mapping Patterns application to extract detailed configuration and relationship data, which is then populated into the ServiceNow CMDB. This capability supports accurate asset management and service mapping for cloud-based databases.
Show less
Key Features
- Discovery Pattern: Uses the Google Cloud Platform (GCP) - Cloud SQL DB pattern to discover Cloud SQL instance configurations.
- Hardware Type Storage: Supports storing hardware type information in the Cloud Hardware Type table (
cmdbcicloudhardwaretype) to avoid large record counts in the traditional compute template table. - Data Collection: Discovers and populates multiple CMDB tables, including:
cmdbcicloudserviceaccount: Project account details.cmdbciavailabilityzone: Availability zone names, states, and descriptions.cmdbcigoogledatacenter: Datacenter and region details.cmdbciclouddatabase: Cloud SQL instances with attributes like name, version, state, and type.cmdbcidatabase: Individual databases within Cloud SQL instances.cmdbcicomputetemplateorcmdbcicloudhardwaretype: Hardware specifications such as machine types and vCPU counts.cmdbkeyvalue: Tags associated with Cloud SQL instances for enhanced categorization.
- Configuration Item Relationships: Establishes relationships among datacenters, availability zones, service accounts, Cloud SQL instances, databases, and hardware types to reflect the actual cloud topology accurately.
- Tag Discovery: Collects and maps GCP tags to configuration items in the CMDB to support tagging-based reporting and governance.
Practical Considerations
- Ensure all GCP discovery prerequisites are met as outlined in the Google Cloud Platform (GCP) Cloud discovery documentation.
- Update to the latest version of the Discovery and Service Mapping Patterns application from the ServiceNow Store to access the most current discovery capabilities.
- Enable the Cloud Hardware Type class extension to optimize hardware type data storage and reduce CMDB clutter.
Benefits for ServiceNow Customers
- Automates discovery of GCP Cloud SQL instances and associated databases, reducing manual effort and improving accuracy.
- Provides comprehensive visibility into cloud database configurations, relationships, and states within the CMDB.
- Supports advanced service mapping and impact analysis by correctly modeling cloud infrastructure and dependencies.
- Facilitates governance and compliance through tag discovery and structured metadata capture.
Discovery and Service Mapping Patterns finds GCP Cloud SQL instances and their databases on your cloud environment. Discovering some of these resources may require updating to the latest version of the Discovery and Service Mapping Patterns application from the ServiceNow Store.
Discovery uses the Google Cloud Platform (GCP) - Cloud SQL DB pattern to discover hardware type configurations for Cloud SQL instances from your GCP account.
When using the Hardware Type [cmdb_ci_compute_template] table to store the hardware types, you may notice an unusually large number of records. To avoid this issue, you can store the discovered hardware types in the Cloud Hardware Type [cmdb_ci_cloud_hardware_type] table. When enabled, Discovery populates the Cloud Hardware Type [cmdb_ci_cloud_hardware_type] table. For more information, see Enable the Cloud Hardware Type class extension.
Pattern-based discovery and mapping requirements
Verify the GCP discovery prerequisites section in Google Cloud Platform (GCP) Cloud discovery using Patterns.
Data collected by Discovery during horizontal discovery
Discovery populates the data in the CMDB when running the Google Cloud Platform (GCP) - Cloud SQL DB pattern.
| Field | Description |
|---|---|
| Account Id [account_id] | Name of the project used for the discovery. |
| Object ID [object_id] | Name of the project used for the discovery. |
| Datacenter Type [datacenter_type] | Datacenter type: Google Datacenter [cmdb_ci_google_datacenter]. |
| Field | Description |
|---|---|
| Name [name] | Name of the availability zone. |
| Description [short_description] | Description of the availability zone. |
| State [state] | State of the Availability Zone. Possible values are Available or Terminated. |
| Field | Description |
|---|---|
| Name [name] | Datacenter or region name. |
| Region [region] | Datacenter or region name. |
| Object ID [object_id] | Unique identifier allocated by GCP for this resource. |
| Description [short_description] | Datacenter or region description. |
| Field | Description |
|---|---|
| Object ID [object_id] | The unique resource identifier URL for the Cloud SQL instance. |
| Name [name] | The name of the Cloud SQL instance. |
| Type [type] | The database engine type for the Cloud SQL instance. |
| State [state] | The state of the Cloud SQL instance. For example: Available or Terminated. |
| Install Status [install_status] | Install status of the resource. Default value is Installed. |
| Version [version] | The database version. |
| Fully qualified domain name [fqdn] | The unique resource identifier URL for the Cloud SQL instance. |
| Field | Description |
|---|---|
| Name [name] | The name of the database within the Cloud SQL instance. |
| Type [type] | The type of database. |
| Install Status [install_status] | Install status of the resource. Default value is Installed. |
| Field | Description |
|---|---|
| Object ID [object_id] | The machine type for the Cloud SQL instance. |
| Name [name] | The machine type for the Cloud SQL instance. |
| vCPUs [vcpus] | The number of virtual CPUs (vCPUs) for the Cloud SQL instance. |
| Provider [provider] | The cloud provider, which is GCP. This field is only populated in Cloud Hardware Type [cmdb_ci_cloud_hardware_type] table. |
CI relationships
The Google Cloud Platform (GCP) - Cloud SQL DB pattern creates these relationships to support GCP Cloud SQL DB discovery.
| CI | Relationship | CI |
|---|---|---|
| Google Datacenter [cmdb_ci_google_datacenter] | Contains::Contained by | Availability Zone [cmdb_ci_availability_zone] |
| Google Datacenter [cmdb_ci_google_datacenter] | Hosted on::Hosts | Cloud Service Account [cmdb_ci_cloud_service_account] |
| Cloud DataBase [cmdb_ci_cloud_database] | Contains::Contained by | Database [cmdb_ci_database] |
| Cloud DataBase [cmdb_ci_cloud_database] | Hosted on::Hosts | Google Datacenter [cmdb_ci_google_datacenter] |
| Cloud DataBase [cmdb_ci_cloud_database] | Provisioned From::Provisioned | Hardware Type [cmdb_ci_compute_template] or Cloud Hardware Type [cmdb_ci_cloud_hardware_type] |
| Cloud DataBase [cmdb_ci_cloud_database] | Replicates to::Replicated by | Cloud DataBase [cmdb_ci_cloud_database] |
| Hardware Type [cmdb_ci_compute_template] or Cloud Hardware Type [cmdb_ci_cloud_hardware_type] | Hosted on::Hosts | Google Datacenter [cmdb_ci_google_datacenter] |
| Key Value [cmdb_key_value] | References | Cloud DataBase [cmdb_ci_cloud_database] |
GCP Tag discovery
The Google Cloud Platform (GCP) - Cloud SQL DB pattern collects tags and populates them in the Key Value [cmdb_key_value] table.
| Field | Description |
|---|---|
| Key [key] | Tag name. |
| Value [value] | Tag value. |
| Configuration item [configuration_item] | References the Cloud DataBase [cmdb_ci_cloud_database] table. |