文档

仪表盘

更新时间:

借助于阿里云ARMS Prometheus监控服务和Grafana的指标存储和展示能力,云消息队列 Kafka 版提供仪表盘功能。该功能可帮助您一站式、全方位、多维度地统计和观测指标,进而快速了解业务的运行状态。

前提条件

  • 开通ARMS Prometheus监控服务

  • 创建服务关联角色

    • 角色名称:AliyunServiceRoleForAlikafka

    • 角色策略名称:AliyunServiceRolePolicyForAlikafka

    • 权限说明:允许云消息队列 Kafka 版使用该角色访问您的服务(云监控和ARMS服务)以完成云监控和仪表盘相关功能。

    • 具体文档说明:服务关联角色

计费说明

云消息队列 Kafka 版指标在阿里云ARMS Prometheus监控服务中属于基础指标,基础指标免费使用,因此使用Prometheus大盘功能不收取费用。

更多信息,请参见指标说明按量计费

Metrics指标详情

Metrics指标中字段说明如下:

字段

取值

Metrics类型

  • Counter:累计型的度量指标,其数值只增不减。例如,生产者总请求量。

  • Gauge:一种既可以增加又可以减少的度量指标,其数值表示统计对象的瞬间值。例如,实例发送预留规格。

  • Summary:类似于直方图,用于度量指标值的分布区间。例如,请求体的大小。

Label

  • tenant_userid:阿里云主账号ID。

  • instance_id:云消息队列 Kafka 版实例的ID。

  • instance_name:云消息队列 Kafka 版实例名称。

  • topic:云消息队列 Kafka 版的主题。

  • partition:分区。

  • group_id:消费组。

  • authentication_type:

    • VPC_PLAINTEXT

    • PUB_SASL_SSL

    • VPC_SASL_PLAINTEXT

    • VPC_SASL_SSL

实例Metrics指标

Metrics类型

Metrics名称

描述

Labels

Gauge

kafka_disk_log_size

实例存储大小。单位:Byte。

  • tenant_userid

  • instance_id

  • instance_name

Gauge

kafka_server_cloudenhancedreplicamanager_allreplicascount

所有副本的总分区数。

  • tenant_userid

  • instance_id

  • instance_name

Gauge

kafka_server_socket_server_metrics_connection_count

连接数。

  • tenant_userid

  • instance_id

  • instance_name

  • authentication_type

Gauge

kafka_instance_io_spec_write

实例发送预留规格。

  • tenant_userid

  • instance_id

  • instance_name

Gauge

kafka_instance_io_spec_read

实例消费预留规格。

  • tenant_userid

  • instance_id

  • instance_name

Counter

kafka_server_brokertopicmetrics_bytesin_total

生产流量(jmx-exporter指标)。

  • tenant_userid

  • instance_id

  • instance_name

  • authentication_type

Counter

kafka_server_brokertopicmetrics_bytesout_total

消费流量(jmx-exporter指标)。

  • tenant_userid

  • instance_id

  • instance_name

  • authentication_type

Counter

kafka_server_brokertopicmetrics_failedproducerequests_total

生产者失败请求量。

  • tenant_userid

  • instance_id

  • instance_name

Counter

kafka_server_brokertopicmetrics_totalproducerequests_total

生产者总请求量。

  • tenant_userid

  • instance_id

  • instance_name

  • authentication_type

Counter

kafka_server_brokertopicmetrics_failedfetchrequests_total

消费者失败请求量。

  • tenant_userid

  • instance_id

  • instance_name

  • authentication_type

Counter

kafka_server_brokertopicmetrics_totalfetchrequests_total

消费者总请求量。

  • tenant_userid

  • instance_id

  • instance_name

  • authentication_type

Gauge

kafka_network_socketserver_expiredconnectionskilledcount

过期连接数。

  • tenant_userid

  • instance_id

  • instance_name

Summary

kafka_network_requestmetrics_requestbytes

请求体的大小。

  • tenant_userid

  • instance_id

  • instance_name

Counter

kafka_server_brokertopicmetrics_bytesrejected_total

当记录批处理大小大于max.message.bytes配置时,每个Topic被拒绝的流量,单位:Byte。

  • tenant_userid

  • instance_id

  • instance_name

Counter

kafka_server_brokertopicmetrics_nokeycompactedtopicrecords_total

Compact Topic没有设置key的记录数。

  • tenant_userid

  • instance_id

  • instance_name

Counter

kafka_server_brokertopicmetrics_invalidmessagecrcrecords_total

CRC校验失败次数。

  • tenant_userid

  • instance_id

  • instance_name

Counter

kafka_server_brokertopicmetrics_invalidmagicnumberrecords_total

消息版本校验失败次数。

  • tenant_userid

  • instance_id

  • instance_name

Counter

kafka_server_brokertopicmetrics_invalidoffsetorsequencerecords_total

不连续Offset或Sequence Number导致的消息验证失败次数。

  • tenant_userid

  • instance_id

  • instance_name

Topic Metrics指标

Metrics类型

Metrics名称

描述

Labels

Guage

kafka_log_log_size

Topic分区存储大小。

  • tenant_userid

  • instance_id

  • instance_name

  • topic

  • partition

Guage

kafka_topic_partition_current_offset

分区最大Offset。

  • tenant_userid

  • instance_id

  • instance_name

  • topic

  • partition

Guage

kafka_topic_partition_oldest_offset

分区最小Offset。

  • tenant_userid

  • instance_id

  • instance_name

  • topic

  • partition

Guage

kafka_consumergroup_lag

消息堆积量。

  • tenant_userid

  • instance_id

  • instance_name

  • topic

Counter

kafka_server_brokertopicmetrics_totalfetchrequests_total

请求次数。

  • tenant_userid

  • instance_id

  • instance_name

  • topic

  • authentication_type

Counter

kafka_server_brokertopicmetrics_bytesin_total

生产流量(jmx-exporter指标)。

  • tenant_userid

  • instance_id

  • instance_name

  • authentication_type

Counter

kafka_server_brokertopicmetrics_bytesout_total

流出流量,单位:Byte。

  • tenant_userid

  • instance_id

  • instance_name

  • topic

  • authentication_type

Counter

kafka_server_brokertopicmetrics_messagesin_total

消息流入量,单位:message。

  • tenant_userid

  • instance_id

  • instance_name

  • topic

  • authentication_type

Group Metrics指标

Metrics类型

Metrics名称

描述

Labels

Gauge

kafka_consumergroup_lag

消息堆积总量。

  • tenant_userid

  • instance_id

  • instance_name

  • topic

  • group_id

Counter

kafka_consumergroup_current_offset

Group消费位点。

  • tenant_userid

  • instance_id

  • instance_name

  • topic

  • partition

  • group_id

查看仪表盘

  1. 登录云消息队列 Kafka 版控制台,在概览页面的资源分布区域,选择地域。

  2. 实例列表页面,单击目标实例名称。

  3. 在左侧导航栏,单击可观测 > 仪表盘

  4. 仪表盘页面右上角设置时间范围,查看实例的存储大小、分区数、连接数、流量流入流出等相关指标。

    如需查看Topic和Group的仪表盘监控数据,请在Topic和Group的详情页面的仪表盘页签查看。

    • Topic详情页面:可查看指定Topic的生产相关指标以及生产者客户端相关指标。

    • Group 详情页面:可查看指定Group的消费堆积相关指标以及消费者客户端相关指标。

常见问题

如何将仪表盘的指标数据接入自建Grafana?

云消息队列 Kafka 版的所有指标数据已保存到您的阿里云可观测监控 Prometheus 版中,您可以通过可观测监控 Prometheus 版提供的API将云消息队列 Kafka 版的仪表盘的指标数据接入到本地自建Grafana中。

具体操作,请参见将Prometheus的监控数据接入本地Grafana