Apache Kafka is an event-driven data streaming platform that stores and brokers sensitive information with high data throughput and fault tolerance. Broker clusters require health monitoring to better inform partitioning, replication, data persistence and other intricate Kafka maintenance processes. Iris offers a dynamic solution to observe your Kafka platform in real time, compare against historically logged data and ensures your broker does not throttle user experience.
Iris provides a containerized Docker environment with a highly configurable Kafka container. Please see the docker-compose.yml if you wish to configure your broker.
-
Install Docker: https://docs.docker.com/get-docker/
-
Fork the repo from the
mainbranch -
Run the command:
npm install- Open Docker and check Images tab, it should include the following Docker images to run the container environments. If not, please install the latest images:
docker pull- Once Docker has been booted up, run the
docker-compose.ymlfile in your terminal with the following command:
docker-compose up- Watch your terminal. If at any point you receive the following error, close your Docker environment in your terminal with
CTRL+Cand rerundocker-compose upagain. Use Docker Desktop, and click on JMX-Kafka's logs to monitor the JMX container logs for any errors you may miss in your terminal.
-
Now that the Kafka broker is running and the ports are being read properly, run your Kafka dependent program across the broker to begin streaming your data.
-
To start the application and begin viewing the broker's health, in another terminal, run command:
npm run dev-
After running
npm run dev, the application will load ontolocalhost:8080where you can browse your incoming metrics.- On the left pane, there are persistent histograms and piecharts.
- On the right pane, you can add line charts with different metrics.
-
Click on
MetricandTime Framedropdowns to monitor different Kafka Metrics on different Time Frames.
-
Click on
+button in the upper right hand corner to add additional line charts. -
Click on
Xbutton on each line chart container to delete each chart. -
Click on
clockbutton underneath+in the upper right hand corner to view historical data at a specific time interval. Data is logged on a 15 sec interval to an AWS RDS SQL database.
-
On load, the default PORT is
localhost:9090 -
Click on
PORT ACCESSSon the Navigation Bar to switch to a different port-
Port numbers and passwords are hard coded into a MongoDB database.
-
If you'd like to add additional port number and passwords, use Postman to make a
POSTrequest to'/createPort'with keysportandpasswordin therequest body. -
You should receive a positive response of the MongoDB document with the newly created
portand hashedpasswordin the response. -
If you receive a
nullresponse, theportalready exists in the database.
-
-
To view a list of raw JMX metrics and data :
localhost:5556/metrics -
To view Prometheus :
localhost:9090 -
To view a list of available metrics:
http://localhost:9090/api/v1/label/__name__/values -
In order to query different Prometheus end points, follow the syntax :
http://localhost:9090/api/v1/query?query={Enter the Metric Name}[{TimeRange}].
- For example:
http://localhost:9090/api/v1/query?query=kafka_server_broker_topic_metrics_messagesinpersec_rate[1h]
We provide an end to end Kafka producer and consumer to measure the stability of the Iris health monitor. The Producer and Consumer files contain simple message files streamed to the Kafka Broker using AVRO schema and KafkaJS.
- In one terminal, run the command:
npm run start:producer- In a separate terminal, run the command:
npm run start:consumerNow your should be passing messages across your Kafka Broker.
-
Brennan Lee
-
Michael Reyes
-
Walter Li
-
Huu (John) Le





