Giter VIP home page Giter VIP logo

kafka-utilities's Introduction

kafka-utilities

who_in_isr

When I have under replicated partitions in my kafka cluster, this handy utility lets me know if a particular broker is at fault.

Requires kafkacat, and in particular, a version that supports json output (-J)

$ kafkacat -L -b broker.example.com  -J | who_in_isr.py
Broker 1
  1 in isr:   100.00%
  2 in isr:   100.00%
  3 in isr:   100.00%
  4 in isr:     0.00%
  5 in isr:   100.00%

Broker 2
  1 in isr:   100.00%
  2 in isr:   100.00%
  3 in isr:   100.00%
  4 in isr:    10.87%
  5 in isr:   100.00%

Broker 3
  1 in isr:   100.00%
  2 in isr:   100.00%
  3 in isr:   100.00%
  4 in isr:     0.00%
  5 in isr:   100.00%

Broker 4
  4 in isr:   100.00%

Broker 5
  1 in isr:   100.00%
  2 in isr:   100.00%
  3 in isr:   100.00%
  4 in isr:     0.00%
  5 in isr:   100.00%

Broker -1
  1 in isr:     0.00%
  4 in isr:     0.00%
  5 in isr:     0.00%

How to read this:

  • For partitions with leaders on broker 1, broker 4 is missing from the ISR for all the replicas it is supposed to be part of.
  • For partitions with leaders on broker 2, broker 4 is only in the ISR for 10.87% of the replicas it is supposed to be part of.

Looking at all brokers, it is always broker 4 that is missing from ISRs. This indicates that it is likely that broker 4 is the one having problems.

Broker -1 means that there are some partitions have no leaders. They are likely offline.

kafka-utilities's People

Contributors

wushujames 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.