Kafka Manager provides a web UI to administer Kafka clusters. This topic explains how to access the UI and add a cluster.
Prerequisites
You have created a Dataflow cluster with the Kafka service enabled. For instructions, see Create a cluster.
Selecting the Kafka service installs Kafka Manager and enables its authentication feature by default.
Usage notes
The current version of Kafka Manager does not support throttling for partition reassignments. If you require throttling, you must manually configure the parameters using the kafka-configs.sh script. For more information, see Limit the traffic for Kafka maintenance operations.
Procedure
Use an SSH tunnel to access the web UI. For details, see Use an SSH tunnel to access the web UIs of open-source components.
NoteChange the default password when you first use Kafka Manager.
To avoid exposing port 8085, access the web UI through an SSH tunnel. If you access the web UI at
http://localhost:8085, you must configure an IP address whitelist to prevent data leaks.
On the login page, enter your username and password.
Obtain the username, password, and ZooKeeper address as follows:
-
Log on to the E-MapReduce console.
In the top navigation bar, select a region and resource group.
On the EMR on ECS page, find the target cluster and click Services in the Actions column.
Obtain the following configuration:
Obtain the username and password:
On the Services page, find the Kafka Manager service and click Configure.
On the Configure page, view the values of the following parameters:
kafka.manager.authentication.username: The username to log on to the Kafka Manager web UI.
kafka.manager.authentication.password: The password to log on to the Kafka Manager web UI.
Obtain the ZooKeeper address of the cluster:
On the Services page, find the Kafka service and click Configure.
On the Configure page, click the server.properties tab and find the value of the zookeeper.connect parameter. This is the cluster's ZooKeeper address.
-
On the Kafka Manager page, choose Cluster > Add Cluster.
On the Add Cluster page, configure the following parameters and click Save.
Parameter
Description
Cluster name
The name of the cluster.
Cluster ZooKeeper hosts
The ZooKeeper address of the cluster.
Enter the zookeeper.connect value from Step 2.
Kafka version
Select the Kafka version for your cluster.
NoteKafka Manager might not support later versions of Kafka. Select the closest available version.
Enable JMX polling (Set JMX_PORT env variable before starting kafka server)
Enables Java Management Extensions (JMX).
In this example, JMX is enabled.
brokerViewThreadPoolSize
The size of the thread pool used to fetch data.
ImportantEnter a value greater than 2.
After adding the cluster, you can use standard Kafka features. To verify the configuration, click the Brokers menu in Kafka Manager to view a list of brokers and their details, such as Id, Host, Port, JMX Port, Bytes In, and Bytes Out. Also, check the rate metrics under Combined Metrics, such as Messages in/sec, Bytes in/sec, and Bytes out/sec, to confirm that all brokers are running properly and collecting JMX data.