Kafka Monitoring

 
Kafka monitoring provides visibility into Apache Kafka brokers that interact with various applications and frameworks in your environment. Kafka monitoring collects remote JMX metrics from Kafka brokers that are connected to Apache Zookeeper servers. Application Performance Management displays the Kafka metrics, and displays Kafka nodes in the map Infrastructure Layer.
You can correlate the Kafka nodes to the host node in the same map layer. Correlation can take place when you enable the Kafka host extension on the same as the Kafka broker. You can also correlate Kafka with other performance data. For example, correlate Kafka performance with container performance, AWS performance, and Azure performance. In this article, we use correlating Kafka Monitoring with Host Monitoring as an example.
Here are the steps to install and use Kafka monitoring:
 
   
 
Download and Extract the Infrastructure Agent
After you get access to CA Digital Experience Insights, you download and extract Kafka monitoring.
 
Follow these steps:
 
  1. Log in to CA Digital Experience Insights. 
  2. Select 
    Open
     on the 
    Application Performance Management
     box.
    The Application Performance Management home page appears.
  3. Download the Infrastructure Agent package that contains Kafka monitoring.
    1. Click the 
      Agent
       icon in the lower section of the navigation pane.
    2. On the 
      Agent Selection
       page, select the tab corresponding to your operating system.
    3. Select 
      Infrastructure
       for the environment.
    4. Select 
      Kafka Monitoring
       as the agent.
    5. (Optional) Configure the appropriate property now. You can also configure the property later in the Infrastructure Agent bundle.properties file.
      introscope.agent.kafka.zookeeper.server.list
      Zookeeper host:port values for the Kafka agent to monitor the available Kafka brokers. Separate multiple values using commas.
      introscope.agent.jmx.server.list
      Remote JMX servers or Kafka brokers host:port values the Kafka agent monitors. Separate multiple values using commas.
    6. (Optional) To correlate Kafka monitoring with Host monitoring, in the
       Agent Components List
      , select 
      Host Monitor
      .
      Host monitoring is included in the Kafka monitoring package download.
  4. Select 
    Download and Install
    .
    CA Digital Experience Insights downloads the package to your computer.
  5. Verify that the Infrastructure Agent download file contains the Kafka monitoring file.
    UNIX
    : Kafka_Monitoring_v<number>>.tar For example, Kafka_Monitoring_v1.tar.
    Windows
    : Kafka_Monitoring_v<number>>.zip For example, Kafka_Monitoring_v1.zip.
    If you cannot find the file, repeat steps 4 and 5.
  6.  Extract the downloaded Infrastructure Agent file.
    UNIX
    : Run this command: tar -xf Kafka_Monitoring_v<number>.tar. For example, tar -xf Kafka_Monitoring_v1.tar.
    Windows
    : Unzip the file.
Install and Run the Infrastructure Agent
You install the Infrastructure Agent before you install Kafka monitoring.
 
Follow these steps:
 
  1. Navigate to the 
    apmia
     directory.
  2. Run the appropriate command to install the Infrastructure Agent:
    UNIX
    : ./apmia-ca-installer.sh install
    Windows
    : apmia-ca-installer.bat install
Log Files
You can review the Infrastructure Agent and Kafka Monitoring logs in the <Infrastructure_Agent_Home>/logs directory.
These log files are in the logs directory:
  • IntroscopeAgent.log
  • APMIAgentConsole.log
Configure Kafka Broker Monitoring
You can configure Kafka monitoring two ways. Kafka monitoring can connect to Zookeeper broker instances and automatically discover associated broker instances. Alternatively, Kafka monitoring can monitor specific broker instances.
 
Provide Zookeeper Instances that Automatically Discover Kafka Brokers
 
Use this option when you have Kafka cluster environments where Kafka broker instances are added and removed. The Kafka monitoring agent connects to each configured Zookeeper instance and discovers associated Kafka broker instances. Kafka monitoring then starts monitoring the discovered Kafka broker instances.
 
Follow these steps:
 
  1. Navigate to the apmia/extensions/KafkaExtension directory.
  2. Open the bundle.properties file in a text editor. 
  3. Set the 
    introscope.agent.kafka.zookeeper.server.list
     property as shown in this example:
    introscope.agent.kafka.zookeeper.server.list=zk-clusterX-id1:2181,zk-clusterX-id2:2181,zk-clusterX-id3:2181,zk-clusterY-id1:2181
  4. Restart the Infrastructure Agent using the appropriate command:
    UNIX
    : ./apmia-ca-installer.sh restart
    Windows
    : apmia-ca-installer.bat restart
  5. (Optional) Use the Kafka attributes to create Kafka perspectives
Provide Kafka Broker Instances
 
Use this option when you want to monitor a specific set of Kafka broker instances.
 
Follow these steps:
 
  1. Navigate to the apmia/extensions/KafkaExtension directory.
  2. Open the 
    bundle.properties
     file in a text editor. 
  3. Set the 
    introscope.agent.jmx.server.list
     property as shown in this example:
    introscope.agent.jmx.server.list=kafka-broker1:1099,kafka-broker5:1099
  4. Restart the Infrastructure Agent using the appropriate command:
    UNIX
    : ./apmia-ca-installer.sh restart
    Windows
    : apmia-ca-installer.bat restart
  5. (Optional) Use the Kafka attributes to create Kafka perspectives
Configure Host Monitoring and Kafka Monitoring Correlation
Host Monitoring provides disk, CPU, memory, and network metrics. You can see Host monitoring that is correlated with Kafka monitoring.
This procedure assumes that you haved downloaded and configured Host Monitoring with Kafka Monitoring. 
Follow these steps:
 
  1. Navigate to the apmia/extensions/KafkaExtension directory.
  2. Open the 
    bundle.properties
     file in a text editor. 
  3. Set the 
    introscope.agent.jmx.server.list
     property as shown in this example:
    introscope.agent.jmx.server.list=localhost:1099
  4. Save and close the file.
  5. Restart the Infrastructure Agent using the appropriate command:
    UNIX
    : ./apmia-ca-installer.sh restart
    Windows
    : apmia-ca-installer.bat restart
Kafka Monitoring Properties
You configure Kafka Monitoring properties to enable metrics collection.
 
introscope.agent.kafka.zookeeper.server.list
This property provides Zookeeper host:port values for the Kafka agent to monitor the available Kafka brokers.
Default
: Not applicable
Notes
:
  • Separate multiple values using commas.
  • Requires Infrastructure Agent restart.
introscope.agent.jmx.server.list
This property provides Kafka brokers host:port values that the Kafka agent monitors. All of the brokers should expose the remote JMX port to be accessible by the client.
Default
: Not applicable
Notes:
 
  • Separate multiple values using commas.
  • Requires Infrastructure Agent restart.
Monitor Kafka Health
You view the Kafka instance data using the 
Components
 view and other views in Application Performance Management.
  1. Log in to CA Digital Experience Insights. 
  2. Select 
    Open
     on the 
    Application Performance Management
     box.
    Application Performance Management home page appears
  3. In the left navigation pane, select the 
    Map
     icon.
  4. View the Kafka infrastructure layer data.
    1. Select 
      Infrastructure Layer
       in upper-left corner drop-down.
    2. Select 
      Infrastructure Overview
       in the right drop-box
    3. The Kafka node displays in the map.
    4. Select the Kafka node to open 
      Components 
       
      View
       opens to the right of the map.
    5. Select the 
      Kafka Broker 
      tab to view the attributes and metrics from the infrastructure layer.
      Host Monitoring and Kafka Monitoring can run on the same computer as the Kafka broker. In this situation, you can see correlated data for Host Monitoring and Kafka Monitoring.
  5. Scroll down the data to examine the Kafka metrics to determine if any of the values indicate poor performance.