Bird
Raised Fist0
Kafkadevops~5 mins

Kafka Manager/UI tools - Commands & Configuration

Choose your learning style10 modes available
Introduction
Kafka Manager and UI tools help you see and control your Kafka clusters easily. They solve the problem of managing Kafka topics, brokers, and consumers without using complex commands.
When you want to quickly check the health of your Kafka cluster without using command line tools
When you need to create, delete, or modify Kafka topics with a simple interface
When you want to monitor consumer groups and their lag visually
When you want to troubleshoot Kafka issues by viewing logs and metrics in one place
When you want to share Kafka cluster status with your team without giving them command line access
Config File - application.conf
application.conf
kafka-manager {
  kafka-manager.zkhosts="localhost:2181"
  kafka-manager.kafka-manager-auth.enabled=false
  kafka-manager.http.port=9000
  kafka-manager.loglevel="INFO"
}

play {
  http.port=9000
  application.secret="changemechangemechangemechangeme"
}

This configuration file sets up Kafka Manager to connect to your ZooKeeper at localhost:2181. It disables authentication for simplicity, sets the HTTP port to 9000, and configures logging level to INFO. The play framework settings define the web server port and a secret key for session management.

Commands
This command runs Kafka Manager in a Docker container, connecting it to ZooKeeper at localhost:2181 and exposing the web UI on port 9000.
Terminal
docker run -d --name kafka-manager -p 9000:9000 -e ZK_HOSTS=localhost:2181 hlebalbau/kafka-manager
Expected OutputExpected
Unable to find image 'hlebalbau/kafka-manager:latest' locally latest: Pulling from hlebalbau/kafka-manager Digest: sha256:... Status: Downloaded newer image for hlebalbau/kafka-manager:latest c1a2b3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6a7b8c9d0e1f2
→
-d - Run container in background
→
-p 9000:9000 - Map container port 9000 to host port 9000
→
-e ZK_HOSTS=localhost:2181 - Set ZooKeeper connection string
This command checks if Kafka Manager is running and reachable by requesting the clusters page, which lists Kafka clusters managed by the UI.
Terminal
curl http://localhost:9000/clusters
Expected OutputExpected
<!DOCTYPE html> <html> <head><title>Kafka Manager</title></head> <body> <h1>Kafka Clusters</h1> <!-- Cluster list content here --> </body> </html>
This command shows the last 20 lines of Kafka Manager logs to verify it started correctly and connected to ZooKeeper.
Terminal
docker logs kafka-manager --tail 20
Expected OutputExpected
[INFO] Starting Kafka Manager... [INFO] Connected to ZooKeeper at localhost:2181 [INFO] Kafka Manager started on port 9000
→
--tail 20 - Show last 20 lines of logs
Key Concept

If you remember nothing else from Kafka Manager, remember: it gives you a simple web interface to manage and monitor Kafka clusters without complex commands.

Common Mistakes
Not exposing the container port 9000 to the host
You won't be able to access the Kafka Manager web UI from your browser
Always use -p 9000:9000 when running the container to map ports
Setting the wrong ZooKeeper address in ZK_HOSTS
Kafka Manager cannot connect to your Kafka cluster and will show errors or no data
Verify your ZooKeeper address and set it correctly in the environment variable
Not checking logs after starting Kafka Manager
You might miss errors that prevent the UI from working properly
Use docker logs to check for startup errors and fix them early
Summary
Run Kafka Manager in a Docker container connected to your ZooKeeper.
Access the Kafka Manager UI on port 9000 to manage Kafka clusters visually.
Check logs to ensure Kafka Manager started and connected successfully.

Practice

(1/5)
1. What is the main purpose of Kafka Manager or similar UI tools for Kafka?
easy
A. To encrypt Kafka data during transmission
B. To provide a visual interface for monitoring Kafka clusters
C. To write Kafka messages automatically
D. To replace Kafka brokers with a graphical system

Solution

  1. Step 1: Understand Kafka Manager's role

    Kafka Manager provides a web interface to monitor Kafka clusters visually.
  2. Step 2: Compare options

    Options A, B, and C describe functions Kafka Manager does not perform.
  3. Final Answer:

    To provide a visual interface for monitoring Kafka clusters -> Option B
  4. Quick Check:

    Kafka Manager = Visual monitoring [OK]
Hint: Remember: Kafka Manager shows Kafka data visually [OK]
Common Mistakes:
  • Thinking Kafka Manager replaces brokers
  • Confusing monitoring with data encryption
  • Assuming Kafka Manager writes messages automatically
2. Which command is typically used to start Kafka Manager UI after installation?
easy
A. java -jar kafka-manager.jar
B. kafka-server-start.sh
C. kafka-manager start
D. kafka-console-producer.sh

Solution

  1. Step 1: Identify Kafka Manager start command

    Kafka Manager is a Java application started with java -jar kafka-manager.jar.
  2. Step 2: Eliminate other options

    Options B and D start Kafka brokers or producers, not Kafka Manager. kafka-manager start is not a valid command.
  3. Final Answer:

    java -jar kafka-manager.jar -> Option A
  4. Quick Check:

    Start Kafka Manager = java -jar [OK]
Hint: Kafka Manager runs as a Java jar file [OK]
Common Mistakes:
  • Using Kafka broker start commands instead
  • Assuming a custom 'kafka-manager start' command exists
  • Confusing producer commands with UI start
3. Given Kafka Manager is running and connected to a Kafka cluster, what will you see on its dashboard?
medium
A. List of topics, brokers, and consumer groups with their status
B. Only the raw Kafka log files
C. Source code of Kafka brokers
D. Encrypted Kafka messages

Solution

  1. Step 1: Understand Kafka Manager dashboard content

    The dashboard shows topics, brokers, and consumer groups with their health and status.
  2. Step 2: Check other options

    Raw logs, source code, or encrypted messages are not displayed on the dashboard.
  3. Final Answer:

    List of topics, brokers, and consumer groups with their status -> Option A
  4. Quick Check:

    Dashboard = Topics + Brokers + Consumers [OK]
Hint: Dashboard shows cluster components and status [OK]
Common Mistakes:
  • Expecting raw logs or source code in UI
  • Thinking encrypted messages are visible
  • Confusing Kafka Manager with log viewer
4. You started Kafka Manager but the UI does not load in the browser. Which is the most likely cause?
medium
A. Kafka Manager requires a database to start
B. Kafka Manager is not connected to any Kafka cluster
C. Kafka topics are empty
D. Kafka Manager server is not running or listening on the expected port

Solution

  1. Step 1: Check Kafka Manager server status

    If the UI does not load, the server might not be running or listening on the port.
  2. Step 2: Evaluate other options

    Connection to Kafka cluster or empty topics won't prevent UI loading. Kafka Manager does not require a separate database to start.
  3. Final Answer:

    Kafka Manager server is not running or listening on the expected port -> Option D
  4. Quick Check:

    UI not loading = Server not running [OK]
Hint: Check if Kafka Manager server is running and port is open [OK]
Common Mistakes:
  • Assuming empty topics block UI
  • Thinking Kafka Manager needs a database to start
  • Ignoring server running status
5. You want to monitor consumer lag using Kafka Manager UI. Which steps should you follow to set this up correctly?
hard
A. Install a separate lag monitoring tool and connect it to Kafka Manager
B. Modify Kafka broker configuration to enable lag monitoring
C. Add the Kafka cluster in Kafka Manager, then navigate to consumer groups to view lag metrics
D. Restart Kafka Manager with lag monitoring enabled via command line flag

Solution

  1. Step 1: Add Kafka cluster to Kafka Manager

    You must first add your Kafka cluster details in Kafka Manager to connect and monitor it.
  2. Step 2: Access consumer groups section

    Once connected, navigate to consumer groups in the UI to see lag metrics and consumer status.
  3. Final Answer:

    Add the Kafka cluster in Kafka Manager, then navigate to consumer groups to view lag metrics -> Option C
  4. Quick Check:

    Monitor lag = Add cluster + check consumer groups [OK]
Hint: Add cluster first, then check consumer groups for lag [OK]
Common Mistakes:
  • Thinking lag monitoring needs separate tools
  • Trying to enable lag via broker config
  • Restarting Kafka Manager with flags instead of UI steps
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard