Skip to content

Commit a80d283

Browse files
committed
Update README
1 parent 4e5d080 commit a80d283

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ deploy:
1919
script: ./gradlew jib
2020
skip_cleanup: true
2121
on:
22-
tags: false
22+
tags: true

README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,21 @@ Consumer lag calculated as follows:
1111
sum(topic_offset_per_partition-consumer_offset_per_partition)
1212

1313

14-
## Installation
15-
You can downland the latest release from [here](https://github.com/omarsmak/kafka-consumer-lag-monitoring/releases).This client requires at least Java 8 in order to run, soon it will be available as a Docker image.
14+
## Installation and Usage
15+
#### Uber JAR
16+
You can downland the latest release of the Uber JAR from [here](https://github.com/omarsmak/kafka-consumer-lag-monitoring/releases).This client requires at least Java 8 in order to run. You can run it like this for example:
17+
```
18+
java -jar kafka-consumer-lag-monitoring.jar -b kafka1:9092,kafka2:9092,kafka3:9092 -c "my_awesome_consumer_group_01" -m "console" -i 5000
19+
```
20+
21+
#### Docker
22+
This client is available as well in [docker hub](https://cloud.docker.com/u/omarsmak/repository/docker/omarsmak/kafka-consumer-lag-monitoring), the docker image is built on top of Java 11 JRE image and optimized to run in container orchestration frameworks
23+
such as kubernetes as efficient as possible. Assuming you want to run it locally and you have docker daemon installed, you can run it like this for example:
24+
```
25+
docker run -p 9000:9000 --rm omarsmak/kafka-consumer-lag-monitoring:latest -b kafka1:9092,kafka2:9092,kafka3:9092 -c "my_awesome_consumer_group_01" -m "prometheus" -i 5000 -p 9000
26+
```
27+
Please note the above command will run a docker container with exposed and mapped port of `9000`, in order to expose the HTTP server for prometheus metrics.
28+
However, if you change the client's HTTP port through the client's startup arguments (`--http.port`) as described below, you will need to change the docker port mapping accordingly to reflect your settings.
1629

1730
## Usage
1831
java -jar kafka-consumer-lag-monitoring.jar -h
@@ -29,7 +42,7 @@ You can downland the latest release from [here](https://github.com/omarsmak/kafk
2942
Interval delay in ms to that refreshes the client lag
3043
metrics, default to 2000ms
3144
-m, --mode=<clientMode> Mode to run client, possible values 'console' or
32-
'prometheus, default to 'console'
45+
'prometheus', default to 'console'
3346
-p, --http.port=<httpPort> Http port that is used to expose metrics in case
3447
prometheus mode is selected, default to 9000
3548
-V, --version Print version information and exit.

0 commit comments

Comments
 (0)