AlloyDB Omni 指標

選取文件版本:

AlloyDB Omni 提供指標,可監控資料庫的健康狀態和效能。這些指標會以適合 Prometheus 擷取的格式公開。

標籤

AlloyDB Omni 會公開下列類型的標籤。

資源標籤

AlloyDB Omni 會公開下列資源標籤,用於識別指標所屬的資料庫容器。

標籤鍵 標籤值
dbnamespace dbcluster CR 的命名空間
dbcluster dbcluster CR 的名稱
dbinstance dbinstance CR 的名稱。僅支援 ReadPool 類型的 dbinstance。如果資料庫容器不屬於 ReadPool dbinstance,這個值會是 n/a
dbnode 執行個體 CR 的名稱。每個執行個體 CR 都會一對一對應至資料庫容器。

系統中繼資料標籤

資料庫執行個體的roles變更時,系統中繼資料標籤會動態變更。舉例來說,當資料庫叢集從次要叢集升級為主要叢集時,dbcluster_type 會從 Secondary 變更為 Primary。

標籤鍵 標籤值
dbcluster_type dbcluster CR 的災難復原 (DR) 角色。可以是 Primary 或 Secondary
dbinstance_type dbinstance CR 的類型。如果容器屬於 ReadPool dbinstance,這個值為 ReadPool,否則為 n/a
dbnode_type dbnode 的 HA 角色,可以是 Primary 或 Standby

指標標籤

下表列出各項指標的特定標籤。例如,database 代表 AlloyDB Omni 資料庫執行個體中託管的 Postgres 資料庫名稱。

指標

AlloyDB Omni 會公開下列指標。 指標清單只會列出指標標籤。所有指標都以 alloydb_omni 開頭。如要進一步瞭解指標類型,請參閱「指標類型」。

資料庫執行個體層級指標

系統會依 AlloyDB Omni 資料庫執行個體,收集資料庫執行個體層級指標。每個資料庫執行個體層級指標都有資源和系統中繼資料標籤。

名稱 說明 標籤 單位 類型
alloydb_omni_database_postgresql_backends AlloyDB Omni 執行個體的有效和閒置連線數量。 取樣
alloydb_omni_database_postgresql_chill_cache_get_entry_calls_total 從超快速磁碟快取擷取資料項目的呼叫總數。 counter
alloydb_omni_database_postgresql_chill_cache_num_hits_total 從超快速磁碟快取成功擷取資料項目的總次數。 prewarm:預熱階段發生的命中 counter
alloydb_omni_database_postgresql_max_connections Postgres max_connections 執行階段參數的目前值。 取樣
alloydb_omni_database_postgresql_up Postgres 主要程序是否正在執行,執行中為 1,停止執行為 0。 取樣
alloydb_omni_database_postgresql_uptime_second Postgres 主要程序啟動後經過的時間。 秒 取樣
alloydb_omni_database_postgresql_vacuum_oldest_transaction_age 阻擋 vacuum 作業的最舊未提交交易存在時間。計算方式為最舊交易之後開始的交易數量。 type:[running, prepared, replication_slot, replica] 之一 取樣
alloydb_omni_database_postgresql_vacuum_transaction_id_utilization_percentage 交易 ID 空間耗用率。1 代表 100%。 取樣
alloydb_omni_instance_postgresql_backends_by_state 目前的連線數量。 state:連線狀態,可以是 [idle、active、idle_in_transaction、idle_in_transaction_aborted、disabled、fastpath_function_call] 其中之一 取樣
alloydb_omni_instance_postgresql_backends_for_top_applications 每個應用程式目前的連線數量。 application_name:應用程式名稱 取樣
alloydb_omni_instance_postgresql_blks_hit_count_total Postgres 在緩衝區快取中找到所要求區塊的總次數。 counter
alloydb_omni_instance_postgresql_blks_read_count_total Postgres 讀取的區塊總數,不含 Postgres 緩衝區快取中的區塊。 counter
alloydb_omni_instance_postgresql_committed_transactions_count_total 已提交的交易總數。 計數器
alloydb_omni_instance_postgresql_deadlock_count_total 偵測到的死結數量。 counter
alloydb_omni_instance_postgresql_new_connections_count_total 新連線總數。 counter
alloydb_omni_instance_postgresql_rolledback_transactions_count_total 復原的交易總數。 計數器
alloydb_omni_instance_postgresql_temp_bytes_written_count_total 因查詢而寫入暫存檔案的資料總量。 位元組 counter
alloydb_omni_instance_postgresql_temp_files_written_count_total 執行內部演算法時,用於寫入資料的暫存檔案總數。 counter
alloydb_omni_instance_postgresql_tuples_deleted_count_total 刪除的總列數。 計數器
alloydb_omni_instance_postgresql_tuples_fetched_count_total 擷取的資料列總數。 counter
alloydb_omni_instance_postgresql_tuples_inserted_count_total 插入的資料列總數。 計數器
alloydb_omni_instance_postgresql_tuples_returned_count_total 傳回的資料列總數。 計數器
alloydb_omni_instance_postgresql_tuples_updated_count_total 更新的資料列總數。 counter
alloydb_omni_instance_postgresql_version PostgreSQL 資料庫版本。格式為 MAJOR.MINOR,例如 16.3 取樣
alloydb_omni_instance_postgresql_wait_count_total 等待事件的總等待次數。
  • wait_event_name:等待事件名稱
  • wait_event_type:等待事件的類型
counter
alloydb_omni_instance_postgresql_wait_time_us_total 等待事件經過的總時間。
  • wait_event_name:等待事件的名稱
  • wait_event_type:等待事件的類型
美國 計數器
alloydb_omni_instance_postgresql_replication_flush_lag_ms 從本機清除最近的 WAL,到收到副本伺服器已寫入並清除 (但尚未套用) WAL 的通知,兩者之間經過的時間。
  • application_name:副本連至主要執行個體的連線字串中的 application_name,與副本執行個體 CR 的名稱相符。
  • client_addr:副本執行個體的 IP 位址。
毫秒 取樣
alloydb_omni_instance_postgresql_replication_replay_lag_ms 從本機清除近期 WAL,到收到副本伺服器已寫入、清除及套用 WAL 的通知,兩者之間經過的時間。
  • application_name:副本與主要執行個體連線字串中的 application_name。這與副本例項 CR 的名稱相符。
  • client_addr:副本執行個體的 IP 位址。
毫秒 取樣
alloydb_omni_instance_postgresql_replication_state 連線至主要執行個體的每個副本狀態。值一律為 1。
  • application_name:副本與主要執行個體連線字串中的 application_name。與副本執行個體 CR 的名稱相符。
  • client_addr:副本執行個體的 IP 位址。
  • state:[startup, catchup, streaming, backup, stopping] 其中之一
取樣
alloydb_omni_instance_postgresql_replication_write_lag_ms 從本機排清最近的 WAL,到收到副本伺服器已寫入 (但尚未排清或套用) 的通知之間經過的時間。
  • application_name:副本與主要執行個體連線字串中的 application_name。這與副本例項 CR 的名稱相符。
  • client_addr:副本執行個體的 IP 位址。
毫秒 取樣
alloydb_omni_memory_available_byte 可供分配的記憶體量預估值。 位元組 取樣
alloydb_omni_memory_limit_byte 資料庫叢集資訊清單檔案 spec 部分的 primarySpec 區段中,指定的資料庫執行個體記憶體限制。 位元組 取樣
alloydb_omni_memory_postgresql_shared_buffers_active_byte PostgreSQL 共用緩衝區的目前大小,以位元組為單位。自動記憶體管理模組會根據記憶體壓力自動調整此值。 位元組 取樣
alloydb_omni_memory_postgresql_shared_buffers_byte PostgreSQL 共用緩衝區的大小上限 (以位元組為單位),可透過 shared_buffers 參數設定。 位元組 取樣
alloydb_omni_memory_postgresql_shared_buffers_min_byte PostgreSQL 共用緩衝區大小下限 (以位元組為單位)。 位元組 取樣
alloydb_omni_memory_postgresql_terminated_backends_count_total 因記憶體壓力而由自動記憶體管理模組終止的 PostgreSQL 後端總數。 counter
alloydb_omni_memory_used_byte 無法釋放的資料庫執行個體記憶體用量預估值。 位元組 取樣
alloydb_omni_node_cpu_mcpu 分配的 mCPU 數量。1000 mCPU = 1 個 CPU mCPU 取樣
alloydb_omni_node_cpu_usage_second_total 使用的 CPU 秒數總計。 秒 counter
alloydb_omni_node_network_received_bytes_count_total AlloyDB Omni 執行個體收到的網路位元組數。 位元組 計數器
alloydb_omni_node_network_sent_bytes_count_total AlloyDB Omni 執行個體傳送的網路位元組數。 位元組 計數器
alloydb_omni_node_storage_limit_per_disk_byte 儲存空間上限 (以位元組為單位)。 disk:磁碟名稱 位元組 取樣
alloydb_omni_node_storage_read_bytes_count_total 從磁碟讀取的位元組數。 位元組 counter
alloydb_omni_node_storage_read_ops_count_total 磁碟讀取 IO 作業數量。 counter
alloydb_omni_node_storage_usage_per_disk_byte 每個磁碟使用的儲存空間 (以位元組為單位)。 disk:磁碟名稱 位元組 取樣
alloydb_omni_node_storage_write_bytes_count_total 寫入磁碟的位元組數。 位元組 計數器
alloydb_omni_node_storage_write_ops_count_total 磁碟寫入 IO 作業數量。 counter

資料庫層級指標

這些指標是在每個 AlloyDB Omni 資料庫執行個體中,以每個 Postgres 資料庫為單位收集。 您可以在一個資料庫執行個體中建立多個 PostgreSQL 資料庫。這些指標都有資源、系統中繼資料和「資料庫」標籤。資料庫標籤是指標所屬的 Postgres 資料庫名稱。

某些標籤和指標會依條件顯示:

  • 只有在資料庫叢集參數中將 google_insights.track_client_address 設為 on 時,才會顯示以 alloydb_omni_database_postgresql_insights 開頭的 client_addr 指標標籤。

  • 只有在符合下列條件時,系統才會啟用開頭為 alloydb_omni_database_postgresql_insights_pertag 的指標:

名稱 說明 標籤 單位 類型
alloydb_omni_database_postgresql_backends_for_top_databases 每個資料庫目前的連線數。 取樣
alloydb_omni_database_postgresql_blks_hit_for_top_databases_count_total Postgres 在各資料庫的緩衝區快取中,找到所要求區塊的總次數。 counter
alloydb_omni_database_postgresql_blks_read_for_top_databases_count_total 每個資料庫中,Postgres 讀取的區塊總數 (不在 Postgres 緩衝區快取中)。 counter
alloydb_omni_database_postgresql_committed_transactions_for_top_databases_count_total 每個資料庫的交易總數。 counter
alloydb_omni_database_postgresql_deadlock_for_top_databases_count_total 每個資料庫的死結數量。 counter
alloydb_omni_database_postgresql_insights_aggregate_execution_time_us_total 每個資料庫中,每位使用者的累計查詢執行時間,也就是下列項目的總和:CPU 作業時間、IO 等待時間、鎖定等待時間、程序內容變更,以及查詢執行作業中的所有排定程序。
  • user:資料庫的使用者。
  • client_addr:資料庫用戶端的 IP 位址。
美國 計數器
alloydb_omni_database_postgresql_insights_aggregate_io_time_us_total 每位使用者在每個資料庫的累計 I/O 時間。
  • user:資料庫使用者。
  • client_addr:資料庫用戶端的 IP 位址。
  • io_type:read 或 write
美國 計數器
alloydb_omni_database_postgresql_insights_aggregate_lock_time_us_total 每位使用者在各資料庫的累計鎖定等待時間。
  • user:資料庫的使用者。
  • client_addr:資料庫用戶端的 IP 位址。
  • lock_type:lw、hw 或 buffer_pin
美國 counter
alloydb_omni_database_postgresql_insights_aggregate_row_count_total 執行查詢期間受影響的資料列總數。
  • user:資料庫的使用者。
  • client_addr:資料庫用戶端的 IP 位址。
計數器
alloydb_omni_database_postgresql_insights_aggregate_shared_blk_access_count_total 陳述式執行作業存取的共用區塊 (一般資料表和已編列索引)。
  • user:資料庫使用者。
  • client_addr:資料庫用戶端的 IP 位址。
  • access_type:hit 或 miss
counter
alloydb_omni_database_postgresql_insights_perquery_execution_time_us_total 每位使用者、每個資料庫、每項查詢的累計執行時間。也就是下列項目的總和:CPU 作業時間、I/O 等待時間、鎖定等待時間、程序內容變更,以及查詢執行作業中的所有程序排程。
  • querystring:正規化查詢。
  • user:資料庫的使用者。
  • client_addr:資料庫用戶端的 IP 位址。
  • query_hash:查詢字串的專屬雜湊。
美國 counter
alloydb_omni_database_postgresql_insights_perquery_io_time_us_total 每個查詢、每個資料庫、每位使用者的累計 I/O 時間。
  • querystring:正規化查詢。
  • user:資料庫的使用者。
  • client_addr:資料庫用戶端的 IP 位址。
  • io_type:read 或 write
  • query_hash:查詢字串的專屬雜湊。
美國 counter
alloydb_omni_database_postgresql_insights_perquery_lock_time_us_total 每個查詢、每個資料庫和每位使用者的累計鎖定等待時間。
  • querystring:正規化查詢。
  • user:資料庫的使用者。
  • client_addr:資料庫用戶端的 IP 位址。
  • lock_type:lw、hw 或 buffer_pin
  • query_hash:查詢字串的專屬雜湊。
美國 計數器
alloydb_omni_database_postgresql_insights_perquery_row_count_total 執行查詢期間受影響的資料列總數。
  • querystring:正規化查詢。
  • user:資料庫的使用者。
  • client_addr:資料庫用戶端的 IP 位址。
  • query_hash:查詢字串的專屬雜湊。
計數器
alloydb_omni_database_postgresql_insights_perquery_shared_blk_access_count_total 每次查詢執行陳述式時,存取的共用區塊 (一般資料表和索引)。
  • querystring:正規化查詢。
  • user:資料庫的使用者。
  • client_addr:資料庫用戶端的 IP 位址。
  • access_type:hit或miss
  • query_hash:查詢字串的專屬雜湊。
計數器
alloydb_omni_database_postgresql_insights_pertag_execution_time_us_total 每位使用者、每個資料庫和每個標記的累計執行時間。也就是下列項目的總和:CPU 作業時間、I/O 等待時間、鎖定等待時間、程序內容變更,以及查詢執行作業中的所有程序排程。
  • user:資料庫的使用者。
  • client_addr:資料庫用戶端的 IP 位址。
  • action:動作的名稱。
  • application:應用程式名稱。
  • controller:控制器的名稱。
  • db_driver:db_driver 的名稱。
  • framework:架構名稱。
  • route:路徑名稱。
  • tag_hash:標記字串的專屬雜湊。
美國 counter
alloydb_omni_database_postgresql_insights_pertag_io_time_us_total 每個使用者、資料庫和標記的累計 I/O 時間。
  • user:資料庫使用者。
  • client_addr:資料庫用戶端的 IP 位址。
  • action:動作的名稱。
  • application:應用程式名稱。
  • controller:控制器的名稱。
  • db_driver:db_driver 的名稱。
  • framework:架構名稱。
  • route:路徑名稱。
  • io_type:read 或 write
  • tag_hash:標記字串的專屬雜湊值。
美國 計數器
alloydb_omni_database_postgresql_insights_pertag_lock_time_us_total 每位使用者、每個資料庫和每個標記的累計鎖定等待時間。
  • user:資料庫的使用者。
  • client_addr:資料庫用戶端的 IP 位址。
  • action:動作的名稱。
  • application:應用程式名稱。
  • controller:控制器的名稱。
  • db_driver:db_driver 的名稱。
  • framework:架構名稱。
  • route:路徑名稱。
  • lock_type:lw、hw 或 buffer_pin
  • tag_hash:標記字串的專屬雜湊。
美國 計數器
alloydb_omni_database_postgresql_insights_pertag_row_count_total 執行查詢期間受影響的資料列總數。
  • user:資料庫的使用者。
  • client_addr:資料庫用戶端的 IP 位址。
  • action:動作的名稱。
  • application:應用程式名稱。
  • controller:控制器的名稱。
  • db_driver:db_driver 的名稱。
  • framework:架構名稱。
  • route:路徑名稱。
  • tag_hash:標記字串的專屬雜湊。
counter
alloydb_omni_database_postgresql_insights_pertag_shared_blk_access_count_total 每個標記的陳述式執行作業存取的共用區塊 (一般表格和索引)。
  • user:資料庫使用者。
  • client_addr:資料庫用戶端的 IP 位址。
  • action:動作的名稱。
  • application:應用程式名稱。
  • controller:控制器的名稱。
  • db_driver:db_driver 的名稱。
  • framework:架構名稱。
  • route:路徑名稱。
  • access_type:hit或miss
  • tag_hash:標記字串的專屬雜湊。
counter
alloydb_omni_database_postgresql_new_connections_for_top_databases_count_total 每個資料庫的新連線數量。 計數器
alloydb_omni_database_postgresql_rolledback_transactions_for_top_databases_count_total 每個資料庫復原的交易總數。 計數器
alloydb_omni_database_postgresql_size_byte 資料庫大小。 位元組 取樣
alloydb_omni_database_postgresql_statements_executed_count_total 每個資料庫執行的陳述式總數。 operation_type:作業名稱,可為 [SELECT、UPDATE、INSERT、DELETE、MERGE、UTILITY、NOTHING、UNKNOWN] 之一 計數器
alloydb_omni_database_postgresql_temp_bytes_written_for_top_databases_count_total 各資料庫中因查詢而寫入暫存檔案的資料總量。 位元組 counter
alloydb_omni_database_postgresql_temp_files_written_for_top_databases_count_total 每個資料庫執行內部演算法時,用於寫入資料的暫存檔案總數。 counter
alloydb_omni_database_postgresql_tuples 資料庫中的資料列數。 state:[live, dead] 其中之一 取樣
alloydb_omni_database_postgresql_tuples_deleted_for_top_databases_count_total 每個資料庫刪除的資料列總數。 counter
alloydb_omni_database_postgresql_tuples_fetched_for_top_databases_count_total 每個資料庫擷取的資料列總數。 計數器
alloydb_omni_database_postgresql_tuples_inserted_for_top_databases_count_total 每個資料庫插入的資料列總數。 counter
alloydb_omni_database_postgresql_tuples_returned_for_top_databases_count_total 每個資料庫傳回的資料列總數。 計數器
alloydb_omni_database_postgresql_tuples_updated_for_top_databases_count_total 每個資料庫更新的資料列總數。 counter

指標收集指標

這些指標會顯示每個指標收集週期的狀態。具有「標籤」中提及的資源標籤。

名稱 說明 單位 類型
alloydb_omni_monitor_collect_ms 收集指標所花費的毫秒數。 毫秒 取樣
alloydb_omni_monitor_error_count 嘗試在這個週期收集指標時發生的錯誤數。 取樣
alloydb_omni_monitor_metric_count 這個週期成功收集的指標數量。 取樣

Prometheus 指標處理常式指標

Prometheus 會在每個收集週期自動產生這些指標。

名稱 說明 原因 類型
promhttp_metric_handler_errors_total promhttp 指標處理常式遇到的內部錯誤總數。 錯誤原因 計數器

後續步驟