For the complete documentation index, see llms.txt. Markdown versions are available by appending .md to documentation URLs.

Monitor GCP Cloud SQL for MySQL Instance Metrics and Logs

SigNoz Cloud - This page applies to SigNoz Cloud editions.
Self-Hosted Enterprise - This page applies to self-hosted SigNoz with an active license.

The Cloud SQL for MySQL integration brings instance metrics and logs into SigNoz, with a pre-built dashboard for the service.

Cloud SQL publishes its metrics to Cloud Monitoring and its logs to Cloud Logging. SigNoz reads them through the OpenTelemetry Collector running in your GCP project.

Choose a setup method

One-Click Integration

SigNoz deploys and manages the Collector for you. You turn the service on in SigNoz, and the SigNoz agent sets up metrics and logs collection in the background. Collects metrics and logs.

Prerequisites

  • Your GCP project is connected with One-Click Integration.
  • Your Cloud SQL for MySQL instances run in that same project. The agent monitors only the project it's deployed in.

Step 1: Turn on the service in SigNoz

  1. In SigNoz, go to Integrations > Google Cloud Platform.
  2. Select GCP Cloud SQL for MySQL from the service list.
  3. Turn on Metric Collection, Log Collection, or both.
  4. Click Save.

The agent picks up the change within about 30 seconds and updates the Collector and the log sink for you. There's no Collector config to edit.

Step 2: Turn on the optional logs in GCP

The MySQL error log flows with no extra work. Other MySQL logs are off by default and need a setting on the GCP side first:

  • Slow query and general query logs need the slow_query_log or general_log database flag turned on, with log_output set to FILE.
  • Audit logs, which record who ran which SQL statements, need the Cloud SQL audit plugin set up on the instance and Data Access audit logs turned on for the project. See MySQL database auditing.

Skip this step if you only need metrics and error logs.

Validate

  1. Wait about 10 minutes for the first metrics to arrive.

  2. In SigNoz, go to Dashboards and open GCP Cloud SQL for MySQL Overview. Panels should start filling in.

  3. If you turned on Log Collection, open Logs in SigNoz and start with this filter to find your project's logs:

    gcp.project = '<deployment-project-id>' AND gcp.resource_type = 'cloudsql_database'

    New MySQL log lines from your instances appear within a few minutes.

    Verify these values:

    • <deployment-project-id>: the GCP project you connected with One-Click Integration.

What's collected

The GCP Cloud SQL for MySQL Overview dashboard groups its 17 panels into four sections:

  • Health: Server up, Instance state, Replication lag.
  • CPU, Memory & Disk: CPU utilization, Memory utilization, Disk utilization, Connections.
  • Throughput: Queries, DML operations, Threads, InnoDB buffer pool miss ratio.
  • Errors & Contention: Slow queries, Aborted connects, InnoDB deadlocks, InnoDB row lock waits, Disk Read IOPS, Disk Write IOPS.
Metrics

See the Data Collected tab in the SigNoz integration for the definitive list the dashboard uses, and the GCP metrics list for full definitions.

Metric nameUnitType
cloudsql.googleapis.com/database/upCountGauge
cloudsql.googleapis.com/database/instance_stateCountGauge
cloudsql.googleapis.com/database/replication/replica_lagSecondsGauge
cloudsql.googleapis.com/database/cpu/utilizationPercentGauge
cloudsql.googleapis.com/database/memory/utilizationPercentGauge
cloudsql.googleapis.com/database/disk/utilizationPercentGauge
cloudsql.googleapis.com/database/network/connectionsCountGauge
cloudsql.googleapis.com/database/mysql/queriesCountSum
cloudsql.googleapis.com/database/mysql/dml_operations_countCountSum
cloudsql.googleapis.com/database/mysql/threadsCountGauge
cloudsql.googleapis.com/database/mysql/innodb/buffer_pool_reads_countCountSum
cloudsql.googleapis.com/database/mysql/innodb/buffer_pool_read_requests_countCountSum
cloudsql.googleapis.com/database/mysql/slow_queries_countCountSum
cloudsql.googleapis.com/database/mysql/aborted_connects_countCountSum
cloudsql.googleapis.com/database/mysql/innodb/deadlocks_countCountSum
cloudsql.googleapis.com/database/mysql/innodb/row_lock_waits_countCountSum
cloudsql.googleapis.com/database/disk/read_ops_countCountSum
cloudsql.googleapis.com/database/disk/write_ops_countCountSum
Logs

With Log Collection turned on, SigNoz collects these logs from your Cloud SQL for MySQL instances:

LogWhat it containsGCP setup needed
Error log (cloudsql.googleapis.com/mysql.err)Startup, shutdown, and error messages from the MySQL serverNone
Slow query log (cloudsql.googleapis.com/mysql-slow.log)Queries that take longer than long_query_timeTurn on the slow_query_log flag and set log_output to FILE
General query log (cloudsql.googleapis.com/mysql-general.log)Every statement the server receivesTurn on the general_log flag and set log_output to FILE
Audit logs (cloudaudit.googleapis.com/data_access)Who ran which SQL statements, for auditingSet up MySQL database auditing and turn on Data Access audit logs

With One-Click Integration, SigNoz applies this log sink filter for you. With Manual Setup, use it when you create your log sink:

resource.type="cloudsql_database" AND (
  logName:"/logs/cloudsql.googleapis.com%2Fmysql"
  OR (log_id("cloudaudit.googleapis.com/data_access")
    AND protoPayload.request.@type="type.googleapis.com/google.cloud.sql.audit.v1.MysqlAuditEntry")
)

Troubleshooting

No logs after turning on Log Collection. SigNoz can only forward logs that Cloud SQL writes to Cloud Logging. Open Logs Explorer in the GCP Console and filter on resource.type="cloudsql_database". If the slow or general query log is missing there, check its database flag and that log_output is FILE. For audit logs, confirm the audit plugin is set up and Data Access audit logs are on for the project.

No metrics at all (One-Click). Confirm the instances run in the project the agent is deployed in, and that Metric Collection is on and saved. See the One-Click troubleshooting for agent and Collector checks.

Logs don't arrive (Manual). If Logs Explorer in GCP shows the logs but SigNoz doesn't, work back through the log pipeline: the push subscription must reach the Collector, and the sink's writer identity needs roles/pubsub.publisher on the topic. See Collect logs troubleshooting.

A dashboard panel is empty (Manual). The metric backing that panel is missing from your metrics_list. Compare the Data Collected tab against your otel-collector-config.yaml, add what's missing, and repeat step 3.

The InnoDB buffer pool miss ratio panel is empty (Manual). This panel needs both buffer_pool_reads_count and buffer_pool_read_requests_count. Add whichever is missing and repeat step 3.

No Cloud SQL metrics at all (Manual). Confirm the signoz-integration-collector service account holds roles/monitoring.viewer on the project in project_id, and that the Cloud Monitoring API is enabled there. Then check the Cloud Run logs for googlecloudmonitoring receiver errors.

Metrics appear but are stale. The receiver polls on collection_interval (default 300s) and Cloud SQL itself samples most metrics no faster than every 60 seconds. Lower the interval only if you need the resolution, and expect a higher Monitoring API bill.

Next steps

Get Help

If you need help with the steps in this topic, please reach out to us on SigNoz Community Slack. If you are a SigNoz Cloud user, please use in product chat support located at the bottom right corner of your SigNoz instance or contact us at cloud-support@signoz.io.

Is this page helpful

Last updated—October 23, 2026