Schedule demo

Setting-up Apache Kafka Monitoring


Apache Kafka - An Overview

Apache Kafka is an open-sourced, fault-tolerant publish-subscribe-based messaging system developed by LinkedIn. A distributed log-service, Kafka is often used in place of traditional message brokers because of its higher throughput, scalability, reliability and replication.

Monitoring Apache Kafka - What we do

An attractive option for data integration, Apache Kafka is fast and highly scalable. Kafka nodes are created and taken down in an elastic manner; with a single node handling hundreds of read/writes from thousands of clients in real-time. Data streams are split into partitions and spread over different brokers. Although very simple at a high level, Kafka has an incredible depth of technical detail, for which, having a robust Kafka monitoring software is essential to troubleshoot issues and optimize performance.

Applications Manager's Kafka monitoring aims to help administrators collect Kafka metrics, manage clusters and be alerted automatically on potential issues. Let us take a look at what you need to see to monitor Kafka and the performance metrics to gather with Applications Manager Kafka monitor:

  • Resource utilization details - Automatically discover Kafka servers, monitor memory and CPU and get alerts of changes in resource consumption.
  • Thread and JVM usage - Track thread usage with metrics like Daemon, Peak and Live Thread Count. Ensure that started threads don’t overload the server's memory.
  • Broker, Controller and Replication Statistics - Gauge active controllers and see if brokers are up with the number of unavailable partitions.Monitor broker stats like log flush latency (to make sure longer flushes don’t back up the pipeline) and under-replicated partitions (indicating replication is not going as fast as configured).
  • Network and Topic Details - Pinpoint the requests segment causing a slowdown. Keep an eye on network usage on your host so degraded performance is not network-related. Ensure disk throughput does not cause performance bottlenecks, with Broker Topic byte rates metrics.
  • Fix Performance Problems Faster - Get instant notifications when there are performance issues with the components of Apache Kafka. Become aware of performance bottlenecks and take quick remedial actions before your end users experience issues.

Creating a new Kafka monitor

Supported versions: Versions 0.7.0 to 3.9.0

Prerequisites for monitoring Apache Kafka: JMX support must be enabled in order to monitor Apache Kafka in Applications Manager. To learn more about enabling JMX in Kafka, click here.

Using the REST API to create a new Kafka monitor:Click here

To create an Apache Kafka Monitor, follow the steps given below: 

  1. Click on New Monitor link. Choose Apache Kafka.
  2. Enter Display Name of the monitor.
  3. Enter the IP Address or hostname of the host in which Kafka is running.
  4. Enter the JMX Port in the JMX Port field.
  5. Enter the credential details like user name, password and JNDIPath or select credentials from a Credential Manager list.
  6. Enter the polling interval time in minutes.
  7. Click Test Credentials button, if you want to test the access to Apache Kafka Server.
  8. Choose the Monitor Group from the combo box with which you want to associate Apache Kafka Monitor (optional). You can choose multiple groups to associate your monitor.
  9. Click Add Monitor(s). This discovers Apache Kafka from the network and starts monitoring.

Note:
In case you are unable to add the monitor even after enabling JMX, try providing the below argument:
 -Djava.rmi.server.hostname=[YOUR_IP]

Monitored Parameters

Go to the Monitors Category View by clicking the Monitors tab. Click on Apache Kafka under the Middleware/Portal Table. Displayed is the Apache Kafka bulk configuration view distributed into three tabs:

  • Availabilitytab gives the Availability history for the past 24 hours or 30 days.
  • Performancetab gives the Health Status and events for the past 24 hours or 30 days.
  • List view enables you to perform bulk admin configurations.

Applications Manager's Kafka performance monitoring provides complete visibility into your Kafka servers based on the metrics listed in the following tabs:

Overview

ParameterDescriptionREST API SupportPrometheus Support
Memory Details
Total Physical Memory SizeThe total amount of physical memory in Megabytes.SupportedSupported
Free Physical Memory SizeThe amount of free physical memory in Megabytes.SupportedSupported
Committed Virtual Memory SizeThe amount of virtual memory that is guaranteed to be available to the running process in Megabytes.SupportedSupported
Total Swap Space SizeThe total size of virtual memory hold by the JVM.SupportedSupported
Free Swap Space SizeThe free virtual memory size.SupportedSupported
Thread Details
Daemon Thread CountThe number of daemon threads currently running.SupportedSupported
Peak Thread CountThe peak live thread count since the Java virtual machine started or peak was reset.SupportedSupported
Live Thread CountThe number of live threads currently running.SupportedSupported
Total Started Thread CountThe total number of threads created and also started since the Java virtual machine started.SupportedSupported
Heap and Non Heap Memory Details 
NonHeapMemoryUsageThe non-heap memory currently in use.SupportedSupported
HeapMemoryUsageThe heap memory currently in use.SupportedSupported

Controller Details

In a Kafka cluster, one of the brokers serves as the controller, which is responsible for managing the states of partitions and replicas and for performing administrative tasks like reassigning partitions.

ParameterDescriptionREST API SupportPrometheus Support
Kafka Controller Details
Active Controller CountNumber of active controllers in the cluster.SupportedSupported
Offline Partitions CountThe number of unavailable partitions.SupportedSupported
Leader Election RateThe rate of leader elections. (When a partition leader dies, an election for a new leader is triggered.)SupportedNot Supported
Unclean Leader Election RateThe rate of Unclean Leader Elections. (Unclean leader elections are caused by the inability to find a qualified partition leader among Kafka brokers. When a broker that is the leader for a partition goes offline, a new leader is elected from the set of ISRs for the partition. An unclean leader election is a special case in which no available replicas are in sync)SupportedSupported

Broker Details

ParameterDescriptionREST API SupportPrometheus Support
Log Details
Log Flush RateThe asynchronous disk log flush rate.SupportedSupported
Broker Topic Metrics
Bytes In / MinThe aggregate incoming byte rate (amount of data written to topic on this broker) per minute.SupportedSupported
Bytes Out / MinThe aggregate outgoing byte rate per minute.SupportedSupported
Bytes Rejected / MinThe amount of data in messages rejected by broker per minute.SupportedSupported
Failed Fetch Requests / MinThe number of data read requests from consumers that brokers failed to process for this topic per minute.SupportedSupported
Failed Produce Requests / MinThe number of requests from producer that have failed.SupportedSupported
Messages In / MinThe number of Messages that comes into the Kafka broker.SupportedSupported
Replication Manager
IsrExpands / MinThe number of "in-sync" replica expansions. (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).SupportedSupported
IsrShrinks / MinThe number of "in-sync" replica shrinks. (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) .SupportedSupported
Leader CountThe number of partitions for which a particular host is the leader.SupportedSupported
Partition CountThe number of partitions in the cluster.SupportedSupported
Under Replicated PartitionsThis indicates the number of partitions in the cluster are under-replicated.SupportedSupported
Request Handler Avg Idle PercentThe average fraction of time the request handler threads are idle.SupportedSupported

Network Details

ParameterDescriptionREST API SupportPrometheus Support
Requests Process Rate
Request Produce / MinThe number of messages written to topic on this broker.SupportedSupported
Request Fetch Consumer / MinThe amount of data that the consumers fetched from this topic on this broker.SupportedSupported
Request Fetch Follower / MinThe requests from brokers that are the followers of a partition to get new data.SupportedSupported
Time Taken For Requests
Total Time Produce / MinThe total time to serve the specified request.SupportedSupported
Total Time Fetch Consumer / MinThe total time that the consumers fetched data from this topic on this broker.SupportedSupported
Total Time Fetch Follower / MinThe total time that is taken by the followers of a partition to get new dataSupportedSupported
Network Processor Rate
Network Processor Avg Idle Percent / MinThe average free capacity of the network processors per minutes.SupportedSupported

Topics Details

ParameterDescriptionREST API SupportPrometheus Support
Topic Details
Topic NameSpecifies the name of the topic.SupportedSupported
Bytes in / MinThe aggregate incoming byte rate (amount of data written to topic on this broker) per minute.SupportedSupported
Bytes Out / MinThe aggregate outgoing byte rate per minute.SupportedSupported
Failed Fetch Requests / MinThe total number of failed Fetch Requests per minute.SupportedSupported
Failed Produce Requests / MinThe total number of failed producer requests.SupportedSupported
Messages In / MinThe number of messages that comes into the Kafka broker.SupportedSupported

Configurations

ParameterDescriptionREST API SupportPrometheus Support
Storage Details
Boot Class PathThe boot class path that is used by the bootstrap class loader to search for class files.SupportedNot Supported
Class PathThe Java class path that is used by the system class loader to search for class files.SupportedNot Supported
Spec VendorThe vendor of the JMX specification implemented by this product.SupportedNot Supported
Spec VersionThe version of the JMX specification implemented by this product.SupportedNot Supported
VM NameThe Java virtual machine name.SupportedNot Supported
VM VendorThe Java virtual machine implementation vendor.SupportedNot Supported

Loved by customers all over the world

"Standout Tool With Extensive Monitoring Capabilities"

It allows us to track crucial metrics such as response times, resource utilization, error rates, and transaction performance. The real-time monitoring alerts promptly notify us of any issues or anomalies, enabling us to take immediate action.

Reviewer Role: Research and Development

carlos-rivero
"I like Applications Manager because it helps us to detect issues present in our servers and SQL databases."
Carlos Rivero

Tech Support Manager, Lexmark

Trusted by thousands of leading businesses globally