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

Monitor GCP Cloud SQL for PostgreSQL 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 PostgreSQL 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 PostgreSQL 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 PostgreSQL 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 data in GCP

Most data starts flowing with no extra work. Two kinds of data need a setting on the GCP side first:

  • Query execution time panels need Query Insights turned on for the instance. It's off by default and has no extra charge.
  • pgAudit logs, which record the SQL statements run on your database, need pgAudit set up on the instance and Data Access audit logs turned on for the project. See Audit a Cloud SQL instance with pgAudit.

Skip this step if you don't need these.

Validate

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

  2. In SigNoz, go to Dashboards and open GCP Cloud SQL for PostgreSQL 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 PostgreSQL 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

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/cpu/utilizationPercentGauge
cloudsql.googleapis.com/database/memory/utilizationPercentGauge
cloudsql.googleapis.com/database/memory/usageBytesGauge
cloudsql.googleapis.com/database/disk/bytes_usedBytesGauge
cloudsql.googleapis.com/database/postgresql/num_backendsCountGauge
cloudsql.googleapis.com/database/postgresql/num_backends_by_stateCountGauge
cloudsql.googleapis.com/database/postgresql/transaction_countCountSum
cloudsql.googleapis.com/database/postgresql/deadlock_countCountSum
cloudsql.googleapis.com/database/postgresql/vacuum/oldest_transaction_ageCountGauge
cloudsql.googleapis.com/database/postgresql/insights/aggregate/execution_timeMicrosecondsGauge
cloudsql.googleapis.com/database/postgresql/insights/aggregate/io_timeMicrosecondsSum
cloudsql.googleapis.com/database/postgresql/insights/perquery/execution_timeMicrosecondsGauge
cloudsql.googleapis.com/database/postgresql/replication/replica_byte_lagBytesGauge
Logs

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

LogWhat it containsGCP setup needed
PostgreSQL logs (cloudsql.googleapis.com/postgres.log)Messages from the PostgreSQL server, such as errors, warnings, and slow queriesNone. Use database flags such as log_min_duration_statement to choose what PostgreSQL writes.
pgAudit logs (cloudaudit.googleapis.com/data_access)The SQL statements run on your database, for auditingSet up pgAudit 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%2Fpostgres"
  OR (log_id("cloudaudit.googleapis.com/data_access")
    AND protoPayload.request.@type="type.googleapis.com/google.cloud.sql.audit.v1.PgAuditEntry")
)

Troubleshooting

Query execution time panels are empty. The insights/ metrics only report once Query Insights is enabled on the instance. Enabling it is a change on the Cloud SQL instance, not in SigNoz or the Collector.

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 nothing shows there, check your database logging flags. For pgAudit logs, confirm pgAudit 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.

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

  • Create alerts on instance availability, CPU or memory saturation, disk growth, connection exhaustion, transaction wraparound risk (rising vacuum age), or replication lag.
  • Build custom dashboards to correlate database metrics with traces from the applications querying them.
  • Monitor Memorystore for Redis if your stack also uses a Redis cache.

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