Giter VIP home page Giter VIP logo

kafka-monitoring-stack-docker-compose's Introduction

Kafka Monitoring Stack for Docker Compose (Prometheus / Grafana)

https://github.com/streamthoughts/kafka-monitoring-stack-docker-compose/blob/master/LICENSE GitHub issues GitHub Repo stars

This repository demonstrates how to use Prometheus and Grafana for monitoring an Apache Kafka cluster.

Stack

Getting Started

1. Clone the Kafka Monitoring Suite repository.

$ git clone https://github.com/streamthoughts/kafka-monitoring-stack-docker-compose.git
$ cd kafka-monitoring-stack-docker-compose

2. Start Confluent/Kafka cluster.

Deploy one of the provided docker-compose stack:

Note: Depending on your network speed, this may take few minutes to download all images.

Single Zookeeper/Kafka with Prometheus/Grafana

Start/Stop with:

$ ./single-node-stack-start.sh
$ ./single-node-stack-stop.sh

# or directly
$ docker-compose -f  zk-kafka-single-node-stack.yml up -d
$ docker-compose -f  zk-kafka-single-node-stack.yml down

Single Zookeeper / Multiple Kafka with Prometheus/Grafana

$ docker-compose -f  zk-kafka-multiple-nodes-stack.yml up -d
$ docker-compose -f  zk-kafka-multiple-nodes-stack.yml down

Single Zookeeper/Kafka with Prometheus/Grafana (SASL/PLAINTEXT)

$ ./sasl-single-node-stack-start.sh
$ ./sasl-single-node-stack-stop.sh

Single Zookeeper / Multiple Kafka with Prometheus/Grafana (SASL/PLAINTEXT)

$ docker-compose -f  zk-kafka-multiple-nodes-secured-stack.yml up -d
$ docker-compose -f  zk-kafka-multiple-nodes-secured-stack.yml down

Full Stack (single node Kafka Cluster)

Start/Stop with:

$ ./full-single-node-stack-start.sh
$ ./full-single-node-stack-stop.sh

# or directly
$ docker-compose -f  zk-kafka-single-node-full-stack.yml up -d
$ docker-compose -f  zk-kafka-single-node-full-stack.yml down

3. Create Topic.

Create demo-topic with 6 partitions and 3 replicas.

$ docker exec -it kafka101 \
kafka-topics \
--create \
--partitions 6 \
--replication-factor 3 \
--topic demo-topic \
--bootstrap-server kafka101:29092

4. Produce messages.

Open a new terminal window, generate some message to simulate producer load.

$ docker exec -it kafka101 \
kafka-producer-perf-test \
--throughput 500 \
--num-records 100000000 \
--topic demo-topic \
--record-size 100 \
--producer-props bootstrap.servers=kafka101:29092

5. Consume messages.

Open a new terminal window, generate some message to simulate consumer load.

$ docker exec -it kafka101 \
kafka-consumer-perf-test \
--messages 100000000 \
--timeout 1000000 \
--topic demo-topic \
--reporting-interval 1000 \
--show-detailed-stats \
--bootstrap-server kafka101:29092

6. Open Grafana.

Open your favorite web browser and open one of the provided Grafana dashboards :

  • Kafka Cluster / Global Health Check

kafka-cluster-healthcheck

  • Kafka Cluster / Performance

kafka-cluster-performance

  • Kafka Cluster / Zookeeper Connections

  • Kafka Cluster / JVM & OS

  • Kafka Cluster / Hard disk usage

  • Kafka Cluster / Topic Logs

kafka-cluster-log

Accessing Grafana Web UI

Grafana is accessible at the address : http://localhost:3000

Security are :

  • user : admin

  • password : kafka

Accessing Prometheus Web UI

Prometheus is accessible at the address : http://localhost:9090

Contributions

Any feedback, bug reports and PRs are greatly appreciated!

Licence

Copyright 2020 StreamThoughts.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License

kafka-monitoring-stack-docker-compose's People

Contributors

fhussonnois avatar antonmry avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.