Skip to content

GCP Cloud SQL

Collect GCP Cloud SQL Metrics

Configuration

Install Func

Recommended to activate Guance Integration - Extensions - DataFlux Func (Automata): All prerequisites are automatically installed. Please continue with the script installation.

For self-deploying Func, refer to Self-deploying Func

Install Script

  1. Log in to the Func console, click [Script Market], enter the Guance script market, and search for integration_gcp_cloudsql.

  2. Click [Install], then enter the corresponding parameters: account file name, Target Principal, account name.

  3. Click [Deploy Startup Script], the system will automatically create a Startup script set and configure the corresponding startup script.

  4. After enabling, you can see the corresponding automatic trigger configuration under "Manage / Triggers". Click [Execute] to execute immediately without waiting for the scheduled time. Wait a moment, then you can view the execution task records and corresponding logs.

Verification

  1. Under "Manage / Triggers", confirm whether the corresponding task has the corresponding automatic trigger configuration. You can also check the corresponding task records and logs to see if there are any exceptions.
  2. In Guance, check under "Infrastructure / Custom" to see if asset information exists.
  3. In Guance, check under "Metrics" to see if there is corresponding monitoring data.

Metrics

GCP Cloud SQL metrics are under the gcp_cloudsql Measurement. The following are the metric descriptions.

GCP MySQL Metrics

Metric Original Metric Description Unit
database_cpu_reserved_cores database/cpu/reserved_cores CPU reserved cores Count
database_cpu_usage_time database/cpu/usage_time CPU usage time Seconds
database_cpu_utilization database/cpu/utilization CPU usage %
database_disk_bytes_used_by_data_type database/disk/bytes_used_by_data_type Bytes used Bytes
database_disk_bytes_used database/disk/bytes_used Bytes used Bytes
database_disk_quota database/disk/quota Disk quota Bytes
database_disk_read_bytes_count database/disk/read_bytes_count Disk read bytes Bytes
database_disk_read_ops_count database/disk/read_ops_count Disk read IO Count
database_disk_write_ops_count database/disk/write_ops_count Disk write IO Count
database_disk_utilization database/disk/utilization Disk utilization %
database_disk_write_bytes_count database/disk/write_bytes_count Disk write bytes Bytes
database_instance_state database/instance_state Instance state Numeric
database_memory_components database/memory/components Memory components %
database_memory_quota database/memory/quota Memory quota Bytes
database_memory_total_usage database/memory/total_usage Total memory usage %
database_memory_usage database/memory/usage Memory usage Bytes
database_memory_utilization database/memory/utilization Memory utilization %
database_mysql_aborted_clients_count database/mysql/aborted_clients_count MySQL aborted clients Count
database_mysql_aborted_connects_count database/mysql/aborted_connects_count MySQL aborted connections Count
database_mysql_connections_count database/mysql/connections_count MySQL connections Count
database_mysql_ddl_operations_count database/mysql/ddl_operations_count MySQL DDL operations Count
database_mysql_dml_operations_count database/mysql/dml_operations_count MySQL DML operations Count
database_mysql_handler_operations_count database/mysql/handler_operations_count MySQL handler operations Count
database_mysql_innodb_active_transactions database/mysql/innodb/active_transactions InnoDB active transactions Count
database_mysql_innodb_active_trx_longest_time database/mysql/innodb/active_trx_longest_time InnoDB longest active transaction time Count
database_mysql_innodb_active_trx_rows_locked database/mysql/innodb/active_trx_rows_locked InnoDB active transaction locked rows Count
database_mysql_innodb_active_trx_rows_modified database/mysql/innodb/active_trx_rows_modified InnoDB active transaction modified rows Count
database_mysql_innodb_active_trx_total_time database/mysql/innodb/active_trx_total_time InnoDB active transaction total time s
database_mysql_innodb_adaptive_hash_operation_count database/mysql/innodb/adaptive_hash_operation_count Innodb AHI operations Count
database_mysql_innodb_ahi_search_count database/mysql/innodb/ahi_search_count AHI or Btree searches Count
database_mysql_innodb_buffer_flush_sync_waits_count database/mysql/innodb/buffer_flush_sync_waits_count Innodb sync flush wait time s
database_mysql_innodb_buffer_pool_pages database/mysql/innodb/buffer_pool_pages InnoDB buffer pool pages Count
database_mysql_innodb_buffer_pool_read_requests_count database/mysql/innodb/buffer_pool_read_requests_count Innodb buffer pool read requests Count
database_mysql_innodb_buffer_pool_reads_count database/mysql/innodb/buffer_pool_reads_count Innodb buffer pool reads Count
database_mysql_innodb_buffer_pool_write_requests_count database/mysql/innodb/buffer_pool_write_requests_count InnoDB buffer pool write requests Count
database_mysql_innodb_data_cache_cache_hit_count database/mysql/innodb/data_cache/cache_hit_count MySQL data cache hits Count
database_mysql_innodb_data_cache_cache_miss_count database/mysql/innodb/data_cache/cache_miss_count MySQL data cache misses Count
database_mysql_innodb_data_cache_pages database/mysql/innodb/data_cache/pages Innodb pages in data cache Count
database_mysql_innodb_data_fsyncs database/mysql/innodb/data_pending_fsyncs InnoDB data pending fsyncs Count
database_mysql_innodb_deadlocks_count database/mysql/innodb/deadlocks_count InnoDB deadlocks Count
database_mysql_innodb_dictionary_memory database/mysql/innodb/dictionary_memory MySQL InnoDB dictionary cache Bytes
database_mysql_innodb_history_list_length database/mysql/innodb/history_list_length MySQL InnoDB dictionary cache Bytes
database_mysql_innodb_ibuf_merge_operation_count database/mysql/innodb/ibuf_merge_operation_count InnoDB merged records (by operation) Count
database_mysql_innodb_ibuf_merges_count database/mysql/innodb/ibuf_merges_count InnoDB change buffer merges Count
database/mysql/innodb/innodb_log_waits_count database/mysql/innodb/innodb_log_waits_count Transactions waiting for Innodb log buffer flush Count
database_mysql_innodb_lock_timeout_count database/mysql/innodb/lock_timeout_count Innodb row lock wait timeouts Count
database_mysql_innodb_lsn database/mysql/innodb/lsn MySQL InnoDB dictionary cache Bytes
database_mysql_innodb_operation_disk_io_count database/mysql/innodb/operation_disk_io_count Disk IO performed by InnoDB Count
database_mysql_innodb_os_log_fsyncs database/mysql/innodb/os_log_fsyncs_count Innodb OS log fsyncs count Count
database_mysql_innodb_os_log_pending_fsyncs database/mysql/innodb/os_log_pending_fsyncs InnoDB OS log pending fsyncs Count
database_mysql_innodb_os_log_pending_writes database/mysql/innodb/os_log_pending_writes InnoDB OS log pending writes Count
database_mysql_innodb_pages_read database/mysql/innodb_pages_read Innodb pages read Bytes
database_mysql_max_connections database/mysql/max_connections MySQL max connections Count
database_mysql_open_tables database/mysql/open_tables MySQL open tables Count
database_mysql_threads database/mysql/threads MySQL threads Count
database_network_connections database/network/connections Cloud SQL connections Count
database_network_received_bytes_count database/mysql/open_tables MySQL open tables Count
database_network_sent_bytes_count database/network/received_bytes_count Bytes received Bytes

GCP PostgreSQL Metrics

Metric Original Metric Description Unit
database_postgresql_backends_in_wait database/postgresql/backends_in_wait PostgreSQL backends waiting Count
database_postgresql_blocks_read_count database/postgresql/blocks_read_count Disk blocks read Count
database_postgresql_checkpoint_count database/postgresql/checkpoint_count CPU reserved cores Count
database_postgresql_data_cache_hit_count database/postgresql/data_cache/hit_count PostgreSQL data cache hits Count
database_postgresql_data_cache_hit_ratio database/postgresql/data_cache/hit_ratio PostgreSQL data cache hit ratio %
database_postgresql_data_cache_miss_count database/postgresql/data_cache/miss_count Cache misses Count
database_postgresql_deadlock_count database/postgresql/deadlock_count Deadlocks Count
database_postgresql_insights_aggregate_execution_time database/postgresql/insights/aggregate/execution_time Execution time us
database_postgresql_insights_aggregate_io_time database/postgresql/insights/aggregate/io_time IO time us
database_postgresql_insights_aggregate_latencies database/postgresql/insights/aggregate/latencies Latency us
database_postgresql_insights_aggregate_lock_time database/postgresql/insights/aggregate/lock_time Aggregate lock time us
database_postgresql_insights_aggregate_shared_blk_access_count database/postgresql/insights/aggregate/shared_blk_access_count Shared block cache access Count
database_postgresql_insights_perquery_execution_time database/postgresql/insights/perquery/execution_time Execution time per query us
database_postgresql_insights_perquery_io_time database/postgresql/insights/perquery/io_time IO time per query us
database_postgresql_insights_perquery_latencies database/postgresql/insights/perquery/latencies Latency per query us
database_postgresql_insights_perquery_lock_time database/postgresql/insights/perquery/lock_time Lock time per query us
database_postgresql_insights_perquery_row_count database/postgresql/insights/perquery/row_count Rows affected per query Count
database_postgresql_insights_perquery_shared_blk_access_count database/postgresql/insights/perquery/shared_blk_access_count Shared block cache access per query Count
database_postgresql_insights_pertag_execution_time database/postgresql/insights/pertag/execution_time Execution time per tag us
database_postgresql_insights_pertag_io_time database/postgresql/insights/pertag/io_time IO time per tag Count
database_postgresql_insights_pertag_latencies database/postgresql/insights/pertag/latencies Latency per tag us
database_postgresql_insights_pertag_lock_time database/postgresql/insights/pertag/lock_time Lock time per tag us
database_postgresql_insights_pertag_row_count database/postgresql/insights/pertag/row_count Rows affected per tag Count
database_postgresql_insights_pertag_shared_blk_access_count database/postgresql/backends_in_wait Shared block cache access per tag Count
database_postgresql_new_connection_count database/postgresql/new_connection_count PostgreSQL new connections Count
database_postgresql_num_backends database/postgresql/num_backends PostgreSQL connections Count
database_postgresql_num_backends_by_state database/postgresql/num_backends_by_state PostgreSQL connections by state Count
database_postgresql_replication_replica_byte_lag database/postgresql/backends_in_wait Bytes lag B
database_postgresql_statements_executed_count database/postgresql/statements_executed_count Statements executed Count
database_postgresql_temp_bytes_written_count database/postgresql/temp_bytes_written_count Data written to temp files (in bytes) B
database_postgresql_temp_files_written_count database/postgresql/temp_files_written_count Temp files used for writing data Count
database_postgresql_transaction_count database/postgresql/transaction_count Number of transactions Count
database_postgresql_transaction_id_utilization database/postgresql/transaction_id_utilization Transaction ID utilization %
database_postgresql_tuple_size database/postgresql/tuple_size Number of tuples (rows) in the database Count
database_postgresql_tuples_fetched_count database/postgresql/tuples_fetched_count Tuples fetched Count
database_postgresql_tuples_processed_count database/postgresql/tuples_processed_count Rows processed %
database_postgresql_tuples_returned_count database/postgresql/tuples_returned_count Tuples returned %
database_postgresql_vacuum_oldest_transaction_age database/postgresql/vacuum/oldest_transaction_age Age of oldest transaction s
database_postgresql_write_ahead_log_flushed_bytes_count database/postgresql/write_ahead_log/flushed_bytes_count PostgreSQL WAL flushed bytes B
database_postgresql_write_ahead_log_written_bytes_count database/postgresql/write_ahead_log/written_bytes_count PostgreSQL WAL written bytes B
database_replication_log_archive_failure_count database/replication/log_archive_failure_count Log archive failures B
database_replication_log_archive_success_count database/replication/log_archive_success_count Number of logs successfully archived Count

Feedback

Is this page helpful? ×