Git Product home page Git Product logo

talhabayburtlu / kafka-anomaly-detector-be Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 88 KB

Kafka Anomaly Detector is a tool for analyzing unconsummed messages (lags) between kafka topics and consumer groups. It's main idea is to notify people when lags are out of defined boundaries. It is composed of three different modules which are responsible from interactions with api, lag analyzer scheduler and alert processor scheduler.

Dockerfile 1.29% Java 98.71%

kafka-anomaly-detector-be's Introduction

Kafka Anomaly Detector [Backend]

A tool for analyzing kafka clusters and creating alerts when anomalies are detected. ๐Ÿค– ๐Ÿ“ˆ

Description

Kafka Anomaly Detector is a tool for analyzing unconsummed messages (lags) between kafka topics and consumer groups. It's main idea is to notify people when lags are out of defined boundaries. It is composed of three different modules which are responsible from interactions with api, lag analyzer scheduler and alert processor scheduler.

Definitions

  • Rules are ways of maintaining boundaries between topic and consumer group pairs. ๐Ÿ“
  • Regex relations are ways of remainding users to create rules between matching topic and consumer group pairs. ๐Ÿ“Œ

Modules

  • ๐Ÿ’ป Interactions: Exposes API to the user for managing kafka clusters, creating rules for topic & consumer group pairs, defining target and destinations for alerts to be sent.
  • ๐Ÿ“ˆ Lag Analyzer: Is a scheduler which iterates over all clusters and their topic & consumer group pairs for finding lags between them. Lags are saved to the PostgreSQL database. If there is a rule defined for that pair and the boundaries are crossed error alerts are produced. If any regex relations found between not processed pairs creates warning alerts.
  • โ— Alert Processor: Is a scheduler which consumes unprocessed alerts by looking their target and destinations. Currently slack channel notification system is available.

Features

  • Multiple kafka cluster analysis available by giving their bootstrap address with optionally their security configurations to the application.
  • For topic and consumer group pairs rules can be defined with upper and lower boundary. Alerts will be created when those boundaries are crossed.
  • Regex relations remainds important topic and consumer groups which needed to be analzyed via defining rules.
  • A target reflects where alert should be sent when processed. Currently only slack channel notification system is available via webhooks feature.
  • A destination is composed with multiple targets for each community to get their notifications. Each rules and regex needed to be defined with a destination.

Deployment

Each module has their Dockerfile which exports jar files and creates docker images. Dockerfiles can be build under module directory.

$ docker build -t <module-name> .
$ docker run -p 8081:8081 <module-name>

Interactions API can be runned with docker but lag analyzer and alert processor are needed to be run with Kubernetes cron jobs which each of them has their cron.yaml file.

$ kubectl create -f cron.yaml

Screenshots

Slack Notifications

Planned to Add

[x] Slack notification Integration. ๐Ÿ””
[ ] Email notification integration. ๐Ÿ””
[ ] SMS notification integration. ๐Ÿ””
[ ] Different boundaries to be set for time intervals for rules in order to avoid high traffics to be mark as anomalies. ๐Ÿ“

kafka-anomaly-detector-be's People

Contributors

talhabayburtlu avatar

Watchers

James Cloos avatar  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.