Mackerel supports obtaining and monitoring Cloud SQL metrics with Google Cloud Integration. When integrating with Google Cloud Integration, billable targets are determined using the conversion 1 Instance = 1 Micro Host. In addition to this, depending on the number of metrics retrieved, you may be charged for exceeding the maximum number of metrics per micro host.
Please refer to the following page for Google Cloud Integration configuration methods and a list of supported services.
Google Cloud Integration
Required API
The following API must be enabled in order to integrate Cloud SQL.
- Cloud SQL Admin API(sqladmin.googleapis.com)
Required role
The following role is required for the service account in order integrate Cloud SQL.
- Cloud SQL Viewer(roles/cloudsql.viewer)
Obtaining metrics
The metrics obtainable with Google Cloud Integration’s Cloud SQL support are as follows. For Metric
explanations, refer to the Google Cloud documentation.
CloudSQL for MySQL
The maximum number of obtainable metrics is 27
.
Graph name | Index type | Metric name in Mackerel | Unit |
---|---|---|---|
Auto failover request count | database/auto_failover_request_count | cloudsql.database.auto_failover.request_count | integer |
CPU | database/cpu/utilization | cloudsql.database.cpu.used | percentage |
Disk bytes | database/disk/bytes_used database/disk/quota |
cloudsql.disk.bytes.used cloudsql.disk.bytes.quota |
bytes |
Disk utilization | database/disk/utilization | cloudsql.disk.utilization.utilization | percentage |
Disk ops count | database/disk/read_ops_count database/disk/write_ops_count |
cloudsql.disk.ops.read cloudsql.disk.ops.write |
integer |
Memory | database/memory/usage database/memory/quota |
cloudsql.memory.usage cloudsql.memory.quota |
bytes |
Memory utilization | database/memory/utilization | cloudsql.memory_utilization.utilization | percentage |
Innodb buffer pool | database/mysql/innodb_buffer_pool_pages_dirty database/mysql/innodb_buffer_pool_pages_free database/mysql/innodb_buffer_pool_pages_total |
cloudsql.mysql.innodb_buffer_pool_pages.dirty cloudsql.mysql.innodb_buffer_pool_pages.free cloudsql.mysql.innodb_buffer_pool_pages.total |
integer |
Innodb fsyncs | database/mysql/innodb_data_fsyncs database/mysql/innodb_os_log_fsyncs |
cloudsql.mysql.innodb_fsyncs.data cloudsql.mysql.innodb_fsyncs.os_log |
integer |
Innodb pages | database/mysql/innodb_pages_read database/mysql/innodb_pages_written |
cloudsql.mysql.innodb_pages.read cloudsql.mysql.innodb_pages.write |
integer |
Queries | database/mysql/queries database/mysql/questions |
cloudsql.mysql.queries.query cloudsql.mysql.queries.question |
integer |
MySQL bytes received and sent | database/mysql/received_bytes_count database/mysql/sent_bytes_count |
cloudsql.mysql.bytes.received cloudsql.mysql.bytes.snet |
bytes |
Seconds behind master | database/mysql/replication/seconds_behind_master | cloudsql.mysql.replication.seconds_behind_master.seconds | integer |
Connections | database/network/connections | cloudsql.network.connections.count | integer |
Network bytes count | database/network/received_bytes_count database/network/sent_bytes_count |
cloudsql.network.bytes.received cloudsql.network.bytes.sent |
bytes |
CloudSQL replication lag | database/replication/replica_lag | cloudsql.replication.lag | integer |
Uptime | database/uptime | cloudsql.uptime.seconds | integer |
CloudSQL for PostgreSQL
The maximum number of obtainable metrics is 15 + 3 × [database name] + 4 × [replica name]
Graph name | Index type | Metric name in Mackerel | Unit |
---|---|---|---|
Auto failover request count | database/auto_failover_request_count | cloudsql.database.auto_failover.request_count | integer |
CPU | database/cpu/utilization | cloudsql.database.cpu.used | percentage |
Disk bytes | database/disk/bytes_used database/disk/quota |
cloudsql.disk.bytes.used cloudsql.disk.bytes.quota |
bytes |
Disk utilization | database/disk/utilization | cloudsql.disk.utilization.utilization | percentage |
Disk ops count | database/disk/read_ops_count database/disk/write_ops_count |
cloudsql.disk.ops.read cloudsql.disk.ops.write |
integer |
Memory | database/memory/usage database/memory/quota |
cloudsql.memory.usage cloudsql.memory.quota |
bytes |
Memory utilization | database/memory/utilization | cloudsql.memory_utilization.utilization | percentage |
Connections | database/network/connections | cloudsql.network.connections.count | integer |
Network bytes count | database/network/received_bytes_count database/network/sent_bytes_count |
cloudsql.network.bytes.received cloudsql.network.bytes.sent |
bytes |
PostgreSQL backends | database/postgresql/num_backends | cloudsql.postgresql.backends.[database name].count | integer |
PostgreSQL replica byte lag | database/postgresql/replication/replica_byte_lag | cloudsql.postgresql.replica_byte_lag.[replica name].[latency type].bytes | bytes |
PostgreSQL transaction | database/postgresql/transaction_count | cloudsql.postgresql.transaction.[database name].[transaction type].count | integer |
CloudSQL replication lag | database/replication/replica_lag | cloudsql.replication.lag | integer |
Uptime | database/uptime | cloudsql.uptime.seconds | integer |
- Enter the PostgreSQL database name in place of [database name] in "Metric name on Mackerel".
- Enter either
replay_location
,flush_location
,write_location
, orsent_location
in place of [latency type] in "Metric name on Mackerel". - Enter the replica name in place of [replica name] in "Metric name on Mackerel".
- Enter either
commit
orrollback
in place of [transaction type] in "Metric Name on Mackerel".