This page shows reference information for Cloud SQL metrics. You access these metrics through Google Cloud's operations suite.
To quickly see graphs of metric data, use the Metrics Explorer. For information on using this tool, see Metrics Explorer.
The "metric type" strings in this table must be prefixed
with cloudsql.googleapis.com/
. That prefix has been
omitted from the entries in the table.
Metric type Launch stage Display name |
|
---|---|
Kind, Type, Unit Monitored resources |
Description Labels |
database/auto_failover_request_count
GA
Auto-failover Requests |
|
DELTA , INT64 , 1 cloudsql_database |
Delta of number of instance auto-failover requests. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/available_for_failover
GA
Available for failover |
|
GAUGE , INT64 , 1 cloudsql_database |
This is > 0 if the failover operation is available on the instance. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/cpu/reserved_cores
GA
CPU reserved cores |
|
GAUGE , DOUBLE , 1 cloudsql_database |
Number of cores reserved for the database. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/cpu/usage_time
GA
CPU usage |
|
DELTA , DOUBLE , s{CPU} cloudsql_database |
Cumulative CPU usage time in seconds. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/cpu/utilization
GA
CPU utilization |
|
GAUGE , DOUBLE , 10^2.% cloudsql_database |
Current CPU utilization represented as a percentage of the reserved CPU that is currently in use. Values are typically numbers between 0.0 and 1.0 (but might exceed 1.0). Charts display the values as a percentage between 0% and 100% (or more). Sampled every 60 seconds. After sampling, data is not visible for up to 150 seconds. |
database/disk/bytes_used
GA
Bytes used |
|
GAUGE , INT64 , By cloudsql_database |
Data utilization in bytes. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/disk/quota
GA
Disk quota |
|
GAUGE , INT64 , By cloudsql_database |
Maximum data disk size in bytes. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/disk/read_ops_count
GA
Disk read IO |
|
DELTA , INT64 , 1 cloudsql_database |
Delta count of data disk read IO operations. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/disk/utilization
GA
Disk utilization |
|
GAUGE , DOUBLE , 1 cloudsql_database |
The fraction of the disk quota that is currently in use. Sampled every 60 seconds. After sampling, data is not visible for up to 150 seconds. |
database/disk/write_ops_count
GA
Disk write IO |
|
DELTA , INT64 , 1 cloudsql_database |
Delta count of data disk write IO operations. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/instance_state
GA
Instance state |
|
GAUGE , BOOL ,
cloudsql_database |
The current serving state of the Cloud SQL instance. This can be one of the following:
1 (RUNNING): The instance is *expected* to be running. If an instance experiences unplanned (non-maintenance) downtime, the state will still be RUNNING, but the database/up metric will report 0.
2 (SUSPENDED): The instance is not available, for example due to problems with billing.
3 (RUNNABLE): The instance has been stopped by owner. It is not currently running, but it's ready to be restarted.
4 (PENDING_CREATE): The instance is being created.
5 (MAINTENANCE): The instance is down for maintenance.
6 (FAILED): The instance creation failed or an operation left the instance in an unknown bad state.
7 (UNKNOWN_STATE): The state of the instance is unknown. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds.
state :
The state of the instance.
|
database/memory/quota
GA
Memory quota |
|
GAUGE , INT64 , By cloudsql_database |
Maximum RAM size in bytes. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/memory/total_usage
GA
Total memory usage |
|
GAUGE , INT64 , By cloudsql_database |
Total RAM usage in bytes including buffer cache. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/memory/usage
GA
Memory usage |
|
GAUGE , INT64 , By cloudsql_database |
RAM usage in bytes. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/memory/utilization
GA
Memory utilization |
|
GAUGE , DOUBLE , 1 cloudsql_database |
The fraction of the memory quota that is currently in use. Sampled every 60 seconds. After sampling, data is not visible for up to 150 seconds. |
database/mysql/innodb_buffer_pool_pages_dirty
GA
InnoDB dirty pages |
|
GAUGE , INT64 , 1 cloudsql_database |
Number of unflushed pages in the InnoDB buffer pool. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/mysql/innodb_buffer_pool_pages_free
GA
InnoDB free pages |
|
GAUGE , INT64 , 1 cloudsql_database |
Number of unused pages in the InnoDB buffer pool. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/mysql/innodb_buffer_pool_pages_total
GA
InnoDB total pages |
|
GAUGE , INT64 , 1 cloudsql_database |
Total number of pages in the InnoDB buffer pool. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/mysql/innodb_data_fsyncs
GA
InnoDB fsync calls |
|
DELTA , INT64 , 1 cloudsql_database |
Delta count of InnoDB fsync() calls. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/mysql/innodb_os_log_fsyncs
GA
InnoDB log fsync calls |
|
DELTA , INT64 , 1 cloudsql_database |
Delta count of InnoDB fsync() calls to the log file. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/mysql/innodb_pages_read
GA
InnoDB pages read |
|
DELTA , INT64 , 1 cloudsql_database |
Delta count of InnoDB pages read. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/mysql/innodb_pages_written
GA
InnoDB pages written |
|
DELTA , INT64 , 1 cloudsql_database |
Delta count of InnoDB pages written. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/mysql/queries
GA
Queries |
|
DELTA , INT64 , 1 cloudsql_database |
Delta count of statements executed by the server. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/mysql/questions
GA
Questions |
|
DELTA , INT64 , 1 cloudsql_database |
Delta count of statements executed by the server sent by the client. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/mysql/received_bytes_count
GA
Network bytes received by MySQL |
|
DELTA , INT64 , By cloudsql_database |
Delta count of bytes received by MySQL process. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/mysql/replication/available_for_failover
DEPRECATED
Available for failover (Deprecated) |
|
GAUGE , INT64 , 1 cloudsql_database |
This is > 0 if the failover operation is available on the master instance.master. The metric is deprecated. Please use cloudsql.googleapis.com/database/available_for_failover instead. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/mysql/replication/last_io_errno
GA
Last I/O thread error number. |
|
GAUGE , INT64 , 1 cloudsql_database |
The error number of the most recent error that caused the I/O thread to stop. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/mysql/replication/last_sql_errno
GA
Last SQL thread error number. |
|
GAUGE , INT64 , 1 cloudsql_database |
The error number of the most recent error that caused the SQL thread to stop. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/mysql/replication/seconds_behind_master
GA
Replication lag |
|
GAUGE , INT64 , s cloudsql_database |
Number of seconds the read replica is behind its master (approximation). Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/mysql/replication/slave_io_running
GA
Slave I/O thread running |
|
GAUGE , STRING ,
cloudsql_database |
Indicates whether the I/O thread for reading the master's binary log is running. Possible values are Yes, No and Connecting. Sampled every 60 seconds. After sampling, data is not visible for up to 60 seconds. |
database/mysql/replication/slave_io_running_state
GA
Slave I/O thread running state |
|
GAUGE , BOOL ,
cloudsql_database |
Indicates whether the I/O thread for reading the master's binary log is running. Possible values are Yes, No and Connecting, and the values are exposed through the 'state' field. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds.
state :
The slave_io_running state of the slave.
|
database/mysql/replication/slave_sql_running
GA
Slave SQL thread running |
|
GAUGE , STRING ,
cloudsql_database |
Indicates whether the SQL thread for executing events in the relay log is running. Sampled every 60 seconds. After sampling, data is not visible for up to 60 seconds. |
database/mysql/replication/slave_sql_running_state
GA
Slave SQL thread running state |
|
GAUGE , BOOL ,
cloudsql_database |
Indicates whether the SQL thread for executing events in the relay log is running. Possible values are Yes / No, and the values are exposed through the 'state' field. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds.
state :
The slave_sql_running state of the slave.
|
database/mysql/sent_bytes_count
GA
Network bytes sent by MySQL |
|
DELTA , INT64 , By cloudsql_database |
Delta count of bytes sent by MySQL process. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/network/connections
GA
Cloud SQL Connections |
|
GAUGE , INT64 , 1 cloudsql_database |
Number of connections to databases on the Cloud SQL instance. Only applicable to MySQL and SQL Server. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/network/received_bytes_count
GA
Received bytes |
|
DELTA , INT64 , By cloudsql_database |
Delta count of bytes received through the network. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/network/sent_bytes_count
GA
Sent bytes |
|
DELTA , INT64 , By cloudsql_database |
Delta count of bytes sent through the network. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds.
destination :
Where the data is being sent.
|
database/postgresql/external_sync/initial_sync_complete
ALPHA
Initial sync complete |
|
GAUGE , BOOL ,
cloudsql_database |
Whether all databases on the Postgres External Server (ES) replica have completed the initial sync and are replicating changes from the source. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/postgresql/external_sync/max_replica_byte_lag
ALPHA
Max lag bytes |
|
GAUGE , INT64 , By cloudsql_database |
Replication lag in bytes for Postgres External Server (ES) replicas. Aggregated across all DBs on the replica. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/postgresql/insights/aggregate/execution_time
BETA
Execution time |
|
CUMULATIVE , INT64 , us{CPU} cloudsql_instance_database |
Accumulated query execution time per user per database. This is the sum of cpu time, io wait time, lock wait time, process context switch, and scheduling for all the processes involved in the query execution.
user :
The user of the database.
client_addr :
The IP address of the database client.
|
database/postgresql/insights/aggregate/io_time
BETA
IO time |
|
CUMULATIVE , INT64 , us cloudsql_instance_database |
Accumulated IO time per user per database.
user :
The user of the database.
client_addr :
The IP address of the database client.
io_type :
The IO type (read/write).
|
database/postgresql/insights/aggregate/latencies
BETA
Latency |
|
CUMULATIVE , DISTRIBUTION , us cloudsql_instance_database |
Query latency distribution per user per database.
user :
The user of the database.
client_addr :
The IP address of the database client.
|
database/postgresql/insights/aggregate/lock_time
BETA
Aggregated lock time |
|
CUMULATIVE , INT64 , us cloudsql_instance_database |
Accumulated lock wait time per user per database.
user :
The user of the database.
client_addr :
The IP address of the database client.
lock_type :
The lock type (lw/hw/buffer_pin).
|
database/postgresql/insights/aggregate/row_count
BETA
Affected rows |
|
CUMULATIVE , INT64 , 1 cloudsql_instance_database |
Total number of retrieved or affected rows.
user :
The user of the database.
client_addr :
The IP address of the database client.
|
database/postgresql/insights/aggregate/shared_blk_access_count
BETA
Shared blocks cache access. |
|
CUMULATIVE , INT64 , 1 cloudsql_instance_database |
Shared blocks (regular tables & indexed) accessed by statement execution.
user :
The user of the database.
client_addr :
The IP address of the database client.
access_type :
The block access type (hit/miss).
|
database/postgresql/insights/perquery/execution_time
BETA
Per query execution times |
|
CUMULATIVE , INT64 , us{CPU} cloudsql_instance_database |
Accumulated execution times per user per database per query.This is the sum of cpu time, io wait time, lock wait time, process context switch, and scheduling for all the processes involved in the query execution.
querystring :
The normalized query.
user :
The user of the database.
client_addr :
The IP address of the database client.
query_hash :
A unique hash of the query string.
|
database/postgresql/insights/perquery/io_time
BETA
Per query IO time |
|
CUMULATIVE , INT64 , us cloudsql_instance_database |
Accumulated IO time per user per database per query.
querystring :
The normalized query.
user :
The user of the database.
client_addr :
The IP address of the database client.
io_type :
The IO type (read/write).
query_hash :
A unique hash of the query string.
|
database/postgresql/insights/perquery/latencies
BETA
Per query latency |
|
CUMULATIVE , DISTRIBUTION , us cloudsql_instance_database |
Query latency distribution per user per database per query.
querystring :
The normalized query.
user :
The user of the database.
client_addr :
The IP address of the database client.
query_hash :
A unique hash of the query string.
|
database/postgresql/insights/perquery/lock_time
BETA
Per query lock time |
|
CUMULATIVE , INT64 , us cloudsql_instance_database |
Accumulated lock wait time per user per database per query.
querystring :
The normalized query.
user :
The user of the database.
client_addr :
The IP address of the database client.
lock_type :
The lock type (lw/hw/buffer_pin).
query_hash :
A unique hash of the query string.
|
database/postgresql/insights/perquery/row_count
BETA
Per query affected rows |
|
CUMULATIVE , INT64 , 1 cloudsql_instance_database |
Total number of retrieved or affected rows.
querystring :
The normalized query.
user :
The user of the database.
client_addr :
The IP address of the database client.
query_hash :
A unique hash of the query string.
|
database/postgresql/insights/perquery/shared_blk_access_count
BETA
Per query Shared blocks cache access |
|
CUMULATIVE , INT64 , 1 cloudsql_instance_database |
Shared blocks (regular tables & indexed) accesssed by statement execution.
querystring :
The normalized query.
user :
The user of the database.
client_addr :
The IP address of the database client.
access_type :
The block access type (hit/miss).
query_hash :
A unique hash of the query string.
|
database/postgresql/insights/pertag/execution_time
BETA
Per tag execution time |
|
CUMULATIVE , INT64 , us{CPU} cloudsql_instance_database |
Accumulated execution times per user per database per tag.This is the sum of cpu time, io wait time, lock wait time, process context switch, and scheduling for all the processes involved in the query execution.
user :
The user of the database.
client_addr :
The IP address of the database client.
action :
The name of the action.
application :
The name of the application.
controller :
The name of the controller.
db_driver :
The name of the db_driver.
framework :
The name of the framework.
route :
The name of the route.
tag_hash :
A unique hash of the tag string.
|
database/postgresql/insights/pertag/io_time
BETA
Per tag IO time |
|
CUMULATIVE , INT64 , us cloudsql_instance_database |
Accumulated IO write time per user per database per tag.
user :
The user of the database.
client_addr :
The IP address of the database client.
action :
The name of the action.
application :
The name of the application.
controller :
The name of the controller.
db_driver :
The name of the db_driver.
framework :
The name of the framework.
route :
The name of the route.
io_type :
The IO type (read/write).
tag_hash :
A unique hash of the tag string.
|
database/postgresql/insights/pertag/latencies
BETA
Per tag latency |
|
CUMULATIVE , DISTRIBUTION , us cloudsql_instance_database |
Query latency distribution per user per database per tag.
user :
The user of the database.
client_addr :
The IP address of the database client.
action :
The name of the action.
application :
The name of the application.
controller :
The name of the controller.
db_driver :
The name of the db_driver.
framework :
The name of the framework.
route :
The name of the route.
tag_hash :
A unique hash of the tag string.
|
database/postgresql/insights/pertag/lock_time
BETA
Per tag lock time |
|
CUMULATIVE , INT64 , us cloudsql_instance_database |
Accumulated lock wait time per user per database per tag.
user :
The user of the database.
client_addr :
The IP address of the database client.
action :
The name of the action.
application :
The name of the application.
controller :
The name of the controller.
db_driver :
The name of the db_driver.
framework :
The name of the framework.
route :
The name of the route.
lock_type :
The lock type (lw/hw/buffer_pin).
tag_hash :
A unique hash of the tag string.
|
database/postgresql/insights/pertag/row_count
BETA
Per tag affected rows |
|
CUMULATIVE , INT64 , 1 cloudsql_instance_database |
Total number of retrieved or affected rows.
user :
The user of the database.
client_addr :
The IP address of the database client.
action :
The name of the action.
application :
The name of the application.
controller :
The name of the controller.
db_driver :
The name of the db_driver.
framework :
The name of the framework.
route :
The name of the route.
tag_hash :
A unique hash of the tag string.
|
database/postgresql/insights/pertag/shared_blk_access_count
BETA
Per tag shared blocks cache accessed |
|
CUMULATIVE , INT64 , 1 cloudsql_instance_database |
Shared blocks (regular tables & indexed) accessed by statement execution.
user :
The user of the database.
client_addr :
The IP address of the database client.
action :
The name of the action.
application :
The name of the application.
controller :
The name of the controller.
db_driver :
The name of the db_driver.
framework :
The name of the framework.
route :
The name of the route.
access_type :
The block access type (hit/miss).
tag_hash :
A unique hash of the tag string.
|
database/postgresql/num_backends
GA
PostgreSQL Connections |
|
GAUGE , INT64 , 1 cloudsql_database |
Number of connections to the Cloud SQL PostgreSQL instance. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds.
database :
Name of the database.
|
database/postgresql/replication/replica_byte_lag
GA
Lag bytes |
|
GAUGE , INT64 , By cloudsql_database |
Replication lag in bytes. Reported from the master per replica. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds.
replica_name :
Name of the replica.
replica_lag_type :
Type of lag. This can be either replay_location, flush_location, write_location or sent_location.
|
database/postgresql/transaction_count
GA
Number of transactions |
|
DELTA , INT64 , 1 cloudsql_database |
Delta count of number of transactions. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds.
database :
Name of the database.
transaction_type :
transaction_type can be commit or rollback.
|
database/replication/replica_lag
GA
Replication lag |
|
GAUGE , DOUBLE , s cloudsql_database |
Number of seconds the read replica is behind its master (approximation). Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/replication/state
BETA
Replication state |
|
GAUGE , BOOL ,
cloudsql_database |
The current serving state of replication. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds.
state :
State of replication:"Running" - Replication is active and running;"Stopped" - Replication is inactive and stopped;"Error" - There is an error happening and replication is stopped.
|
database/state
GA
State |
|
GAUGE , STRING ,
cloudsql_database |
The current serving state of the Cloud SQL instance. This can be one of the following: 1 (RUNNING): The instance is *expected* to be running. If an instance experiences unplanned (non-maintenance) downtime, the state will still be RUNNING, but the database/up metric will report 0. 2 (SUSPENDED): The instance is not available, for example due to problems with billing. 3 (RUNNABLE): The instance has been stopped by owner. It is not currently running, but it's ready to be restarted. 4 (PENDING_CREATE): The instance is being created. 5 (MAINTENANCE): The instance is down for maintenance. 6 (FAILED): The instance creation failed or an operation left the instance in an unknown bad state. 7 (UNKNOWN_STATE): The state of the instance is unknown. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/up
GA
Server up |
|
GAUGE , INT64 , 1 cloudsql_database |
Indicates if the server is up or not. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
database/uptime
GA
Uptime |
|
DELTA , INT64 , s cloudsql_database |
Delta count of the time in seconds the instance has been running. Sampled every 60 seconds. After sampling, data is not visible for up to 210 seconds. |
Table generated at 2021-04-15 18:35:20 UTC.
What's next
- Learn how monitoring works in GCP with the Introduction to Cloud Monitoring.
- Learn how to use Metrics Explorer.
- See the complete Metrics list for all Google Cloud products.