• Stars
    star
    134
  • Rank 270,967 (Top 6 %)
  • Language
    Shell
  • License
    Apache License 2.0
  • Created over 5 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This project provides Docker compose files to deploy an Apache Kafka platform with a monitoring stack using Prometheus and Grafana

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:

$ ./zk-kafka-single-node-stack-start.sh
$ ./zk-kafka-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)

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

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

$ docker-compose -f  zk-kafka-multiple-nodes-sasl-stack.yml up -d
$ docker-compose -f  zk-kafka-multiple-nodes-sasl-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-2023 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

More Repositories

1

kafka-connect-file-pulse

🔗 A multipurpose Kafka Connect connector that makes it easy to parse, transform and stream any file, in any format, into Apache Kafka
Java
321
star
2

jikkou

The Open source Resource as Code framework for Apache Kafka. Jikkou helps you implement GitOps for Kafka at scale!
Java
193
star
3

azkarra-streams

🚀 Azkarra is a lightweight java framework to make it easy to develop, deploy and manage cloud-native streaming microservices based on Apache Kafka Streams.
HTML
186
star
4

awesome-opensource-contribs-kafka

A list of all awesome open-source contributions for the Apache Kafka project
95
star
5

kafka-clients-kotlin

This projects gives Kotlin bindings and several extensions for Apache Kafka Clients.
Kotlin
40
star
6

apache-pulsar-cheat-sheet

This cheat sheet is filled with some handy tips, commands and code snippets to get you streaming data using Apache Pulsar in no time!
Java
28
star
7

demo-twitter-ksqldb-clickhouse

Demonstration Project : Fast Data Analytic platform with Clickhouse, Apache Kafka and ksqlDB
Java
20
star
8

kafka-connect-transform-grok

Grok Expression Transform for Kafka Connect.
Java
16
star
9

kafka-consumer-partition-assignor

This project contains examples to implement a custom PartitionAssignor for Apache Kafka consumer-client.
Java
12
star
10

kafka-connect-client

Java client library for Apache Kafka Connect REST Interface
Java
6
star
11

kc4streams

A collection of common utilities and reusable classes for Kafka Streams applications.
Java
6
star
12

pulsar-quickstart-java

This project demonstrates how to write simple producers and consumers for Apache Pulsar
Java
3
star
13

demo-kafka-streams-scottify

Scottify is the official media services provider of Starfleet 🖖
Java
3
star
14

azkarra-streaming-count

This project demonstrates how to build and containerize a Kafka Streams ap using Akzarra and Jib
Java
1
star
15

spark-streaming-examples

This project contains simple code skeleton for developing a Spark Streaming application using Kafka integration.
Java
1
star
16

setup-jikkou

Jikkou GitHub Actions
JavaScript
1
star
17

kafka-streams-examples

This project contains code examples that demonstrate how to use the KafkaStreams Streams DSL and Processor API.
Java
1
star