> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Prometheus Metrics

> AutoMQ leverages Prometheus metrics to unlock cloud-native scalability and Kafka compatibility with precise operational insights. Discover optimized cost efficiency.

This article will introduce the observable metric definitions of AutoMQ, helping you better understand the performance and operational status of AutoMQ.

<Info>
  AutoMQ metrics are defined and presented in Prometheus format; if other protocol formats are needed, you'll need to perform the conversion yourself.
</Info>

## General Metrics

### Kafka\_server\_connection\_count

The current number of connections established by the node.

* Type: Gauge

### Kafka\_network\_threads\_idle\_rate

The idle rate of Kafka SocketServer network threads, range: \[0, 1.0].

* Type: Gauge

### Kafka\_io\_threads\_idle\_time\_nanoseconds\_total

The idle time for Kafka request handler threads, expressed as the cumulative value of Apache Kafka's native metric, RequestHandlerAvgIdlePercent, is recorded in nanoseconds. By calculating the derivative with respect to time (measured in nanoseconds), the thread idle rate can be determined. Note that when a node functions as a combined node (acting as both Controller and Broker), since each has its own request handlers, this metric represents the sum of the Controller and Broker values. The maximum derived thread idle rate in this scenario is 2.0.

* Type: Counter

## Controller Metric

### Kafka\_controller\_active\_count

This metric indicates whether the current Controller node is active. A value of 1 indicates an active status, whereas 0 denotes inactivity.

* Type: Gauge

### Kafka\_broker\_active\_count

The number of active Brokers in the current cluster.

* Type: Gauge

### Kafka\_broker\_fenced\_count

The number of Brokers currently fenced in the cluster.

* Type: Gauge

### Kafka\_topic\_count

Total number of topics in the current cluster.

* Type: Gauge

### Kafka\_partition\_total\_count

Total number of partitions in the current cluster.

* Type: Gauge

### Kafka\_partition\_offline\_count

Total number of partitions without leaders in the current cluster.

* Type: Gauge

### Kafka\_stream\_auto\_balancer\_metrics\_time\_delay\_milliseconds

Latency time for AutoBalancer monitoring metrics reported by each Broker node in the cluster. When latency exceeds a certain threshold, the Broker node is considered out-of-sync by AutoBalancer and will no longer participate in partition scheduling by AutoBalancer.

* Type: Gauge

* Labels:

  * node\_id: Node ID reporting AutoBalancer monitoring metrics.

### Kafka\_stream\_s3\_object\_count

The current total number of objects uploaded to the object storage from the cluster, categorized by object state.

* Type: Gauge

* Labels:

  * state: The state of the object, divided into the following three categories:

    * prepared: Objects that are not yet fully written and have not been committed

    * committed: Objects that are fully written and have been committed

    * mark\_destroyed: Objects marked for deletion, which will be removed from the object storage after a certain delay

### Kafka\_stream\_s3\_object\_size\_bytes

The total size of objects uploaded to object storage by the current cluster.

* Type: Gauge

### Kafka\_stream\_stream\_object\_num

The number of StreamObjects uploaded to object storage by the current cluster.

* Type: Gauge

### Kafka\_stream\_stream\_set\_object\_num

The number of StreamSetObjects uploaded to object storage by each broker in the current cluster.

* Type: Gauge

* Labels:

  * node\_id: The corresponding broker node ID

## Broker Metrics

### Kafka\_message\_count\_total

The rate of change over time of the total number of messages received by the Broker node determines the message throughput.

* Type: Counter

* Labels:

  * topic

### Kafka\_network\_io\_bytes\_total

The rate of change over time of the total size of messages received and sent by the Broker node represents the message size throughput.

* Type: Counter

* Labels:

  * topic

  * partition

  * direction:

    * in: Indicates receiving messages

    * out: Indicates sending messages

### Kafka\_topic\_request\_count\_total

The total number of requests received for each Topic on the Broker node comprises only two types of requests: produce and fetch.

* Type: Counter

* Labels:

  * topic

  * type: Request Type

    * produce

    * fetch

### Kafka\_topic\_request\_failed\_total

The total number of failed requests for each Topic on Broker nodes, including only produce and fetch request types.

* Type: Counter

* Labels:

  * topic

  * type: Request Type

    * produce

    * fetch

### Kafka\_request\_count\_total

The total number of requests received by Broker nodes.

* Type: Counter

* Labels:

  * type: Request Type

  * version: The API version for this type of request.

### Kafka\_request\_error\_count\_total

The total count of request failures on the Broker node. Note that successful requests are also included in this metric, with the error code for successful requests being NONE.

* Type: Counter

* Labels:

  * type: Type of request.

  * error: Error code indicating the state of the request, where NONE denotes that the request was successful.

### Kafka\_request\_size\_bytes\_total

The total size of requests received by the Broker node.

* Type: Counter

* Labels:

  * type: Request type

### Kafka\_request\_size\_50p(99p/mean/max)\_bytes

Size of the requests received by the Broker node, represented by different percentiles.

* Type: Gauge

* Labels:

  * type: Request type

### Kafka\_request\_time\_milliseconds\_total

Total processing time of requests handled by the Broker node.

* Type: Counter

* Labels:

  * type: Request type

### Kafka\_request\_time\_50p(99p/mean/max)\_milliseconds

Time taken by broker nodes to process requests, represented by different percentiles.

* Type: Gauge

* Labels:

  * type: Request type

### Kafka\_request\_queue\_time\_milliseconds\_total

The total queue time for broker node requests. When the Kafka I/O thread is busy, it results in increased request queue time.

* Type: Counter

* Labels:

  * type: Request type

### Kafka\_request\_queue\_time\_50p(99p/mean/max)\_milliseconds

Queue time for broker node requests, represented by different percentiles.

* Type: Gauge

* Labels:

  * type: Request Type

### Kafka\_response\_queue\_time\_milliseconds\_total

When Kafka network threads are busy, the response queue time for the Broker node increases.

* Type: Counter

* Labels:

  * type: Request Type

### Kafka\_response\_queue\_time\_50p(99p/mean/max)\_milliseconds

The Broker node's response queue time is shown across different percentiles.

* Type: Gauge

* Labels:

  * type: Request Type

### Kafka\_request\_queue\_size

Request queue size of the Broker node.

* Type: Gauge

### Kafka\_response\_queue\_size

Response queue size of the Broker node.

* Type: Gauge

### Kafka\_purgatory\_size

Number of requests in purgatory waiting for producer or fetch on the Broker node.

* Type: Gauge

* Labels:

  * type:

    * Produce

    * Fetch

### Kafka\_partition\_count

Number of currently assigned partitions on the Broker node.

* Type: Gauge

### Kafka\_logs\_flush\_time\_50p(99p/mean/max)\_milliseconds

Log flush time of the Broker node, represented as Delta WAL flush time in AutoMQ, categorized by different percentiles.

* Type: Gauge

### Kafka\_log\_end\_offset

The maximum logical offset of each partition on the broker node.

* Type: Gauge

* Labels:

  * topic

  * partition

### Kafka\_log\_size

The message size of each partition on the broker node.

* Type: Gauge

* Labels:

  * topic

  * partition

### Kafka\_group\_commit\_offset

The consumption offsets for each consumer group on the corresponding partition. Note that this metric is reported by the broker where the corresponding group coordinator for each consumer group resides.

* Type: Gauge

* Labels:

  * consumer\_group

  * topic

  * partition

### Kafka\_group\_count

The number of consumer groups managed by the broker node where each group coordinator resides.

* Type: Gauge

### Kafka\_group\_preparing\_rebalance\_count

The number of consumer groups preparing for rebalance.

* Type: Gauge

### Kafka\_group\_completing\_rebalance\_count

The number of consumer groups waiting for state assignment by the leader.

* Type: Gauge

### Kafka\_group\_stable\_count

The number of consumer groups in the Stable state.

* Type: Gauge

### Kafka\_group\_empty\_count

The number of consumer groups without any members but not yet expired.

* Type: Gauge

### Kafka\_group\_dead\_count

The number of consumer groups without any members and whose metadata has been removed.

* Type: Gauge

### Kafka\_stream\_upload\_size\_bytes\_total

The total size of data uploaded by broker nodes to object storage.

* Type: Counter

### Kafka\_stream\_download\_size\_bytes\_total

Total size of data downloaded from object storage by Broker nodes.

* Type: Counter

### Kafka\_stream\_network\_inbound\_usage\_bytes\_total

Total inbound bandwidth usage of Broker nodes, including message reception and data downloaded from object storage. By differentiating with respect to time, you obtain inbound traffic throughput.

* Type: Counter

### Kafka\_stream\_network\_outbound\_usage\_bytes\_total

Total outbound bandwidth usage of Broker nodes, including message consumption and data uploaded to object storage. By differentiating with respect to time, you obtain outbound traffic throughput.

* Type: Counter

### Kafka\_stream\_network\_inbound\_available\_bandwidth\_bytes

Inbound traffic throughput reserved by Broker nodes for cold reads and Compaction. When this value is less than the inbound traffic demand for cold reads and Compaction, corresponding requests are placed in a rate-limiting queue for processing. Normal message sending and receiving traffic is not affected by this rate-limiting. Note that this metric represents only the instantaneous value during sampling and, limited by sampling intervals and rate-limiting implementation specifics, should be used for reference only.

* Type: Gauge

### Kafka\_stream\_network\_outbound\_available\_bandwidth\_bytes

Outbound traffic throughput reserved by Broker nodes for cold reads and Compaction. When this value is less than the outbound traffic demand for cold reads and Compaction, corresponding requests are placed in a rate-limiting queue for processing. Normal message sending and receiving traffic is not affected by this rate-limiting. Note that this metric represents only the instantaneous value during sampling and, limited by sampling intervals and rate-limiting implementation specifics, should be used for reference only.

* Type: Gauge

### Kafka\_stream\_network\_inbound\_limiter\_queue\_time\_50p(99p/mean/max)\_nanoseconds

The queue time in the rate-limited queue for incoming traffic requests during cold reads and compaction when executed.

* Type: Gauge

### Kafka\_stream\_network\_outbound\_limiter\_queue\_time\_50p(99p/mean/max)\_nanoseconds

The queue time in the rate-limited queue for outgoing traffic requests during cold reads and compaction when executed.

* Type: Gauge

### Kafka\_stream\_operation\_latency\_50p(99p/mean/max)\_nanoseconds

The operation duration for each stage of the AutoMQ S3Stream module.

* Type: Gauge

* Labels:

  * operation\_type

  * operation\_name
