Skip to main content

kafka-healthcheck

A simple healthcheck wrapper to monitor Kafka.

Kafka Healthcheck is a simple server that provides a singular API endpoint to determine the health of a Kafka instance. This can be used to alert or take action on unhealthy Kafka instances.

The service checks the health by sending kafkacat about that kafkacat

This project is a copy "devshawn" whit modifications for use kafkacat

Usage

Kafka Healthcheck can be installed via pip. Both python and pip are required, as well as kafkacat.

Command-Line

Install kafka-healthcheck via pip:

pip install kafka-healthcheck

To start the healthcheck server, run:

kafka-healthcheck

The server will now be running on localhost:9290.

Configuration

Kafka Healthcheck can be configured via command-line arguments or by environment variables.

Port

The port for the kafka-healthcheck API.

Usage Value
Environment Variable HEALTHCHECK_PORT
Command-Line Argument --port
Default Value 9290

Kafka Host

The host of the Kafka instance to run the health check against. This is used with kafkacat.

Usage Value
Environment Variable HEALTHCHECK_KAFKA_HOST
Command-Line Argument --kafka-host
Default Value localhost

Kafka Port

The port of the Kafka instance to run the health check against. This is used with kafkacat.

Usage Value
Environment Variable HEALTHCHECK_KAFKA_PORT
Command-Line Argument --kafka-port
Default Value 9092

Log Level

The level of logs to be shown by the application.

Usage Value
Environment Variable HEALTHCHECK_LOG_LEVEL
Command-Line Argument --log-level
Default Value INFO
Valid Values DEBUG, INFO, WARNING, ERROR

All healthy responses are logged at DEBUG. Unhealthy responses are logged at WARNING. Any unexpected errors are logged at ERROR.

License

Copyright (c) 2019 Shawn Seymour.

Extended Copyright (c) 2022 Rodrigo Garcia.

Licensed under the Apache 2.0 license.

Release files for kafka-healthcheck 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kafka-healthcheck 0.0.1
File Size Uploaded
kafka-healthcheck-0.0.1.tar.gz 8.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kafka-healthcheck 0.0.1
File Interpreter ABI Platform
kafka_healthcheck-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 20.7 kB

Release files / kafka-healthcheck-0.0.1.tar.gz

Download URL kafka-healthcheck-0.0.1.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0a3321b4d333fb1f01977ac7a092dd36330c87a9362ac1bec7aa10549a73541b
BLAKE2b-256 checksum
How to use checksums
1989a01741bc3111cc8cc4956442999f7ab2839e3ef21e8cfbdf188930f36cf1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

Release files / kafka_healthcheck-0.0.1-py3-none-any.whl

Download URL kafka_healthcheck-0.0.1-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e81882d339cee74d7c346f43153d018d8948d2e494edd7a662bc25edafa49c82
BLAKE2b-256 checksum
How to use checksums
da489fdb8b4745e7c1ebb59cf00ae8f11369b77d1603e97841e8af93d2ee15db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page