全部產品
Search
文件中心

Application Real-Time Monitoring Service:應用監控指標說明

更新時間:Aug 22, 2024

本文介紹了ARMS應用監控中常見的指標說明,您可以使用這些指標自訂Grafana大盤。

業務類指標

公用維度

維度名稱

維度Key

服務名稱

service

服務PID

pid

機器IP

serverIp

介面

rpc

指標列表

所有訪問類型都包含下列指標,執行查詢操作時,只需要將$callType替換為具體的訪問類型即可。詳細的訪問類型,請參見服務訪問類型及可用維度

例如:需要查詢HTTP服務的請求數時,只需將arms_$callType_requests_count修改為arms_http_requests_count

指標名稱

指標

指標類型

採集間隔

單位

維度

總請求數

arms_$callType_requests_count

Gauge

15s

不同服務訪問類型維度不同,詳細資料,請參見服務訪問類型及可用維度

錯誤請求數

arms_$callType_requests_error_count

Gauge

15s

總請求耗時

arms_$callType_requests_seconds

Gauge

15s

慢請求數

arms_$callType_requests_slow_count

Gauge

15s

總請求耗時分位元

arms_$callType_requests_latency_seconds

Summary

15s

僅當服務訪問類型為HTTP且開啟分位元統計的情況下存在。開啟分位元統計的操作,請參見進階設定

Quantile分位元維度:

  • 0.5

  • 0.75

  • 0.90

  • 0.99

彙總類業務指標

  • 業務類指標針對每種不同的調用類型都建立了單獨的指標,這導致當單個應用程式套件含多個調用類型時(例如A應用同時包含HTTP和Dubbo兩種調用類型),編寫出的promQL會特別冗長。

  • 業務類指標記錄了完整的觀測維度,但在部分統計情境下並不需要所有的觀測維度,這導致直接查詢業務類指標在部分情境下效能較差。

為解決上述兩類問題,ARMS專門建立了彙總類業務指標。

指標說明

彙總類業務指標分為:

  • 通用類

    記錄了所有訪問類型的請求數、錯誤數、慢請求數、平均請求耗時。

  • 資料庫類

    記錄了資料庫訪問類型的請求數、錯誤數、慢請求數、平均請求耗時。

  • SQL類

    記錄了資料庫訪問類型的請求數、錯誤數、慢請求數、平均請求耗時,相比資料庫類增加了SQL維度。

  • 異常類

    記錄了所有訪問類型在出現異常時的請求數及平均請求耗時。

  • 狀態代碼類

    記錄了HTTP情境下不同狀態代碼下的請求數。

  • 分位元類

    記錄了所有訪問類型的請求耗時分位元。

除分位元類外,每個大類中存在兩種指標,一種為普通彙總類指標,指標命名格式為xxx_raw; 一種為降維度指標,指標命名格式為xxx_ign_x_y(x、y為被彙總掉的維度,即該指標中不包含x、y維度)。

指標類型與採集間隔

如無特別說明,所有彙總類業務指標的類型均為Gauge類型,採集間隔為15秒。

公用維度

下述維度每個彙總類指標中都存在,統一說明如下:

維度

說明

pid

應用PID

service

應用程式名稱

serverIp

執行個體IP

source

指標來源:

  • arms

    表示通過ARMS探針接入的應用。

  • xtrace

    表示通過可觀測鏈路 Opentelemetry 版接入的應用。

  • ebpf

    表示通過應用監控 ebpf 版探針接入的應用。

指標列表

指標名稱

指標

單位

其他維度

通用請求數

arms_app_requests_count_raw

  • callType:訪問類型

  • rpc:介面名稱

  • prpc:上遊介面名稱

  • ppid:上遊應用PID

  • parent:上遊應用程式名稱

  • endpoint:當callType為http_client時表示對端介面,其他情境均表示遠端地址。

  • destId:當callType為資料庫類型時表示資料庫庫名,其他情境均表示遠端地址。

arms_app_requests_count_ign_destid_endpoint_rpc

不包含destId、endpoint、rpc三個維度。

arms_app_requests_count_ign_destid_endpoint_ppid_prpc

不包含destId、endpoint、ppid、prpc維度。

arms_app_requests_count_ign_destid_endpoint_ppid_prpc_rpc

不包含destId、endpoint、ppid、prpc、rpc維度。

arms_app_requests_count_ign_parent_ppid_prpc_rpc

不包含parent、ppid、prpc、rpc維度。

arms_app_requests_count_ign_endpoint_parent_ppid_prpc_rpc

不包含endpoint、parent、ppid、prpc、rpc維度。

通用請求錯誤數

arms_app_requests_error_count_raw

  • callType:訪問類型

  • rpc:介面名稱

  • prpc:上遊介面名稱

  • ppid:上遊應用PID

  • parent:上遊應用程式名稱

  • endpoint:當callType為http_client時表示對端介面,其他情境均表示遠端地址。

  • destId:當callType為資料庫類型時表示資料庫庫名,其他情境均表示遠端地址。

arms_app_requests_error_count_ign_destid_endpoint_rpc

不包含destId、endpoint、rpc三個維度。

arms_app_requests_error_count_ign_destid_endpoint_ppid_prpc

不包含destId、endpoint、ppid、prpc維度。

arms_app_requests_error_count_ign_destid_endpoint_ppid_prpc_rpc

不包含destId、endpoint、ppid、prpc、rpc維度。

arms_app_requests_error_count_ign_parent_ppid_prpc_rpc

不包含parent、ppid、prpc、rpc維度。

arms_app_requests_error_count_ign_endpoint_parent_ppid_prpc_rpc

不包含endpoint、parent、ppid、prpc、rpc維度。

通用慢請求次數

arms_app_requests_slow_count_raw

  • callType:訪問類型

  • rpc:介面名稱

  • prpc:上遊介面名稱

  • ppid:上遊應用PID

  • parent:上遊應用程式名稱

  • endpoint:當callType為http_client時表示對端介面,其他情境均表示遠端地址。

  • destId:當callType為資料庫類型時表示資料庫庫名,其他情境均表示遠端地址。

arms_app_requests_slow_count_ign_destid_endpoint_rpc

不包含destId、endpoint、rpc三個維度。

arms_app_requests_slow_count_ign_destid_endpoint_ppid_prpc

不包含destId、endpoint、ppid、prpc維度。

arms_app_requests_slow_count_ign_destid_endpoint_ppid_prpc_rpc

不包含destId、endpoint、ppid、prpc、rpc維度。

arms_app_requests_slow_count_ign_parent_ppid_prpc_rpc

不包含parent、ppid、prpc、rpc維度。

arms_app_requests_slow_count_ign_endpoint_parent_ppid_prpc_rpc

不包含endpoint、parent、ppid、prpc、rpc維度。

通用平均請求耗時

arms_app_requests_seconds_raw

  • callType:訪問類型

  • rpc:介面名稱

  • prpc:上遊介面名稱

  • ppid:上遊應用PID

  • parent:上遊應用程式名稱

  • endpoint:當callType為http_client時表示對端介面,其他情境均表示遠端地址。

  • destId:當callType為資料庫類型時表示資料庫庫名,其他情境均表示遠端地址。

arms_app_requests_seconds_ign_destid_endpoint_rpc

不包含destId、endpoint、rpc三個維度。

arms_app_requests_seconds_ign_destid_endpoint_ppid_prpc

不包含destId、endpoint、ppid、prpc維度。

arms_app_requests_seconds_ign_destid_endpoint_ppid_prpc_rpc

不包含destId、endpoint、ppid、prpc、rpc維度。

arms_app_requests_seconds_ign_parent_ppid_prpc_rpc

不包含parent、ppid、prpc、rpc維度。

arms_app_requests_seconds_ign_endpoint_parent_ppid_prpc_rpc

不包含endpoint、parent、ppid、prpc、rpc維度。

資料庫請求數

arms_db_requests_count_raw

  • callType:訪問類型

  • rpc:介面名稱

  • endpoint:資料庫執行個體地址

  • destId:資料庫庫名

arms_db_requests_count_ign_rpc

不包含介面維度。

資料庫請求錯誤數

arms_db_requests_error_count_raw

  • callType:訪問類型

  • rpc:介面名稱

  • endpoint:資料庫執行個體地址

  • destId:資料庫庫名

arms_db_requests_error_count_ign_rpc

不包含介面維度。

資料庫慢請求次數

arms_db_requests_slow_count_raw

  • callType:訪問類型

  • rpc:介面名稱

  • endpoint:資料庫執行個體地址

  • destId:資料庫庫名

arms_db_requests_slow_count_ign_rpc

不包含介面維度。

資料庫平均請求耗時

arms_db_requests_seconds_raw

  • callType:訪問類型

  • rpc:介面名稱

  • endpoint:資料庫執行個體地址

  • destId:資料庫庫名

arms_db_requests_seconds_ign_rpc

不包含介面維度。

SQL請求數

arms_sql_requests_count_raw

  • callType:訪問類型

  • rpc:介面名稱

  • endpoint:資料庫執行個體地址

  • destId:資料庫庫名

  • sqlId:SQL語句ID

arms_sql_requests_count_ign_rpc

不包含介面維度。

SQL請求錯誤數

arms_sql_requests_error_count_raw

  • callType:訪問類型

  • rpc:介面名稱

  • endpoint:資料庫執行個體地址

  • destId:資料庫庫名

  • sqlId:SQL語句ID

arms_sql_requests_error_count_ign_rpc

不包含介面維度。

SQL慢請求數

arms_sql_requests_slow_count_raw

  • callType:訪問類型

  • rpc:介面名稱

  • endpoint:資料庫執行個體地址

  • destId:資料庫庫名

  • sqlId:SQL語句ID

arms_sql_requests_slow_count_ign_rpc

不包含介面維度。

SQL平均請求耗時

arms_sql_requests_seconds_raw

  • callType:訪問類型

  • rpc:介面名稱

  • endpoint:資料庫執行個體地址

  • destId:資料庫庫名

  • sqlId:SQL語句ID

arms_sql_requests_seconds_ign_rpc

不包含介面維度。

異常請求數

arms_exception_requests_count_raw

  • callType:訪問類型

  • rpc:介面名稱

  • endpoint:當callType為http_client時表示對端介面,其他情境均表示遠端地址。

  • destId:當callType為資料庫類型時表示資料庫庫名,其他情境均表示遠端地址。

  • excepInfo:異常編碼方式

  • excepType:異常編碼ID

  • excepName:異常名稱

arms_exception_requests_count_ign_rpc

不包含介面維度。

異常平均請求耗時

arms_exception_requests_seconds_raw

  • callType:訪問類型

  • rpc:介面名稱

  • endpoint:當callType為http_client時表示對端介面,其他情境均表示遠端地址。

  • destId:當callType為資料庫類型時表示資料庫庫名,其他情境均表示遠端地址。

  • excepInfo:異常編碼方式

  • excepType:異常編碼ID

  • excepName:異常名稱

arms_exception_requests_seconds_ign_rpc

不包含介面維度。

不同狀態代碼請求數

arms_requests_by_status_count_raw

  • rpc:介面名稱

  • status狀態代碼:

    • 200:HTTP狀態代碼為200

    • 2xx:HTTP狀態代碼大於200小於300

    • 3xx:HTTP狀態代碼大於等於300小於400

    • 4xx:HTTP狀態代碼大於等於400小於500

    • 5xx:HTTP狀態代碼大於等於500

arms_requests_by_status_count_ign_rpc

不包含介面維度。

請求耗時分位元

說明

僅4.x及以上版本探針支援。

arms_uni_requests_latency_seconds

  • callType:訪問類型

  • rpc:介面名稱

  • quantile分位元:

    • 0.5:50分位元

    • 0.75:75分位元

    • 0.90:90分位元

    • 0.99:99分位元

  • endpoint:當callType為http_client時表示對端介面,其他情境均表示遠端地址。

  • destId:當callType為資料庫類型時表示資料庫庫名,其他情境均表示遠端地址。

  • excepInfo:異常編碼方式

  • excepType:異常編碼ID

  • excepName:異常名稱

  • status狀態代碼:

    • 200:HTTP狀態代碼為200

    • 2xx:HTTP狀態代碼大於200小於300

    • 3xx:HTTP狀態代碼大於等於300小於400

    • 4xx:HTTP狀態代碼大於等於400小於500

    • 5xx:HTTP狀態代碼大於等於500

使用樣本

使用promQL統計應用所有介面的請求數、平均請求耗時,如何選擇指標?

  1. 首先從通用類指標中進行選擇,只有該類指標提供了對應用介面請求數、平均請求耗時的統計。

  2. 其次統計結果只關心介面維度,其他維度,例如上遊介面、上遊應用、遠端地址等都不關心,那麼在選擇具體指標時,先要確認指標中包含了介面維度,然後指標中所包含的其他維度越少越好。

綜上,最優的指標應該是arms_app_requests_count_ign_destid_endpoint_ppid_prpc

JVM指標

公用維度

維度名稱

維度Key

服務名稱

service

服務PID

pid

機器IP

serverIp

指標列表

指標名稱

指標

指標類型

採集間隔

單位

維度

累計GC發生次數

arms_jvm_gc_total

Counter

15s

Gen GC發生地區:

  • Young:年輕代

  • Old:老年代

累計GC耗時

arms_jvm_gc_seconds_total

Counter

15s

兩次採集間隔之間的GC次數

arms_jvm_gc_delta

Gauge

15s

兩次採集間隔之間的GC耗時

arms_jvm_gc_seconds_delta

Gauge

15s

JVM線程數

arms_jvm_threads_count

Gauge

15s

State線程狀態:

  • Blocked:阻塞狀態

  • Live:活躍狀態

  • Daemon:守護狀態

  • New:初始狀態

  • Dead-lock:死結狀態

  • Runnable:運行狀態

  • Terminated:終止狀態

  • Timed-wait:逾時等待狀態

  • Wait:等待狀態

JVM記憶體地區初始大小

arms_jvm_mem_init_bytes

Gauge

15s

位元組

Area地區:

  • Heap:堆區

  • Nonheap:非堆區

  • Total:總計

ID地區細分:

  • Eden:伊甸區

  • Old:老年代

  • Survivor:倖存者區

  • Metaspace:中繼資料區

  • Code cache:代碼緩衝區

  • Compressed class space:壓縮類空間

  • Total:總計

JVM記憶體地區最大大小

arms_jvm_mem_max_bytes

Gauge

15s

位元組

JVM記憶體地區使用大小

arms_jvm_mem_used_bytes

Gauge

15s

位元組

JVM記憶體地區已提交大小

arms_jvm_mem_committed_bytes

Gauge

15s

位元組

JVM記憶體地區使用比例

arms_jvm_mem_usage_ratio

Gauge

15s

比例(0~1)

JVM已載入類

arms_class_load_loaded

Counter

15s

JVM已卸載類

arms_class_load_un_loaded

Counter

15s

JVM緩衝池大小

arms_jvm_buffer_pool_total_bytes

Gauge

15s

位元組

ID地區:

  • Direct

  • Mapped

JVM緩衝池已使用大小

arms_jvm_buffer_pool_used_bytes

Gauge

15s

位元組

JVM緩衝池個數

arms_jvm_buffer_pool_count

Gauge

15s

檔案描述符開啟個數

arms_file_desc_open_count

Gauge

15s

檔案描述符開啟比例(已開啟數/最大允許開啟數)

arms_file_desc_open_ratio

Gauge

15s

比例(0~1)

系統指標

公用維度

維度名稱

維度Key

服務名稱

service

服務PID

pid

機器IP

serverIp

指標列表

指標名稱

指標

指標類型

採集間隔

單位

空閑CPU佔比

arms_system_cpu_idle

Gauge

15s

百分數

IO等待CPU佔比

arms_system_cpu_io_wait

Gauge

15s

百分數

系統CPU佔比

arms_system_cpu_system

Gauge

15s

百分數

使用者態CPU佔比

arms_system_cpu_user

Gauge

15s

百分數

系統負載(1分鐘)

arms_system_load

Gauge

15s

磁碟空閑大小

arms_system_disk_free_bytes

Gauge

15s

位元組

磁碟總大小

arms_system_disk_total_bytes

Gauge

15s

位元組

磁碟使用率

arms_system_disk_used_ratio

Gauge

15s

比例(0~1)

記憶體Buffer大小

arms_system_mem_buffers_bytes

Gauge

15s

位元組

記憶體緩衝大小

arms_system_mem_cached_bytes

Gauge

15s

位元組

記憶體空閑大小

arms_system_mem_free_bytes

Gauge

15s

位元組

記憶體交換區空閑大小

arms_system_mem_swap_free_bytes

Gauge

15s

位元組

記憶體交換區大小

arms_system_mem_swap_total_bytes

Gauge

15s

位元組

記憶體大小

arms_system_mem_total_bytes

Gauge

15s

位元組

已用記憶體大小

arms_system_mem_used_bytes

Gauge

15s

位元組

網路接收流量大小

arms_system_net_in_bytes

Gauge

15s

位元組

網口發送流量大小

arms_system_net_out_bytes

Gauge

15s

位元組

網路入口錯誤數

arms_system_net_in_err

Gauge

15s

網路出口錯誤數

arms_system_net_out_err

Gauge

15s

線程池/串連池指標

公用維度

維度名稱

維度Key

服務名稱

service

服務PID

pid

機器IP

serverIp

線程池名稱(4.1.x以下探針版本支援)

name

線程池類型(4.1.x以下探針版本支援)

type

指標列表

4.1.x及以上探針版本

線程池指標

指標名稱

指標

指標類型

採集間隔

維度

核心線程數

arms_thread_pool_core_pool_size

Gauge

15s

  • thread_name_pattern:線程名字pattern,例如http-nio-8080-*

  • thread_pool_usage:線程池用途,例如Tomcat、Dubbo、Undertow等。

最大空閑串連數

arms_thread_pool_max_pool_size

Gauge

15s

  • thread_name_pattern:線程名字pattern,例如http-nio-8080-*

  • thread_pool_usage:線程池用途,例如Tomcat、Dubbo、Undertow等。

活躍線程數

arms_thread_pool_active_thread_count

Gauge

15s

  • thread_name_pattern:線程名字pattern,例如http-nio-8080-*

  • thread_pool_usage:線程池用途,例如Tomcat、Dubbo、Undertow等。

當前線程數

arms_thread_pool_current_thread_count

Gauge

15s

  • thread_name_pattern:線程名字pattern,例如http-nio-8080-*

  • thread_pool_usage:線程池用途,例如Tomcat、Dubbo、Undertow等。

線程池歷史最大線程數

arms_thread_pool_max_thread_count

Gauge

15s

  • thread_name_pattern:線程名字pattern,例如http-nio-8080-*

  • thread_pool_usage:線程池用途,例如Tomcat、Dubbo、Undertow等。

線程池調度任務數

arms_thread_pool_scheduled_task_count

Counter

15s

  • thread_name_pattern:線程名字pattern,例如http-nio-8080-*

  • thread_pool_usage:線程池用途,例如Tomcat、Dubbo、Undertow等。

線程池執行完成任務數

arms_thread_pool_completed_task_count

Counter

15s

  • thread_name_pattern:線程名字pattern,例如http-nio-8080-*

  • thread_pool_usage:線程池用途,例如Tomcat、Dubbo、Undertow等。

線程池拒絕任務數

arms_thread_pool_rejected_task_count

Counter

15s

  • thread_name_pattern:線程名字pattern,例如http-nio-8080-*

  • thread_pool_usage:線程池用途,例如Tomcat、Dubbo、Undertow等。

線程池任務隊列大小

arms_thread_pool_queue_size

Gauge

15s

  • thread_name_pattern:線程名字pattern,例如http-nio-8080-*

  • thread_pool_usage:線程池用途,例如Tomcat、Dubbo、Undertow等。

串連池指標

指標描述

指標名

指標類型

採集間隔

維度

串連數

arms_connection_pool_connection_count

Gauge

15s

  • state:串連狀態。

    • active

    • idle

  • pool_type: 串連池類型,例如Druid,c3p0。

  • url: 資料庫連接串。

最小空閑串連數

arms_connection_pool_connection_min_idle_count

Gauge

15s

  • pool_type: 串連池類型,例如Druid,c3p0。

  • url: 資料庫連接串。

最大空閑串連數

arms_connection_pool_connection_max_idle_count

Gauge

15s

  • pool_type: 串連池類型,例如Druid,c3p0。

  • url: 資料庫連接串。

最大串連數

arms_connection_pool_connection_max_count

Gauge

15s

  • pool_type: 串連池類型,例如Druid,c3p0。

  • url: 資料庫連接串。

阻塞的串連請求數

arms_connection_pool_pending_request_count

Counter

15s

  • pool_type: 串連池類型,例如Druid,c3p0。

  • url: 資料庫連接串。

4.1.x以下探針版本

指標名稱

指標

指標類型

採集間隔

維度

線程池核心線程數

arms_threadpool_core_size

Gauge

15s

線程池最大線程數

arms_threadpool_max_size

Gauge

15s

線程池活躍線程數

arms_threadpool_active_size

Gauge

15s

線程池隊列大小

arms_threadpool_queue_size

Gauge

15s

線程池當前大小

arms_threadpool_current_size

Gauge

15s

線程池不同狀態任務數

arms_threadpool_task_total

Gauge

15s

Status任務狀態:

  • Scheduled:已調度

  • Completed:完成

  • Rejected:拒絕

定時任務指標

僅定時任務存在以下指標。

公用維度

維度名稱

維度Key

服務名稱

service

服務PID

pid

機器IP

serverIp

任務ID

rpc

指標列表

指標名稱

指標

指標類型

採集間隔

單位

調度延遲

arms_$callType_delay_milliseconds

Gauge

15s

毫秒

服務訪問類型及可用維度

用戶端類

  • 訪問類型

    • http_client

    • dubbo_client

    • hsf_client

    • dsf_client

    • notify_client

    • grpc_client

    • thrift_client

    • sofa_client

    • mq_client

    • kafka_client

  • 維度

    • parent:上遊服務的名稱

    • ppid:上遊服務PID

    • destId:請求對端擴充資訊

    • endpoint:請求對端地址

    • excepType:異常ID

    • excepInfo:異常ID編碼規則

    • excepName:異常名稱

    • stackTraceId:異常棧ID

DB類

  • 訪問類型

    • mysql

    • oracle

    • mariadb

    • postgresql

    • ppas

    • sqlserver

    • mongodb

    • dmdb

  • 維度

    • parent:上遊服務的名稱

    • ppid:上遊服務PID

    • destId:資料庫名稱

    • endpoint:資料庫地址

    • excepType:異常ID

    • excepInfo:異常ID編碼規則

    • excepName:異常名稱

    • stackTraceId:異常棧ID

    • sqlId:SQL語句ID

服務端類

  • 訪問類型

    • http

    • dubbo

    • hsf

    • dsf

    • user_method

    • mq

    • kafka

    • grpc

    • thrift

    • sofa

  • 維度

    • prpc:上遊介面

    • parent:上遊服務的名稱

    • ppid:上遊服務PID

    • endpoint:服務地址

    • excepType:異常ID

    • excepInfo:異常ID編碼規則

    • excepName:異常名稱

    • stackTraceId:異常棧ID

定時任務類

  • 訪問類型

    • xxl_job

    • spring_scheduled

    • quartz

    • elasticjob

    • jdk_timer

    • schedulerx

  • 維度

    • prpc:上遊介面

    • parent:上遊服務的名稱

    • ppid:上遊服務PID

    • excepType:異常ID

    • excepInfo:異常ID編碼規則

    • excepName:異常名稱

    • stackTraceId:異常棧ID