GithubHelp home page GithubHelp logo

sarwarbhuiyan / kafka-logs-elk Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 24 KB

A docker-compose setup to parse, ingest, and analyse Kafka logs using the Elastic stack

License: MIT License

Shell 100.00%

kafka-logs-elk's Introduction

Kafka Logs Explorer

As a support person or a developer helping somebody debug a Kafka cluster, you may get Kafka logs from somewhere or somebody and want to analyze what happened. Instead of grepping across multiple files and thousands of lines or code, wouldn't it be nice to just have a tool to put it all together into Elasticsearch and have a Kibana instance to search through it or slice and dice that data up in visualizations?

This setup is one step towards that that cuts down on the setup of all that.

Getting Started

Prerequisites

What things you need to install the software and how to install them

  1. Docker for desktop

Installing

A step by step series of examples that tell you how to get a development env running

  1. Clone this repo
git clone ...
  1. Remove the log files from the input folder
rm input/*
  1. Copy your log files into the input folder
cp <path to log files>/*.log input/
  1. Run the docker-compose with setup.yml
docker-compose -f setup.yml up
  1. Run the docker-compose up
docker-compose up

Exploring the logs in Kafka

The above steps will create the necessary setup to:

  1. Ingest the logs in input/ to the Elasticsearch instance
  2. Setup the ingest node pipeline to parse the Kafka logs correctly (timestamp, level, component, etc)
  3. Setup Kibana with the index patterns and setup a sample dashboard with the logs ingested

To explore the data, one can simply go to Kibana and go to the Discover tab (the icon that looks like a compass). The dashboards are available from the Dashboard tab (the icon that looks a set of rectangles) and searching for the word "Kafka".

Tearing it all down for the next set of logs

Run the following steps:

docker-compose -f docker-compose.yml -f setup.yml down -v

Built With

  • Filebeat (with the Kafka module)
  • Elasticsearch
  • Kibana
  • Docker

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

The Elastic stack repo

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.