New Relic integrations with the Google Cloud Platform (GCP) include one that reports Google Cloud SQL data to New Relic. This document explains how to activate the GCP Cloud SQL integration and describes the data it reports.
Features
Cloud SQL is Google Cloud's fully managed database service for MySQL, PostgreSQL, and SQL Server. New Relic Cloud SQL integration collects CPU, memory, disk, connection, replication, and database-level metrics for each Cloud SQL instance and its databases.
Activate integration
To enable the integration, follow standard procedures to connect your GCP service to New Relic:
Polling frequency
New Relic integrations query your GCP services according to a polling interval that varies by integration. The polling frequency for Google Cloud SQL is 5 minutes. The resolution is 1 data point every minute.
Workload Identity Federation
Find and use data
After you enable the integration, your Cloud SQL resources appear as entities in the New Relic entity explorer. To see dashboards and manage services, go to one.newrelic.com > All capabilities > Infrastructure > GCP.
All Cloud SQL metrics available in GCP Cloud Monitoring are collected as dimensional metrics in the Metric event type. Additional metrics beyond this table are collected automatically. See Google's Cloud SQL metrics documentation for the complete list.
Entities
Metric data
Key metrics — Database
Metric name | Unit | Description |
|---|---|---|
| Percent | Fraction of CPU currently in use by the Cloud SQL database. |
| Percent | Fraction of memory currently in use by the Cloud SQL database. |
| Percent | Fraction of disk currently in use by the Cloud SQL database. |
| Bytes | Disk bytes currently in use by the Cloud SQL database. |
| Count | Number of disk write operations against the Cloud SQL database. |
| Count | Number of disk read operations against the Cloud SQL database. |
| Count | Number of client connections to the Cloud SQL database. |
| Seconds | Uptime of the Cloud SQL database since it last started. |
| Seconds | Replication lag between primary and replica for the Cloud SQL database. |
Key metrics — Instance Database
Metric name | Unit | Description |
|---|---|---|
| Count | Number of PostgreSQL backends on the instance database. |
| Count | Number of queries served by the MySQL instance database. |
| Count | Number of PostgreSQL transactions on the instance database, faceted by result. |
For the complete list of Cloud SQL metrics, see Google's Cloud SQL metrics documentation.
Service account or user account
Find and use data
After activating the integration and waiting a few minutes (based on the polling frequency), data will appear in the New Relic UI. To find and use your data, including links to your and alert settings, go to one.newrelic.com > All capabilities > Infrastructure > GCP > (select an integration).
To view metric data for your GCP SQL integration in New Relic, create NRQL queries for GcpCloudSqlSample events and their related attributes.
GcpCloudSqlSample
Query GcpCloudSqlSample events in New Relic to view data for the following attributes:
Attribute | Description |
|---|---|
| Delta of number of instance auto-failover requests. |
| This is over |
| Number of cores reserved for the database. |
| Cumulative CPU usage time in seconds. |
| The fraction of the reserved CPU that is currently in use. |
| Data utilization in bytes. |
| Maximum data disk size in bytes. |
| Delta count of data disk read IO operations. |
| The fraction of the disk quota that is currently in use. |
| Delta count of disk write IO operations. |
| Maximum RAM size in bytes. |
| RAM usage in bytes. |
| The fraction of the memory quota that is currently in use. |
| The fraction of the memory quota that is currently in use. |
| Number of unused pages in the InnoDB buffer pool. |
| Total number of pages in the InnoDB buffer pool. |
| Delta count of InnoDB fsync() calls. |
| Delta count of InnoDB fsync() calls to the log file. |
| Delta count of InnoDB pages read. |
| Delta count of InnoDB pages written. |
| Delta count of statements executed by the server. |
| Delta count of statements executed by the server sent by the client. |
| Delta count of bytes received by MySQL process. |
| Number of seconds the read replica is behind its master (approximation). |
| Indicates whether the I/O thread for reading the master's binary log is running. Possible values are |
| Indicates whether the I/O thread for reading the master's binary log is running. Possible values are |
| Indicates whether the I/O thread for reading the master's binary log is running. Possible values are |
| Number of connections to the Cloud SQL MySQL instance. |
| Delta count of bytes received through the network. |
| Delta count of bytes sent through the network. |
| Number of connections to the Cloud SQL PostgreSQL instance. |
| Replication lag in bytes. Reported from the master per replica. |
| Delta count of number of transactions. |
| The current serving state of the Cloud SQL instance. This can be one of the following:
|
| Indicates if the server is up or not. On-demand instances are spun down if no connections are made for a sufficient amount of time. |
| Delta count of the time in seconds the instance has been running. |