本文介绍KAFKA指标的详细信息。
KAFKA指标包含以下部分:
Kafka-Topic
参数 | 指标 | 描述 |
UnderReplicated | Kafka_Broker_kafka_cluster_Partition_UnderReplicated | Topic-Partition是否在非同步状态。 |
UnderMinIsr | Kafka_Broker_kafka_cluster_Partition_UnderMinIsr | Topic-Partition是否处于小于MinIsr状态。 |
BytesInPerSec | Kafka_Topic_kafka_server_BrokerTopicMetrics_BytesInPerSec_OneMinuteRate | Topic每秒流量入口字节数。单位:Byte。 |
BytesOutPerSec | Kafka_Topic_kafka_server_BrokerTopicMetrics_BytesOutPerSec_OneMinuteRate | Topic每秒流量出口字节数。单位:Byte。 |
MessagesInPerSec | Kafka_Topic_kafka_server_BrokerTopicMetrics_MessagesInPerSec_OneMinuteRate | Topic每秒流量入口条数。 |
TotalFetchRequestsPerSec | Kafka_Topic_kafka_server_BrokerTopicMetrics_TotalFetchRequestsPerSec_OneMinuteRate | Topic每秒Fetch请求次数。 |
TotalProduceRequestsPerSec | Kafka_Topic_kafka_server_BrokerTopicMetrics_TotalProduceRequestsPerSec_OneMinuteRate | Topic每秒Produce请求次数。 |
FailedFetchRequestsPerSec | Kafka_Topic_kafka_server_BrokerTopicMetrics_FailedFetchRequestsPerSec_OneMinuteRate | Topic每秒失败Fetch请求次数。 |
FailedProduceRequestsPerSec | Kafka_Topic_kafka_server_BrokerTopicMetrics_FailedProduceRequestsPerSec_OneMinuteRate | Topic每秒失败Produce请求次数。 |
FetchMessageConversionsPerSec | Kafka_Topic_kafka_server_BrokerTopicMetrics_FetchMessageConversionsPerSec_OneMinuteRate | Topic每秒Fetch Request导致的消息版本转换的条数。 |
ProduceMessageConversionsPerSe | Kafka_Topic_kafka_server_BrokerTopicMetrics_ProduceMessageConversionsPerSec_OneMinuteRate | Topic每秒Produce Request导致的消息版本转换的条数。 |
Kafka-Broker
Request Time
参数 | 指标 | 描述 |
Total request time in milliseconds(Produce) | Kafka_Broker_kafka_network_RequestMetrics_TotalTimeMs_99thPercentile | Produce Request处理时长。单位:ms。 |
Total request time in milliseconds(Fetch) | Kafka_Broker_kafka_network_RequestMetrics_TotalTimeMs_99thPercentile | Fetch Request处理时长。单位:ms。 |
FetchFollower request total time | Kafka_Broker_kafka_network_RequestMetrics_TotalTimeMs_99thPercentile | FetchFollower Request处理时长。单位:ms。 |
FetchConsumer request total time | Kafka_Broker_kafka_network_RequestMetrics_TotalTimeMs_99thPercentile | FetchConsumer Request处理时长。单位:ms。 |
Produce Request Queue Time | Kafka_Broker_kafka_network_RequestMetrics_RequestQueueTimeMs_99thPercentile | Produce Request在请求队列中等待的时间。单位:ms。 |
FetchConsumer Request Queue Time | Kafka_Broker_kafka_network_RequestMetrics_RequestQueueTimeMs_99thPercentile | FetchConsumer Request在请求队列中等待的时间。单位:ms。 |
FetchFollower Request Queue Time | Kafka_Broker_kafka_network_RequestMetrics_RequestQueueTimeMs_99thPercentile | FetchFollower Request在请求队列中等待的时间。单位:ms。 |
Produce Local time in milliseconds | Kafka_Broker_kafka_network_RequestMetrics_LocalTimeMs_99thPercentile | Produce Request在Leader处的处理时间。单位:ms。 |
FetchConsumer Local time in milliseconds | Kafka_Broker_kafka_network_RequestMetrics_LocalTimeMs_99thPercentile | FetchFollower Request在Leader处的处理时间。单位:ms。 |
FetchFollower Local time in milliseconds | Kafka_Broker_kafka_network_RequestMetrics_LocalTimeMs_99thPercentile | FetchFollower Request在Leader处的处理时间。单位:ms。 |
Produce Remote time in milliseconds | Kafka_Broker_kafka_network_RequestMetrics_LocalTimeMs_99thPercentile | Produce Request等待跟随者的时间。单位:ms。 |
FetchConsumer Remote time in milliseconds | Kafka_Broker_kafka_network_RequestMetrics_RemoteTimeMs_99thPercentile | FetchConsumer Request等待关注者的时间。单位:ms。 |
FetchFollower Remote time in milliseconds | Kafka_Broker_kafka_network_RequestMetrics_RemoteTimeMs_99thPercentile | FetchFollower Request等待关注者的时间。单位:ms。 |
Produce Response queue time in milliseconds | Kafka_Broker_kafka_network_RequestMetrics_RemoteTimeMs_99thPercentile | Produce Request在响应队列中等待的时间。单位:ms。 |
FetchFollower Response queue time in milliseconds | Kafka_Broker_kafka_network_RequestMetrics_ResponseQueueTimeMs_99thPercentile | FetchFollower Request在响应队列中等待的时间。单位:ms。 |
FetchConsumer Response queue time in milliseconds | Kafka_Broker_kafka_network_RequestMetrics_ResponseQueueTimeMs_99thPercentile | FetchConsumer Request在响应队列中等待的时间。单位:ms。 |
Produce Response send time in milliseconds | Kafka_Broker_kafka_network_RequestMetrics_ResponseQueueTimeMs_99thPercentile | 发送Produce Request响应的时间。单位:ms。 |
FetchConsumer Response send time in milliseconds | Kafka_Broker_kafka_network_RequestMetrics_ResponseSendTimeMs_99thPercentile | 发送FetchConsumer Request响应的时间。单位:ms。 |
FetchFollower Response send time in milliseconds | Kafka_Broker_kafka_network_RequestMetrics_ResponseSendTimeMs_99thPercentile | 发送FetchFollower Request响应的时间。单位:ms。 |
Status
参数 | 指标 | 描述 |
LeaderCount | Kafka_Broker_kafka_server_ReplicaManager_LeaderCount | Leader个数。 |
PartitionCount | Kafka_Broker_kafka_server_ReplicaManager_PartitionCount | Partition个数。 |
OfflineLogDirectoryCount | Kafka_Broker_kafka_log_LogManager_OfflineLogDirectoryCount | Directory Offline个数。 |
UnderReplicatedPartitions | Kafka_Broker_kafka_server_ReplicaManager_UnderReplicatedPartitions | 处于未同步状态的Partition个数。 |
OfflineReplicaCount | Kafka_Broker_kafka_server_ReplicaManager_OfflineReplicaCount | Offline Replica个数。 |
UnderMinIsrPartitionCount | Kafka_Broker_kafka_server_ReplicaManager_UnderMinIsrPartitionCount | 低于Min Isr partition的个数。 |
Request Rate
参数 | 指标 | 描述 |
TotalProduceRequestsPerSec | Kafka_Broker_kafka_server_BrokerTopicMetrics_TotalProduceRequestsPerSec_OneMinuteRate | Broker每秒Produce请求次数。 |
TotalFetchRequestsPerSec | Kafka_Broker_kafka_server_BrokerTopicMetrics_TotalFetchRequestsPerSec_OneMinuteRate | Broker每秒Fetch请求次数。 |
FailedProduceRequestsPerSec | Kafka_Broker_kafka_server_BrokerTopicMetrics_FailedProduceRequestsPerSec_OneMinuteRate | Broker每秒失败Produce请求次数。 |
FailedFetchRequestsPerSec | Kafka_Broker_kafka_server_BrokerTopicMetrics_FailedFetchRequestsPerSec_OneMinuteRate | Broker每秒失败Fetch请求次数。 |
Produce Request rate | Kafka_Broker_kafka_network_RequestMetrics_RequestsPerSec_OneMinuteRate | Produce每秒请求数。 |
Fetch Request rate | Kafka_Broker_kafka_network_RequestMetrics_RequestsPerSec_OneMinuteRate | Fetch每秒请求数。 |
ConsumerFetch Request rate | Kafka_Broker_kafka_network_RequestMetrics_RequestsPerSec_OneMinuteRate | Consumer Fetch每秒请求数。 |
FetchFollower Request rate | Kafka_Broker_kafka_network_RequestMetrics_RequestsPerSec_OneMinuteRate | Follower Fetch每秒请求数。 |
MessageConversion
参数 | 指标 | 描述 |
FetchMessageConversionsPerSec | Kafka_Broker_kafka_server_BrokerTopicMetrics_FetchMessageConversionsPerSec_OneMinuteRate | Broker每秒Fetch Request导致的消息版本转换的条数。 |
ProduceMessageConversionsPerSec | Kafka_Broker_kafka_server_BrokerTopicMetrics_ProduceMessageConversionsPerSec_OneMinuteRate | Broker每秒Produce Request导致的消息版本转换的条数。 |
Performance
参数 | 指标 | 描述 |
RequestHandlerAvgIdlePercent | Kafka_Broker_kafka_server_KafkaRequestHandlerPool_RequestHandlerAvgIdlePercent_OneMinuteRate | 处理Request线程的空闲比。 |
IsrShrinksPerSec | Kafka_Broker_kafka_server_ReplicaManager_IsrShrinksPerSec_OneMinuteRate | Isr缩减频率。 |
IsrExpandsPerSec | Kafka_Broker_kafka_server_ReplicaManager_IsrExpandsPerSec_OneMinuteRate | Isr 膨胀频率。 |
RequestQueueUsagePercent | Kafka_Broker_kafka_network_RequestChannel_RequestQueueUsagePercent | Request队列的使用率。 |
NetworkProcessorAvgIdlePercent | Kafka_Broker_kafka_network_SocketServer_NetworkProcessorAvgIdlePercent | 网络处理线程的空闲比。 |
LogFlushRateAndTimeMs | Kafka_Broker_kafka_log_LogFlushStats_LogFlushRateAndTimeMs_99thPercentile | 磁盘刷盘时间消耗。单位:ms。 |
Storage
参数 | 指标 | 描述 |
Log Size | Kafka_Broker_kafka_log_Log_Size | topic partition存储的大小。单位:MiB。 |
disk-usages-max-percent | Kafka_Broker_kafka_server_ReplicaManager_disk-usages-max-percent | 磁盘使用率最大百分比。 |
disk-usages-mean-percent | Kafka_Broker_kafka_server_ReplicaManager_disk-usages-mean-percent | 磁盘使用率平均百分比。 |
disk-usages-min-percent | Kafka_Broker_kafka_server_ReplicaManager_disk-usages-min-percent | 磁盘使用率最小百分比。 |
ZK session
参数 | 指标 | 描述 |
ZooKeeperDisconnectsPerSec | Kafka_Broker_kafka_server_SessionExpireListener_ZooKeeperDisconnectsPerSec_OneMinuteRate | Zookeeper客户端断开频率。 |
ZooKeeperExpiresPerSec | Kafka_Broker_kafka_server_SessionExpireListener_ZooKeeperExpiresPerSec_OneMinuteRate | Zookeeper客户端Session过期频率。 |
JVM
参数 | 指标 | 描述 |
G1 Old CollectionTime | Kafka_Broker_java_lang_GarbageCollector_G1_Old_Generation_CollectionTime | 老年代收集时长。单位:ms。 |
G1 Old CollectionCount | Kafka_Broker_java_lang_GarbageCollector_G1_Old_Generation_CollectionCount | 老年代收集次数。 |
G1 Young CollectionTime。 | Kafka_Broker_java_lang_GarbageCollector_G1_Young_Generation_CollectionTime | 年轻代收集时长。单位:ms。 |
G1 Young CollectionCount | Kafka_Broker_java_lang_GarbageCollector_G1_Young_Generation_CollectionCount | 年轻代收集次数。 |
Throughput
参数 | 指标 | 描述 |
BytesInPerSec | Kafka_Broker_kafka_server_BrokerTopicMetrics_BytesInPerSec_OneMinuteRate | Broker每秒流量入口字节数。单位:Bytes/s。 |
BytesOutPerSec | Kafka_Broker_kafka_server_BrokerTopicMetrics_BytesOutPerSec_OneMinuteRate | Broker每秒流量出口字节数。单位:Bytes/s。 |
MessagesInPerSec | Kafka_Broker_kafka_server_BrokerTopicMetrics_MessagesInPerSec_OneMinuteRate | Broker每秒流量入口条数。单位:Messages/s。 |
Kafka-Home
参数 | 描述 | 描述 |
ActiveControllerCount | Kafka_Broker_kafka_controller_KafkaController_ActiveControllerCount | 活跃Controller数量。 |
GlobalTopicCount | Kafka_Broker_kafka_controller_KafkaController_GlobalTopicCount | 集群总Topic个数。 |
GlobalPartitionCount | Kafka_Broker_kafka_controller_KafkaController_GlobalPartitionCount | 集群总Partition个数。 |
UnderMinIsrPartitionCount | Kafka_Broker_kafka_server_ReplicaManager_UnderMinIsrPartitionCount | 处于Min Isr partition的个数。 |
OfflineLogDirectoryCount | Kafka_Broker_kafka_log_LogManager_OfflineLogDirectoryCount | Broker Directory Offline个数。 |
OfflinePartitionsCount | Kafka_Broker_kafka_controller_KafkaController_OfflinePartitionsCount | 当前不可用Partition个数。 |
UnderReplicatedPartitions | Kafka_Broker_kafka_server_ReplicaManager_UnderReplicatedPartitions | 处于未同步状态Partition个数。 |
BytesOutPerSec | Kafka_Broker_kafka_server_BrokerTopicMetrics_BytesOutPerSec_OneMinuteRate | Broker每秒流量出口字节数。单位:Bytes/s。 |
BytesInPerSec | Kafka_Broker_kafka_server_BrokerTopicMetrics_BytesInPerSec_OneMinuteRate | Broker每秒流量入口字节数 。单位:Bytes/s。 |
MessagesInPerSec | Kafka_Broker_kafka_server_BrokerTopicMetrics_MessagesInPerSec_OneMinuteRate | Broker每秒流量入口条数 。单位:Messages/s。 |
Kafka-GCAnalysis
参数 | 描述 | 描述 |
jvm_gc_pause_count | jvm_gc_pause_count | YGC(YoungGC)次数、FGC(FullGC)次数。 |
jvm_gc_duration | jvm_gc_duration | FullGC消耗时间、YoungGC消耗时间、GCT 垃圾回收消耗时间。 |
Eden jvm_memory_util | jvm_memory_util | Eden区内存使用占比。 |
Eden jvm_memory_used | jvm_memory_used | Eden区内存使用量。 |
Eden jvm_memory_max | jvm_memory_max | Eden区内存总量。 |
Old jvm_memory_util | jvm_memory_util | Old区内存使用占比。 |
Old jvm_memory_used | jvm_memory_used | Old区内存使用量。 |
Old jvm_memory_max | jvm_memory_max | Old区内存总量。 |
jvm_memory_util[S0/S1] | jvm_memory_util | S0(Survivor 0)区内存使用占比 、S1( Survivor 1)区内存使用占比。 |
jvm_memory_util[CCS/M] | jvm_memory_util | CCS(Compressed class space)区内存使用占比 、M(MetaSpace)区内存使用占比。 |