https://github.com/jcaesar/light-kafka-exporter
https://github.com/jcaesar/light-kafka-exporter
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jcaesar/light-kafka-exporter
- Owner: jcaesar
- Created: 2021-10-14T07:06:08.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-11-14T06:26:09.000Z (about 4 years ago)
- Last Synced: 2025-02-09T12:43:07.669Z (12 months ago)
- Language: Rust
- Size: 19.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Light Kafka exporter
Quick CLI util and Prometheus exporter for checking your Kafka:
The number of records that should be flowing, are they actually flowing?
## The non-quick way
The proper way of going on about this is to
* Get the [prometheus/jmx_exporter](https://github.com/prometheus/jmx_exporter)
* Acquire a `jmx_exporter` configuration file from somewhere
* the ["official"](https://github.com/prometheus/jmx_exporter/blob/master/example_configs/kafka-2_0_0.yml) one doesn't work that well
* Pass the `jmx_exporter` as a `-javaagent` via `KAFKA_JMX_OPTS` to `kafka-server-start.sh`
* Target prometheus to scrape the agent
* Hope that you can now query badly named metrics like `kafka_…_brokertopicmetrics_messagesinpersec` (Which is not `per sec`. You need to `irate` it.)
Need to know right now? Have fun restarting your brokers.
## The quick way
This repeatedly queries the high watermarks of all topics via Kafka's normal listening ports and calculates a flow rate.
Clone and run as
```
cargo run -- -b localhost:9092
```
If you're looking for prettier output, try [totop](https://github.com/jcaesar/totop).