Configure ODP Kafka and Kafka 3

This page describes how to enable JMX for Kafka so that Pulse can collect metrics.

You can optionally secure JMX with basic authentication or TLS. You must also grant the required ACLs to ensure Pulse has access.

Set JMX Port (Kafka 2.x)

In the Ambari UI:

  • Navigate to Kafka > Configs > Advanced kafka-env > kafka-env template.
  • Add the following parameter at the end of the file to set the JMX port without any security.
Bash
Copy

Set JMX port (Kafka 3.x)

In the Ambari UI:

  1. Navigate to Kafka > Configs > Advanced kafka3-env > kafka3-env template.
  2. Add the following parameter at the end of the file to set the JMX port without any security.

Kafka 3 with ZooKeeper

Bash
Copy

Kafka 3 with KRaft

Bash
Copy

Enable Authentication on JMX Remote Port

In kafka-env template or kafka3-env, choose and add one of the following JMX configurations based on your security requirements.

Enable Basic Authentication on JMX Remote Port (Optional)

To enable basic authentication on the JMX remote port, add the following parameters:

Bash
Copy

Enable TLS/SSL on JMX Remote Port (Optional)

To enable TLS/SSL authentication on the JMX remote port, add the following parameters:

Bash
Copy

Set Kafka ACLs for Pulse (HDFS user example)

Run the following commands as the Kafka user to grant All operations on all topics and groups:

Grant topic permissions:

Bash
Copy

Grant group permissions:

Bash
Copy

Result

  • Kafka exposes JMX metrics on the configured port.
  • JMX can be secured with Basic Auth and/or TLS.
  • Pulse has Kafka ACLs to read topics and groups.
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard