Google Cloud SQL monitoring integration

Access to this feature will depend on your subscription level. Requires Infrastructure Pro.

New Relic Infrastructure's integrations with the Google Cloud Platform (GCP) include an integration to report Google Cloud SQL data to New Relic products. This document explains how to activate the GCP SQL integration and describes the data that can be reported.

Features

Cloud SQL is a fully-managed database service that is used to set up, maintain, manage, and administer MySQL and PostgreSQL databases in the cloud. Cloud SQL offers high performance and scalability, and can be accessed from most applications.

Activate integration

Anyone can view and explore the GCP data reporting to your New Relic Infrastructure account.

Only Owner, Admins, or Infrastructure add-on managers can manage the GCP integrations.

To enable the integration:

  1. Make sure you have installed the Infrastructure agent before you activate GCP integrations from your Infrastructure account.
  2. Follow standard procedures to connect your GCP service to New Relic Infrastructure.

Polling frequency

New Relic Infrastructure integrations query your GCP services according to a polling interval, which varies depending on the integration. The polling frequency for Google Cloud SQL is five minutes. The resolution is 1 data point every minute.

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 dashboards and alert settings, go to infrastructure.newrelic.com > Integrations > Google Cloud Platform > (select an integration).

Metric data

To view metric data for your GCP SQL integration in Insights, create NRQL queries for GcpCloudSqlSample events and their related attributes.

GcpCloudSqlSample

Query GcpCloudSqlSample events in Insights to view data for the following attributes:

Attribute Description
database.AutoFailoverRequestCount Delta of number of instance auto-failover requests.
database.AvailableForFailover This is over 0 if the failover operation is available on the instance.
database.cpu.ReservedCores Number of cores reserved for the database.
database.cpu.UsageTime Cumulative CPU usage time in seconds.
database.cpu.Utilization The fraction of the reserved CPU that is currently in use.
database.disk.BytesUsed Data utilization in bytes.
database.disk.Quota Maximum data disk size in bytes.
database.disk.ReadOps Delta count of data disk read IO operations.
database.disk.Utilization The fraction of the disk quota that is currently in use.
database.disk.WriteOps Delta count of disk write IO operations.
database.memory.Quota Maximum RAM size in bytes.
database.memory.Usage RAM usage in bytes.
database.memory.Utilization The fraction of the memory quota that is currently in use.
database.mysql.InnodbBufferPoolPagesDirty The fraction of the memory quota that is currently in use.
database.mysql.InnodbBufferPoolPagesFree Number of unused pages in the InnoDB buffer pool.
database.mysql.InnodbBufferPoolPagesTotal Total number of pages in the InnoDB buffer pool.
database.mysql.InnodbDataFsyncs Delta count of InnoDB fsync() calls.
database.mysql.InnodbOsLogFsyncs Delta count of InnoDB fsync() calls to the log file.
database.mysql.InnodbPagesRead Delta count of InnoDB pages read.
database.mysql.InnodbPagesWritten Delta count of InnoDB pages written.
database.mysql.Queries Delta count of statements executed by the server.
database.mysql.Questions Delta count of statements executed by the server sent by the client.
database.mysql.ReceivedBytesCount Delta count of bytes received by MySQL process.
database.mysql.replication.SecondsBehindMaster Number of seconds the read replica is behind its master (approximation).
database.mysql.replication.SlaveIoRunning Indicates whether the I/O thread for reading the master's binary log is running. Possible values are Yes, No, and Connecting.
database.mysql.replication.SlaveSqlRunning Indicates whether the I/O thread for reading the master's binary log is running. Possible values are Yes, No, and Connecting.
database.mysql.SentBytesCount Indicates whether the I/O thread for reading the master's binary log is running. Possible values are Yes, No, and Connecting.
database.network.Connections Number of connections to the Cloud SQL MySQL instance.
database.network.ReceivedBytesCount Delta count of bytes received through the network.
database.network.SentBytesCount Delta count of bytes sent through the network.
database.postgresql.NumBackends Number of connections to the Cloud SQL PostgreSQL instance.
database.postgresql.replication.ReplicaByteLag Replication lag in bytes. Reported from the master per replica.
database.postgresql.TransactionCount Delta count of number of transactions.
database.State

The current serving state of the Cloud SQL instance. This can be one of the following:

  • RUNNABLE: The instance is running, or is ready to run when accessed.
  • SUSPENDED: The instance is not available, for example due to problems with billing.
  • PENDING_CREATE: The instance is being created.
  • MAINTENANCE: The instance is down for maintenance.
  • UNKNOWN_STATE: The state of the instance is unknown.
database.Up 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.
database.Uptime Delta count of the time in seconds the instance has been running.

Inventory data

To view inventory data for GCP SQL services, go to infrastructure.newrelic.com > Integrations > Inventory and search for or select the following:

gcp/cloudsql/database

Name Description
label.* Labels for the instance.
name

The ID of the instance (not the name).

project

The project where the instance is.

zone

The region where the instance is.

For more help

Recommendations for learning more: