Apache Kafka in ObserveOps
Overview
The Apache Kafka integration gives ObserveOps end-to-end visibility into Kafka brokers, controllers, listeners, topics, partitions, requests, Raft metadata, ZooKeeper sessions, and the JVM runtime that hosts the broker. Use it to catch under-replicated partitions, offline replicas, slow produce or fetch paths, request handler saturation, log cleaner failures, and GC pressure before they turn into client-visible incidents.
Prerequisites
- JMX is enabled on every Kafka broker and the JMX port is reachable from the ObserveOps server.
- The monitoring user has permission to read the Kafka JMX MBeans.
- For KRaft deployments, controller nodes expose their JMX endpoints to ObserveOps.
- For ZooKeeper-based clusters, the ZooKeeper quorum is reachable so controller and session metrics can be collected.
- The Kafka broker process is running and the Kafka service is listed in the process and service monitor settings.
List of Supported KPIs
Broker
| Metric | Description | Type |
|---|---|---|
| kafka.version | Kafka broker version | String |
| kafka.commit.id | Kafka build commit identifier | String |
| kafka.node.id | Broker node identifier | String |
| kafka.cluster.id | Cluster identifier the broker belongs to | String |
| kafka.metadata.mode | Metadata mode (KRaft or ZooKeeper) | String |
| kafka.process.roles | Process roles configured for the node | String |
| kafka.broker.state | Current state of the broker | String |
| kafka.uptime.seconds | Broker uptime in seconds | Count |
| kafka.in.messages.per.sec | Rate of incoming messages per second | Count |
| kafka.in.bytes.per.sec | Rate of incoming bytes per second | Count |
| kafka.out.bytes.per.sec | Rate of outgoing bytes per second | Count |
| kafka.bytes.rejected.per.sec | Rate of rejected bytes per second | Count |
| kafka.replication.in.bytes.per.sec | Rate of replication bytes received per second | Count |
| kafka.replication.out.bytes.per.sec | Rate of replication bytes sent per second | Count |
| kafka.reassignment.in.bytes.per.sec | Rate of reassignment bytes received per second | Count |
| kafka.reassignment.out.bytes.per.sec | Rate of reassignment bytes sent per second | Count |
| kafka.produce.requests.per.sec | Rate of produce requests per second | Count |
| kafka.fetch.requests.per.sec | Rate of fetch requests per second | Count |
| kafka.failed.produce.requests.per.sec | Rate of failed produce requests per second | Count |
| kafka.failed.fetch.requests.per.sec | Rate of failed fetch requests per second | Count |
| kafka.produce.message.conversions.per.sec | Rate of produce message conversions per second | Count |
| kafka.fetch.message.conversions.per.sec | Rate of fetch message conversions per second | Count |
| kafka.invalid.records.per.sec | Rate of invalid records per second | Count |
| kafka.partitions | Total partitions hosted on the broker | Count |
| kafka.leader.partitions | Partitions for which the broker is leader | Count |
| kafka.under.replicated.partitions | Under-replicated partitions on the broker | Count |
| kafka.under.min.isr.partitions | Partitions under the minimum in-sync replica count | Count |
| kafka.at.min.isr.partitions | Partitions at the minimum in-sync replica count | Count |
| kafka.offline.replicas | Offline replicas on the broker | Count |
| kafka.reassigning.partitions | Partitions currently being reassigned | Count |
| kafka.producer.ids | Count of active producer IDs | Count |
| kafka.late.transaction.partitions | Partitions with late transactions | Count |
| kafka.isr.shrinks.per.sec | Rate of ISR shrink events per second | Count |
| kafka.isr.expands.per.sec | Rate of ISR expand events per second | Count |
| kafka.failed.isr.updates.per.sec | Rate of failed ISR updates per second | Count |
| kafka.replica.max.lag.messages | Maximum follower lag in messages | Count |
| kafka.replica.min.fetches.per.sec | Minimum replica fetch rate per second | Count |
| kafka.replica.fetcher.dead.threads | Dead replica fetcher threads | Count |
| kafka.replica.fetcher.failed.partitions | Partitions failing replica fetch | Count |
| kafka.request.handler.idle.percent | Percentage of time request handler threads are idle | Count |
| kafka.network.processor.idle.percent | Percentage of time network processor threads are idle | Count |
| kafka.request.queue.size | Current request queue size | Count |
| kafka.response.queue.size | Current response queue size | Count |
| kafka.produce.purgatory.requests | Produce requests in purgatory | Count |
| kafka.fetch.purgatory.requests | Fetch requests in purgatory | Count |
| kafka.connections | Active connections on the broker | Count |
| kafka.log.flushes.per.sec | Rate of log flushes per second | Count |
| kafka.log.flush.time.p99.ms | 99th percentile log flush time in milliseconds | Count |
| kafka.offline.log.directories | Offline log directories on the broker | Count |
| kafka.log.size.bytes | Total log size on the broker in bytes | Count |
| kafka.log.cleaner.dead.threads | Dead log cleaner threads | Count |
| kafka.log.cleaner.uncleanable.partitions | Partitions the log cleaner cannot clean | Count |
| kafka.coordinator.groups | Consumer groups managed by this coordinator | Count |
| kafka.coordinator.rebalancing.groups | Consumer groups currently rebalancing | Count |
| kafka.coordinator.committed.offsets | Count of committed offsets managed by the coordinator | Count |
Listener
| Metric | Description | Type |
|---|---|---|
| kafka.listener | Listener name | String |
| kafka.listener.connections | Active connections on the listener | Count |
| kafka.listener.connection.creations.per.sec | Rate of new connections per second | Count |
| kafka.listener.connection.closes.per.sec | Rate of connection closures per second | Count |
| kafka.listener.failed.authentications.per.sec | Rate of failed authentications per second | Count |
| kafka.listener.incoming.bytes.per.sec | Rate of incoming bytes per second on the listener | Count |
| kafka.listener.outgoing.bytes.per.sec | Rate of outgoing bytes per second on the listener | Count |
| kafka.listener.requests.per.sec | Rate of requests per second on the listener | Count |
| kafka.listener.acceptor.blocked.percent | Percentage of time the acceptor is blocked | Count |
Controller
| Metric | Description | Type |
|---|---|---|
| kafka.active.controller.id | Node ID of the active controller | String |
| kafka.active.controller | Active controller indicator | String |
| kafka.cluster.topics | Total topics in the cluster | Count |
| kafka.cluster.partitions | Total partitions in the cluster | Count |
| kafka.offline.partitions | Offline partitions in the cluster | Count |
| kafka.preferred.replica.imbalance.partitions | Partitions where the leader is not the preferred replica | Count |
| kafka.active.brokers | Count of active brokers in the cluster | Count |
| kafka.fenced.brokers | Count of fenced brokers | Count |
| kafka.unclean.leader.elections.per.sec | Rate of unclean leader elections per second | Count |
| kafka.unclean.leader.elections | Total unclean leader elections | Count |
| kafka.leader.elections.per.sec | Rate of leader elections per second | Count |
| kafka.leader.election.time.p99.ms | 99th percentile leader election time in milliseconds | Count |
| kafka.topics.pending.deletion | Topics pending deletion | Count |
| kafka.topics.ineligible.deletion | Topics ineligible for deletion | Count |
| kafka.controller.event.queue.size | Controller event queue size | Count |
| kafka.controller.event.queue.time.p99.ms | 99th percentile controller event queue time in milliseconds | Count |
| kafka.controller.event.processing.time.p99.ms | 99th percentile controller event processing time in milliseconds | Count |
| kafka.controller.metadata.errors | Controller metadata errors | Count |
| kafka.timed.out.broker.heartbeats | Broker heartbeats that timed out | Count |
| kafka.metadata.apply.lag.ms | Lag applying metadata in milliseconds | Count |
| kafka.broker.metadata.errors | Broker metadata errors | Count |
| kafka.metadata.version | Current metadata version | String |
| kafka.metadata.snapshot.age.ms | Age of the latest metadata snapshot in milliseconds | Count |
| kafka.metadata.snapshot.size.bytes | Size of the latest metadata snapshot in bytes | Count |
| kafka.raft.state | Current Raft state | String |
| kafka.raft.leader.id | Raft leader node identifier | String |
| kafka.raft.epoch | Current Raft epoch | Count |
| kafka.raft.high.watermark | Raft high watermark | Count |
| kafka.raft.log.end.offset | Raft log end offset | Count |
| kafka.raft.voters | Count of Raft voters | Count |
| kafka.raft.unknown.voter.connections | Count of unknown voter connections | Count |
| kafka.raft.commit.latency.ms | Raft commit latency in milliseconds | Count |
| kafka.raft.fetch.records.per.sec | Rate of Raft fetch records per second | Count |
| kafka.raft.append.records.per.sec | Rate of Raft append records per second | Count |
| kafka.raft.poll.idle.percent | Percentage of time Raft poll is idle | Count |
| kafka.zookeeper.session.state | ZooKeeper session state | String |
| kafka.zookeeper.disconnects.per.sec | Rate of ZooKeeper disconnects per second | Count |
| kafka.zookeeper.expires.per.sec | Rate of ZooKeeper session expiries per second | Count |
| kafka.zookeeper.auth.failures.per.sec | Rate of ZooKeeper auth failures per second | Count |
| kafka.zookeeper.request.latency.p99.ms | 99th percentile ZooKeeper request latency in milliseconds | Count |
Topic
| Metric | Description | Type |
|---|---|---|
| kafka.topic | Topic name | String |
| kafka.topic.in.messages.per.sec | Rate of incoming messages per second on the topic | Count |
| kafka.topic.in.bytes.per.sec | Rate of incoming bytes per second on the topic | Count |
| kafka.topic.out.bytes.per.sec | Rate of outgoing bytes per second on the topic | Count |
| kafka.topic.bytes.rejected.per.sec | Rate of rejected bytes per second on the topic | Count |
| kafka.topic.produce.requests.per.sec | Rate of produce requests per second on the topic | Count |
| kafka.topic.fetch.requests.per.sec | Rate of fetch requests per second on the topic | Count |
| kafka.topic.failed.produce.requests.per.sec | Rate of failed produce requests per second on the topic | Count |
| kafka.topic.failed.fetch.requests.per.sec | Rate of failed fetch requests per second on the topic | Count |
| kafka.topic.partitions | Partitions in the topic | Count |
| kafka.topic.leader.partitions | Partitions on this broker where this topic is leader | Count |
| kafka.topic.replication.factor | Replication factor configured on the topic | Count |
| kafka.topic.under.replicated.partitions | Under-replicated partitions in the topic | Count |
| kafka.topic.under.min.isr.partitions | Partitions in the topic under the minimum in-sync replica count | Count |
| kafka.topic.size.bytes | Size of the topic in bytes | Count |
| kafka.topic.log.segments | Log segments in the topic | Count |
| kafka.topic.messages | Total messages in the topic | Count |
Partition
| Metric | Description | Type |
|---|---|---|
| kafka.partition | Partition identifier | String |
| kafka.partition.topic | Topic this partition belongs to | String |
| kafka.partition.role | Role of the broker for this partition (leader or follower) | String |
| kafka.partition.size.bytes | Size of the partition in bytes | Count |
| kafka.partition.log.segments | Log segments in the partition | Count |
| kafka.partition.log.start.offset | Earliest offset in the partition log | Count |
| kafka.partition.log.end.offset | Latest offset in the partition log | Count |
| kafka.partition.replicas | Replicas assigned to the partition | Count |
| kafka.partition.in.sync.replicas | In-sync replicas for the partition | Count |
| kafka.partition.under.replicated | Flag indicating under-replicated state | String |
| kafka.partition.under.min.isr | Flag indicating under minimum in-sync replica count | String |
| kafka.partition.at.min.isr | Flag indicating partition at minimum in-sync replica count | String |
| kafka.partition.last.stable.offset.lag | Lag between log end offset and the last stable offset | Count |
| kafka.partition.follower.lag.messages | Follower lag in messages | Count |
Request
| Metric | Description | Type |
|---|---|---|
| kafka.request | Request type | String |
| kafka.request.requests.per.sec | Rate of requests per second | Count |
| kafka.request.errors.per.sec | Rate of request errors per second | Count |
| kafka.request.total.time.p50.ms | 50th percentile total request time in milliseconds | Count |
| kafka.request.total.time.p99.ms | 99th percentile total request time in milliseconds | Count |
| kafka.request.queue.time.p99.ms | 99th percentile request queue time in milliseconds | Count |
| kafka.request.local.time.p99.ms | 99th percentile local request processing time in milliseconds | Count |
| kafka.request.remote.time.p99.ms | 99th percentile remote request processing time in milliseconds | Count |
| kafka.request.response.queue.time.p99.ms | 99th percentile response queue time in milliseconds | Count |
| kafka.request.response.send.time.p99.ms | 99th percentile response send time in milliseconds | Count |
| kafka.request.throttle.time.p99.ms | 99th percentile throttle time in milliseconds | Count |
| kafka.request.size.p99.bytes | 99th percentile request size in bytes | Count |
JVM and System
| Metric | Description | Type |
|---|---|---|
| kafka.heap.memory.used.bytes | JVM heap memory used in bytes | Count |
| kafka.heap.memory.committed.bytes | JVM heap memory committed in bytes | Count |
| kafka.heap.memory.capacity.bytes | JVM heap memory capacity in bytes | Count |
| kafka.heap.memory.used.percent | Percentage of JVM heap memory used | Count |
| kafka.non.heap.memory.used.bytes | JVM non-heap memory used in bytes | Count |
| kafka.cpu.used.percent | CPU used percentage on the broker host | Count |
| kafka.process.cpu.used.percent | CPU used percentage by the Kafka process | Count |
| kafka.memory.used.bytes | Memory used by the broker in bytes | Count |
| kafka.memory.used.percent | Percentage of memory used by the broker | Count |
| kafka.open.file.descriptors | Open file descriptors used by the broker | Count |
| kafka.max.file.descriptors | Maximum file descriptors allowed | Count |
| kafka.file.descriptors.used.percent | Percentage of file descriptors used | Count |
| kafka.threads | Total threads in the JVM | Count |
| kafka.daemon.threads | Daemon threads in the JVM | Count |
| kafka.peak.threads | Peak thread count observed in the JVM | Count |
| kafka.jvm.version | JVM version running the broker | String |
Garbage Collection and Memory Pool
| Metric | Description | Type |
|---|---|---|
| kafka.gc | Garbage collector name | String |
| kafka.gc.collections | Count of garbage collections | Count |
| kafka.gc.collection.time.seconds | Total garbage collection time in seconds | Count |
| kafka.memorypool | Memory pool name | String |
| kafka.memorypool.type | Memory pool type (heap or non-heap) | String |
| kafka.memorypool.used.bytes | Memory used in the pool in bytes | Count |
| kafka.memorypool.committed.bytes | Memory committed in the pool in bytes | Count |
| kafka.memorypool.capacity.bytes | Memory capacity of the pool in bytes | Count |