描述 | MBEAN 名称 | 正常值 |
消息速率 | kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec | |
来自clients的速率字节 | kafka.server:type=BrokerTopicMetrics,name=BytesInPerSec | |
来自其他brokers的字节速率 | kafka.server:type=BrokerTopicMetrics,name=ReplicationBytesInPerSec | |
请求率 | kafka.network:type=RequestMetrics,name=RequestsPerSec,request={Produce|FetchConsumer|FetchFollower} | |
错误率 | kafka.network:type=RequestMetrics,name=ErrorsPerSec,request=([-.\w]+),error=([-.\w]+) | Number of errors in responses counted
per-request-type, per-error-code.
If a response contains multiple errors,
all are counted. error=NONE indicates
successful responses. |
请求大小(字节) | kafka.network:type=RequestMetrics,name=RequestBytes,request=([-.\w]+) | Size of requests for each request type. |
临时内存大小(以字节为单位) | kafka.network:type=RequestMetrics,name=TemporaryMemoryBytes,request={Produce|Fetch} | Temporary memory used for message
format conversions and decompression. |
消息转换时间 | kafka.network:type=RequestMetrics,name=MessageConversionsTimeMs,request={Produce|Fetch} | Time in milliseconds spent on
message format conversions. |
消息转换率 | kafka.server:type=BrokerTopicMetrics,name={Produce|Fetch}MessageConversionsPerSec,topic=([-.\w]+) | Number of records which required
message format conversion. |
向客户发送速率 | kafka.server:type=BrokerTopicMetrics,name=BytesOutPerSec | |
对其他brokers的字节输出率 | kafka.server:type=BrokerTopicMetrics,name=ReplicationBytesOutPerSec | |
Log flush 率和时 | kafka.log:type=LogFlushStats,name=LogFlushRateAndTimeMs | |
# of under replicated partitions (|ISR| < |all replicas|) | kafka.server:type=ReplicaManager,name=UnderReplicatedPartitions | 0 |
# of under minIsr partitions (|ISR| < min.insync.replicas) | kafka.server:type=ReplicaManager,name=UnderMinIsrPartitionCount | 0 |
离线日志目录数 | kafka.log:type=LogManager,name=OfflineLogDirectoryCount | 0 |
Is controller active on broker | kafka.controller:type=KafkaController,name=ActiveControllerCount | only one broker in the cluster should have 1 |
Leader选举率 | kafka.controller:type=ControllerStats,name=LeaderElectionRateAndTimeMs | non-zero when there are broker failures |
Unclean leader 选举率 | kafka.controller:type=ControllerStats,name=UncleanLeaderElectionsPerSec | 0 |
Partition counts | kafka.server:type=ReplicaManager,name=PartitionCount | mostly even across brokers |
Leader replica counts | kafka.server:type=ReplicaManager,name=LeaderCount | mostly even across brokers |
ISR shrink rate | kafka.server:type=ReplicaManager,name=IsrShrinksPerSec | If a broker goes down, ISR for
some of the partitions will shrink.
When that broker is up again,
ISR will be expanded once the
replicas are fully caught up.
Other than that, the expected
value for both ISR shrink rate
and expansion rate is 0. |
ISR expansion rate | kafka.server:type=ReplicaManager,name=IsrExpandsPerSec | See above |
follower 和leader 副本之间的消息中的最大延迟 | kafka.server:type=ReplicaFetcherManager,name=MaxLag,clientId=Replica | lag should be proportional to the
maximum batch size of a produce request. |
每个follower 的副本消息延迟 | kafka.server:type=FetcherLagMetrics,name=ConsumerLag,clientId=([-.\w]+),topic=([-.\w]+),partition=([0-9]+) | lag should be proportional to
the maximum batch size of a
produce request. |
请求在生产者清洗中等待 | kafka.server:type=DelayedOperationPurgatory,name=PurgatorySize,delayedOperation=Produce | non-zero if ack=-1 is used |
请求等待在fetch purgatory | kafka.server:type=DelayedOperationPurgatory,name=PurgatorySize,delayedOperation=Fetch | size depends on fetch.wait.max.ms in the consumer |
请求总时间 | kafka.network:type=RequestMetrics,name=TotalTimeMs,request={Produce|FetchConsumer|FetchFollower} | broken into queue, local, remote and response send time |
请求在请求队列中等待的时间 | kafka.network:type=RequestMetrics,name=RequestQueueTimeMs,request={Produce|FetchConsumer|FetchFollower} | |
请求在leader处理的时间 | kafka.network:type=RequestMetrics,name=LocalTimeMs,request={Produce|FetchConsumer|FetchFollower} | |
请求等待follower的时间 | kafka.network:type=RequestMetrics,name=RemoteTimeMs,request={Produce|FetchConsumer|FetchFollower} | non-zero for produce requests when ack=-1 |
请求在响应队列中等待的时间 | kafka.network:type=RequestMetrics,name=ResponseQueueTimeMs,request={Produce|FetchConsumer|FetchFollower} | |
Time to send the response | kafka.network:type=RequestMetrics,name=ResponseSendTimeMs,request={Produce|FetchConsumer|FetchFollower} | |
Number of messages the consumer lags behind the producer by. Published by the consumer, not broker.消费者落后于生产者的消息数量。 由消费者发布,而不是broker。 | Old consumer:kafka.consumer:type=ConsumerFetcherManager,name=MaxLag,clientId=([-.\w]+)
New consumer:kafka.consumer:type=consumer-fetch-manager-metrics,client-id={client-id} Attribute: records-lag-max
| |
network processors空闲的平均时间分数 | kafka.network:type=SocketServer,name=NetworkProcessorAvgIdlePercent | between 0 and 1, ideally > 0.3 |
请求处理程序线程空闲的平均时间部分 | kafka.server:type=KafkaRequestHandlerPool,name=RequestHandlerAvgIdlePercent | between 0 and 1, ideally > 0.3 |
Bandwidth quota metrics per (user, client-id), user or client-id | kafka.server:type={Produce|Fetch},user=([-.\w]+),client-id=([-.\w]+) | Two attributes. throttle-time indicates
the amount of time in ms the client
was throttled. Ideally = 0. byte-rate indicates
the data produce/consume rate of the
client in bytes/sec. For (user, client-id) quotas,
both user and client-id are specified.
If per-client-id quota is applied to the client,
user is not specified. If per-user quota is applied,
client-id is not specified. |
每个(用户,客户端ID),用户或客户端ID的带宽配额指标 | kafka.server:type=Request,user=([-.\w]+),client-id=([-.\w]+) | Two attributes. throttle-time indicates
the amount of time in ms the client
was throttled. Ideally = 0.
request-time indicates the percentage
of time spent in broker network and
I/O threads to process requests from
client group. For (user, client-id) quotas,
both user and client-id are specified.
If per-client-id quota is applied to the client,
user is not specified. If per-user quota is applied,
client-id is not specified. |
Requests exempt from throttling | kafka.server:type=Request | exempt-throttle-time indicates
the percentage of time spent in broker
network and I/O threads to process
requests that are exempt from throttling. |
ZooKeeper客户端请求延迟 | kafka.server:type=ZooKeeperClientMetrics,name=ZooKeeperRequestLatencyMs | Latency in millseconds for ZooKeeper
requests from broker. |
ZooKeeper连接状态 | kafka.server:type=SessionExpireListener,name=SessionState | Connection status of broker's ZooKeeper
session which may be one of Disconnected|SyncConnected|AuthFailed
|ConnectedReadOnly|SaslAuthenticated|Expired. |