文档

应用监控指标说明

更新时间:

本文介绍了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