Kafka is a distributed streaming platform that is designed for building real-time data pipelines and streaming applications. It provides a unified, high-throughput, fault-tolerant platform for handling real-time data feeds. Kafka is characterized by its scalability, durability, and low-latency performance, makes an ideal solution for use cases such as event sourcing, log aggregation, stream processing, and data integration. With its distributed architecture, Kafka allows seamless communication and integration between different components of modern data-driven applications, enabling organizations to efficiently process, store, and analyze large volumes of streaming data in real-time.
IBM® Instana Observability is a fully automated Application Performance Management (APM) solution that is designed for the challenges of managing micro-service and cloud-native applications. Instana can monitor Kafka. This blog explains how to enable JMX authentication while starting Kafka and how to configure Instana agent to monitor Kafka while JMX is authenticated.
Setting up Kafka by securing JMX
To set up Kafka by securing JMX for a demo, complete the following steps:
-
Download the Kafka binaries from https://kafka.apache.org/downloads and extract them to a suitable location on your machine.
-
Start the ZooKeeper for Kafka.
./zookeeper-server-start.sh ../config/zookeeper.properties
-
Start Kafka Broker in a new terminal window or tab.
vi jmxremote.password
monitorRole QED
chmod 600 jmxremote.password
-Dcom.sun.management.jmxremote.password.file=/path/to/jmxremote.password
-Dcom.sun.management.jmxremote.access.file=/path/to/jmxremote.access
export KAFKA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.port=2020"
./kafka-server-start.sh ../config/server.properties
Installing Instana agent
-
Install the Instana agent that is tailored to your operating system from the Instana. For example, if you’re using Linux, the installation process involves the following steps:



Note: Agent installation procedures can vary based on the operating system.
For more information, see https://www.ibm.com/docs/en/instana-observability/current?topic=agents-installing-host.
-
After the Installation of the agent.

Different Logs for Kafka

Note: This log can also occur if you provide the wrong `jmxPort`.

Different dashboard for Kafka with unauthenticated JMX
Instana dashboard for Kafka:

Agent dashboard for Kafka:

For more information about troubleshooting, see https://ibm.biz/jmx-auth-not-config.
From the above, the user can understand which Kafka node (Node Id) is secured and connected to a Zookeeper (Zookeeper Connect).
For more information about Monitoring Kafka, see https://www.ibm.com/docs/en/instana-observability/current?topic=technologies-monitoring-kafka.
#Agent