Document project
This commit is contained in:
45
README.md
45
README.md
@@ -1,18 +1,41 @@
|
||||
# KafkaexLagExporter
|
||||
|
||||
To start your Phoenix server:
|
||||
This project will collect Kafka consumer lag and provide them via Prometheus.
|
||||
|
||||
* Install dependencies with `mix deps.get`
|
||||
* Start Phoenix endpoint with `mix phx.server` or inside IEx with `iex -S mix phx.server`
|
||||
## Start
|
||||
|
||||
Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.
|
||||
```bash
|
||||
docker run -ti --net="host" -e KAFKA_BROKERS=localhost:9093,localhost:9094,localhost:9095 lechindianer/kafkaex_lag_exporter:0.1
|
||||
```
|
||||
|
||||
Ready to run in production? Please [check our deployment guides](https://hexdocs.pm/phoenix/deployment.html).
|
||||
Now you can check the exposed metrics at [localhost:4000](localhost:4000).
|
||||
|
||||
## Learn more
|
||||
## Developing
|
||||
|
||||
* Official website: https://www.phoenixframework.org/
|
||||
* Guides: https://hexdocs.pm/phoenix/overview.html
|
||||
* Docs: https://hexdocs.pm/phoenix
|
||||
* Forum: https://elixirforum.com/c/phoenix-forum
|
||||
* Source: https://github.com/phoenixframework/phoenix
|
||||
To start the project locally:
|
||||
|
||||
```bash
|
||||
KAFKA_BROKERS="localhost:9092" iex -S mix
|
||||
```
|
||||
|
||||
There is also a docker-compose file included which will start Kafka, serve Kowl (Web UI for Kafka) and start
|
||||
KafkaexLagExporter:
|
||||
|
||||
```bash
|
||||
docker-compose up --build
|
||||
```
|
||||
|
||||
Kowl is served at [localhost:8080](localhost:8080).
|
||||
|
||||
### Tests
|
||||
|
||||
```bash
|
||||
MIX_ENV=test mix test --no-test
|
||||
|
||||
# Don't forget to check credo for code violations:
|
||||
mix credo
|
||||
```
|
||||
|
||||
## Links
|
||||
|
||||
Source is on [Gitlab](https://gitlab.com/lechindianer/kafkaex-lag-exporter).
|
||||
|
||||
Reference in New Issue
Block a user