forked from tarvip/kafkakit-prometheus-metricsfetcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add dockerfile and running instructions
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM golang:1.13.15-alpine3.12 AS build | ||
WORKDIR /app | ||
# COPY go.mod go.sum . | ||
# ^^ add go.sum when you will need modules | ||
COPY go.mod . | ||
RUN go mod download | ||
COPY . . | ||
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o ./out/app . | ||
|
||
FROM gcr.io/distroless/static-debian10 | ||
COPY --from=build /app/out/app /usr/local/bin/app | ||
ENTRYPOINT ["/usr/local/bin/app"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
docker run kafka-metrics:latest \ | ||
--prometheus-url http://10.130.0.35:9090 \ | ||
--partition-size-query 'max(kafka_log_log_size{kafka_cluster="kafka-mailings-dm-stable"}) by (topic,partition)' \ | ||
--broker-storage-query 'node_filesystem_avail_bytes{node_group="kafka-mailings-dm-stable", mountpoint=~"/var/lib/kafka.*"}' \ | ||
--broker-id-label instance \ | ||
--broker-id-map "kafka-mailings-dm-stable-a-1-v1=1,kafka-mailings-dm-stable-a-2-v1=4,kafka-mailings-dm-stable-b-1-v1=2,kafka-mailings-dm-stable-b-2-v1=5,kafka-mailings-dm-stable-c-1-v1=3,kafka-mailings-dm-stable-c-2-v1=6" \ | ||
--zk-addr 10.145.0.214:2181 \ | ||
--prometheus-query-timeout 300s |