Technolords :: Tool :: Kafka :: Healthcheck

A health check for a Kafka broker

License

License

Categories

Categories

Net
GroupId

GroupId

net.technolords.tool.kafka
ArtifactId

ArtifactId

health-check
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

Technolords :: Tool :: Kafka :: Healthcheck
A health check for a Kafka broker
Project URL

Project URL

https://github.com/Technolords/tool-kafka-healthcheck
Source Code Management

Source Code Management

https://github.com/Technolords/tool-kafka-healthcheck/

Download health-check

How to add to project

<!-- https://jarcasting.com/artifacts/net.technolords.tool.kafka/health-check/ -->
<dependency>
    <groupId>net.technolords.tool.kafka</groupId>
    <artifactId>health-check</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/net.technolords.tool.kafka/health-check/
implementation 'net.technolords.tool.kafka:health-check:1.0.0'
// https://jarcasting.com/artifacts/net.technolords.tool.kafka/health-check/
implementation ("net.technolords.tool.kafka:health-check:1.0.0")
'net.technolords.tool.kafka:health-check:jar:1.0.0'
<dependency org="net.technolords.tool.kafka" name="health-check" rev="1.0.0">
  <artifact name="health-check" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.technolords.tool.kafka', module='health-check', version='1.0.0')
)
libraryDependencies += "net.technolords.tool.kafka" % "health-check" % "1.0.0"
[net.technolords.tool.kafka/health-check "1.0.0"]

Dependencies

test (1)

Group / Artifact Type Version
org.testng : testng jar 6.14.2

Project Modules

There are no modules declared in this project.

Health check for a Kafka broker

This (nano) service scans for a running Kafka broker and reports the status. The purpose of this service is to support implementation a health check (Bash script, Docker health check, Openshift, etc). Note that it expects a single instance of a Kafka broker and stops at the first found candidate.

This service does not create a topic and posts messages on it etc (as many other health checkers do). Instead, this service uses JMX to connect (locally) to the Kafka broker, finds a MBean on interest and reads (and prints to stdout) the status and then terminates.

Possible status values are:

  • 0: not running
  • 1: starting
  • 2: recovering from unclean shutdown
  • 3: running
  • 6: pending controlled shutdown
  • 7: shutting down

See also:

Usage

Example input:

java -jar health-check-${VERSION}.jar

Example output:

3

Versions

Version
1.0.0