A simple healthcheck wrapper to monitor kafka with kafkacat.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kafka-healthcheck-0.0.1.tar.gz.
File metadata
- Download URL: kafka-healthcheck-0.0.1.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a3321b4d333fb1f01977ac7a092dd36330c87a9362ac1bec7aa10549a73541b
|
|
| MD5 |
40e9fd3f4ce4803ebe18a47b54efcb6b
|
|
| BLAKE2b-256 |
1989a01741bc3111cc8cc4956442999f7ab2839e3ef21e8cfbdf188930f36cf1
|
File details
Details for the file kafka_healthcheck-0.0.1-py3-none-any.whl.
File metadata
- Download URL: kafka_healthcheck-0.0.1-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e81882d339cee74d7c346f43153d018d8948d2e494edd7a662bc25edafa49c82
|
|
| MD5 |
7ebb7a57652adca669b89f7d9cda48d7
|
|
| BLAKE2b-256 |
da489fdb8b4745e7c1ebb59cf00ae8f11369b77d1603e97841e8af93d2ee15db
|