No project description provided
Project description
Kafka group lag aggregate monitor
This utility can currently
- Accept
kafka-consumer-groups
output like file from stdin and print aggregated output to stdout. - ssh to a remote machine with kafka running on it, run
kafka-consumer-groups
, for multiple groups, collect the output, group by group and topic and finally print average and max lag.
Currently Tested on: Python 3.11.3 and macos
Installation
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
Run
stdin-mode
Run the below to get a general idea of how the output would look like.
cat examples/example1.txt | python monitor.py stdin-mode
- Add option -v to get verbose output
- Try option --tablefmt psql to get tabular output just like psql. (Can try any format supported here)
remote-mode
python monitor.py remote-mode -v --remote ubuntu@127.0.0.1 -i ~/.ssh/key.pem --bootstrap-server 127.0.0.1:9000 --groups group1 group2
TODO
- Explore using tui which can monitor lag live by recording last n entries and calculating lag increase/decrease.
- Currently stdin-mode supports only one file? Look for ways to concat multiple outputs and aggregate?
Project details
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
Close
Hashes for kafka_lag_monitor-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49f4253efda736cdea0e40db8f5b756da9430c0d779bfbc6597963a76652a042 |
|
MD5 | c4f4b5e83b0395db3b2860882cb00a47 |
|
BLAKE2b-256 | 49e00f503b862b23cfd80d36375d6e23fa60c8b2caf39e671e852faf2d9394a7 |