How to Use Confluent Control Center in Kafka for Monitoring
To use
Confluent Control Center in Kafka, first install Confluent Platform and start the Control Center service. Then, configure your Kafka brokers and topics to send metrics, and access the Control Center web UI to monitor cluster health, topics, and consumer groups in real time.Syntax
The basic steps to use Confluent Control Center involve starting the service and configuring Kafka to send metrics.
- Start Control Center: Run
confluent control-center startto launch the monitoring UI. - Configure Kafka brokers: Add metrics reporter settings in
server.propertiesto send metrics to Control Center. - Access UI: Open
http://localhost:9021in a browser to view dashboards.
bash
confluent control-center start
Example
This example shows how to start Confluent Control Center and configure Kafka to send metrics for monitoring.
bash
# Step 1: Start Confluent Control Center confluent control-center start # Step 2: Add these lines to your Kafka broker's server.properties file confluent.metrics.reporter.bootstrap.servers=localhost:9092 confluent.metrics.reporter.topic.replicas=1 confluent.controlcenter.internal.topics.replication=1 # Step 3: Restart Kafka broker to apply changes # Step 4: Open browser at http://localhost:9021 to see Control Center UI
Output
Starting Control Center...
Control Center started successfully.
Kafka broker restarted with metrics reporter enabled.
Access Control Center at http://localhost:9021
Common Pitfalls
Common mistakes when using Confluent Control Center include:
- Not configuring Kafka brokers to send metrics, so Control Center shows no data.
- Using incorrect broker addresses in the metrics reporter settings.
- Not restarting Kafka brokers after configuration changes.
- Firewall or network issues blocking access to Control Center UI on port 9021.
Always verify your server.properties and ensure services are running.
properties
## Wrong: Missing metrics reporter config in server.properties # No metrics config lines ## Right: Add metrics reporter config confluent.metrics.reporter.bootstrap.servers=localhost:9092 confluent.metrics.reporter.topic.replicas=1 confluent.controlcenter.internal.topics.replication=1
Quick Reference
| Step | Command/Config | Description |
|---|---|---|
| 1 | confluent control-center start | Start the Control Center service |
| 2 | Add metrics reporter settings in server.properties | Enable Kafka brokers to send metrics |
| 3 | Restart Kafka brokers | Apply configuration changes |
| 4 | Open http://localhost:9021 | Access Control Center UI in browser |
Key Takeaways
Start Confluent Control Center with 'confluent control-center start' to enable monitoring.
Configure Kafka brokers with metrics reporter settings in server.properties to send data.
Restart Kafka brokers after configuration changes for metrics to take effect.
Access the Control Center UI at http://localhost:9021 to monitor Kafka clusters visually.
Check network and firewall settings if the Control Center UI is not accessible.