Skip to main content

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​

MetricDescriptionType
kafka.versionKafka broker versionString
kafka.commit.idKafka build commit identifierString
kafka.node.idBroker node identifierString
kafka.cluster.idCluster identifier the broker belongs toString
kafka.metadata.modeMetadata mode (KRaft or ZooKeeper)String
kafka.process.rolesProcess roles configured for the nodeString
kafka.broker.stateCurrent state of the brokerString
kafka.uptime.secondsBroker uptime in secondsCount
kafka.in.messages.per.secRate of incoming messages per secondCount
kafka.in.bytes.per.secRate of incoming bytes per secondCount
kafka.out.bytes.per.secRate of outgoing bytes per secondCount
kafka.bytes.rejected.per.secRate of rejected bytes per secondCount
kafka.replication.in.bytes.per.secRate of replication bytes received per secondCount
kafka.replication.out.bytes.per.secRate of replication bytes sent per secondCount
kafka.reassignment.in.bytes.per.secRate of reassignment bytes received per secondCount
kafka.reassignment.out.bytes.per.secRate of reassignment bytes sent per secondCount
kafka.produce.requests.per.secRate of produce requests per secondCount
kafka.fetch.requests.per.secRate of fetch requests per secondCount
kafka.failed.produce.requests.per.secRate of failed produce requests per secondCount
kafka.failed.fetch.requests.per.secRate of failed fetch requests per secondCount
kafka.produce.message.conversions.per.secRate of produce message conversions per secondCount
kafka.fetch.message.conversions.per.secRate of fetch message conversions per secondCount
kafka.invalid.records.per.secRate of invalid records per secondCount
kafka.partitionsTotal partitions hosted on the brokerCount
kafka.leader.partitionsPartitions for which the broker is leaderCount
kafka.under.replicated.partitionsUnder-replicated partitions on the brokerCount
kafka.under.min.isr.partitionsPartitions under the minimum in-sync replica countCount
kafka.at.min.isr.partitionsPartitions at the minimum in-sync replica countCount
kafka.offline.replicasOffline replicas on the brokerCount
kafka.reassigning.partitionsPartitions currently being reassignedCount
kafka.producer.idsCount of active producer IDsCount
kafka.late.transaction.partitionsPartitions with late transactionsCount
kafka.isr.shrinks.per.secRate of ISR shrink events per secondCount
kafka.isr.expands.per.secRate of ISR expand events per secondCount
kafka.failed.isr.updates.per.secRate of failed ISR updates per secondCount
kafka.replica.max.lag.messagesMaximum follower lag in messagesCount
kafka.replica.min.fetches.per.secMinimum replica fetch rate per secondCount
kafka.replica.fetcher.dead.threadsDead replica fetcher threadsCount
kafka.replica.fetcher.failed.partitionsPartitions failing replica fetchCount
kafka.request.handler.idle.percentPercentage of time request handler threads are idleCount
kafka.network.processor.idle.percentPercentage of time network processor threads are idleCount
kafka.request.queue.sizeCurrent request queue sizeCount
kafka.response.queue.sizeCurrent response queue sizeCount
kafka.produce.purgatory.requestsProduce requests in purgatoryCount
kafka.fetch.purgatory.requestsFetch requests in purgatoryCount
kafka.connectionsActive connections on the brokerCount
kafka.log.flushes.per.secRate of log flushes per secondCount
kafka.log.flush.time.p99.ms99th percentile log flush time in millisecondsCount
kafka.offline.log.directoriesOffline log directories on the brokerCount
kafka.log.size.bytesTotal log size on the broker in bytesCount
kafka.log.cleaner.dead.threadsDead log cleaner threadsCount
kafka.log.cleaner.uncleanable.partitionsPartitions the log cleaner cannot cleanCount
kafka.coordinator.groupsConsumer groups managed by this coordinatorCount
kafka.coordinator.rebalancing.groupsConsumer groups currently rebalancingCount
kafka.coordinator.committed.offsetsCount of committed offsets managed by the coordinatorCount

Listener​

MetricDescriptionType
kafka.listenerListener nameString
kafka.listener.connectionsActive connections on the listenerCount
kafka.listener.connection.creations.per.secRate of new connections per secondCount
kafka.listener.connection.closes.per.secRate of connection closures per secondCount
kafka.listener.failed.authentications.per.secRate of failed authentications per secondCount
kafka.listener.incoming.bytes.per.secRate of incoming bytes per second on the listenerCount
kafka.listener.outgoing.bytes.per.secRate of outgoing bytes per second on the listenerCount
kafka.listener.requests.per.secRate of requests per second on the listenerCount
kafka.listener.acceptor.blocked.percentPercentage of time the acceptor is blockedCount

Controller​

MetricDescriptionType
kafka.active.controller.idNode ID of the active controllerString
kafka.active.controllerActive controller indicatorString
kafka.cluster.topicsTotal topics in the clusterCount
kafka.cluster.partitionsTotal partitions in the clusterCount
kafka.offline.partitionsOffline partitions in the clusterCount
kafka.preferred.replica.imbalance.partitionsPartitions where the leader is not the preferred replicaCount
kafka.active.brokersCount of active brokers in the clusterCount
kafka.fenced.brokersCount of fenced brokersCount
kafka.unclean.leader.elections.per.secRate of unclean leader elections per secondCount
kafka.unclean.leader.electionsTotal unclean leader electionsCount
kafka.leader.elections.per.secRate of leader elections per secondCount
kafka.leader.election.time.p99.ms99th percentile leader election time in millisecondsCount
kafka.topics.pending.deletionTopics pending deletionCount
kafka.topics.ineligible.deletionTopics ineligible for deletionCount
kafka.controller.event.queue.sizeController event queue sizeCount
kafka.controller.event.queue.time.p99.ms99th percentile controller event queue time in millisecondsCount
kafka.controller.event.processing.time.p99.ms99th percentile controller event processing time in millisecondsCount
kafka.controller.metadata.errorsController metadata errorsCount
kafka.timed.out.broker.heartbeatsBroker heartbeats that timed outCount
kafka.metadata.apply.lag.msLag applying metadata in millisecondsCount
kafka.broker.metadata.errorsBroker metadata errorsCount
kafka.metadata.versionCurrent metadata versionString
kafka.metadata.snapshot.age.msAge of the latest metadata snapshot in millisecondsCount
kafka.metadata.snapshot.size.bytesSize of the latest metadata snapshot in bytesCount
kafka.raft.stateCurrent Raft stateString
kafka.raft.leader.idRaft leader node identifierString
kafka.raft.epochCurrent Raft epochCount
kafka.raft.high.watermarkRaft high watermarkCount
kafka.raft.log.end.offsetRaft log end offsetCount
kafka.raft.votersCount of Raft votersCount
kafka.raft.unknown.voter.connectionsCount of unknown voter connectionsCount
kafka.raft.commit.latency.msRaft commit latency in millisecondsCount
kafka.raft.fetch.records.per.secRate of Raft fetch records per secondCount
kafka.raft.append.records.per.secRate of Raft append records per secondCount
kafka.raft.poll.idle.percentPercentage of time Raft poll is idleCount
kafka.zookeeper.session.stateZooKeeper session stateString
kafka.zookeeper.disconnects.per.secRate of ZooKeeper disconnects per secondCount
kafka.zookeeper.expires.per.secRate of ZooKeeper session expiries per secondCount
kafka.zookeeper.auth.failures.per.secRate of ZooKeeper auth failures per secondCount
kafka.zookeeper.request.latency.p99.ms99th percentile ZooKeeper request latency in millisecondsCount

Topic​

MetricDescriptionType
kafka.topicTopic nameString
kafka.topic.in.messages.per.secRate of incoming messages per second on the topicCount
kafka.topic.in.bytes.per.secRate of incoming bytes per second on the topicCount
kafka.topic.out.bytes.per.secRate of outgoing bytes per second on the topicCount
kafka.topic.bytes.rejected.per.secRate of rejected bytes per second on the topicCount
kafka.topic.produce.requests.per.secRate of produce requests per second on the topicCount
kafka.topic.fetch.requests.per.secRate of fetch requests per second on the topicCount
kafka.topic.failed.produce.requests.per.secRate of failed produce requests per second on the topicCount
kafka.topic.failed.fetch.requests.per.secRate of failed fetch requests per second on the topicCount
kafka.topic.partitionsPartitions in the topicCount
kafka.topic.leader.partitionsPartitions on this broker where this topic is leaderCount
kafka.topic.replication.factorReplication factor configured on the topicCount
kafka.topic.under.replicated.partitionsUnder-replicated partitions in the topicCount
kafka.topic.under.min.isr.partitionsPartitions in the topic under the minimum in-sync replica countCount
kafka.topic.size.bytesSize of the topic in bytesCount
kafka.topic.log.segmentsLog segments in the topicCount
kafka.topic.messagesTotal messages in the topicCount

Partition​

MetricDescriptionType
kafka.partitionPartition identifierString
kafka.partition.topicTopic this partition belongs toString
kafka.partition.roleRole of the broker for this partition (leader or follower)String
kafka.partition.size.bytesSize of the partition in bytesCount
kafka.partition.log.segmentsLog segments in the partitionCount
kafka.partition.log.start.offsetEarliest offset in the partition logCount
kafka.partition.log.end.offsetLatest offset in the partition logCount
kafka.partition.replicasReplicas assigned to the partitionCount
kafka.partition.in.sync.replicasIn-sync replicas for the partitionCount
kafka.partition.under.replicatedFlag indicating under-replicated stateString
kafka.partition.under.min.isrFlag indicating under minimum in-sync replica countString
kafka.partition.at.min.isrFlag indicating partition at minimum in-sync replica countString
kafka.partition.last.stable.offset.lagLag between log end offset and the last stable offsetCount
kafka.partition.follower.lag.messagesFollower lag in messagesCount

Request​

MetricDescriptionType
kafka.requestRequest typeString
kafka.request.requests.per.secRate of requests per secondCount
kafka.request.errors.per.secRate of request errors per secondCount
kafka.request.total.time.p50.ms50th percentile total request time in millisecondsCount
kafka.request.total.time.p99.ms99th percentile total request time in millisecondsCount
kafka.request.queue.time.p99.ms99th percentile request queue time in millisecondsCount
kafka.request.local.time.p99.ms99th percentile local request processing time in millisecondsCount
kafka.request.remote.time.p99.ms99th percentile remote request processing time in millisecondsCount
kafka.request.response.queue.time.p99.ms99th percentile response queue time in millisecondsCount
kafka.request.response.send.time.p99.ms99th percentile response send time in millisecondsCount
kafka.request.throttle.time.p99.ms99th percentile throttle time in millisecondsCount
kafka.request.size.p99.bytes99th percentile request size in bytesCount

JVM and System​

MetricDescriptionType
kafka.heap.memory.used.bytesJVM heap memory used in bytesCount
kafka.heap.memory.committed.bytesJVM heap memory committed in bytesCount
kafka.heap.memory.capacity.bytesJVM heap memory capacity in bytesCount
kafka.heap.memory.used.percentPercentage of JVM heap memory usedCount
kafka.non.heap.memory.used.bytesJVM non-heap memory used in bytesCount
kafka.cpu.used.percentCPU used percentage on the broker hostCount
kafka.process.cpu.used.percentCPU used percentage by the Kafka processCount
kafka.memory.used.bytesMemory used by the broker in bytesCount
kafka.memory.used.percentPercentage of memory used by the brokerCount
kafka.open.file.descriptorsOpen file descriptors used by the brokerCount
kafka.max.file.descriptorsMaximum file descriptors allowedCount
kafka.file.descriptors.used.percentPercentage of file descriptors usedCount
kafka.threadsTotal threads in the JVMCount
kafka.daemon.threadsDaemon threads in the JVMCount
kafka.peak.threadsPeak thread count observed in the JVMCount
kafka.jvm.versionJVM version running the brokerString

Garbage Collection and Memory Pool​

MetricDescriptionType
kafka.gcGarbage collector nameString
kafka.gc.collectionsCount of garbage collectionsCount
kafka.gc.collection.time.secondsTotal garbage collection time in secondsCount
kafka.memorypoolMemory pool nameString
kafka.memorypool.typeMemory pool type (heap or non-heap)String
kafka.memorypool.used.bytesMemory used in the pool in bytesCount
kafka.memorypool.committed.bytesMemory committed in the pool in bytesCount
kafka.memorypool.capacity.bytesMemory capacity of the pool in bytesCount