Skip to content

Commit 26173af

Browse files
committed
Enables metrics export to Prometheus, but they look very uninteresting.
The selected config is from the jmx_exporter examples.
1 parent a8c8a39 commit 26173af

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,6 @@ Is the metrics system up and running?
8686
```
8787
kubectl logs -c metrics kafka-0
8888
kubectl exec -c broker kafka-0 -- /bin/sh -c 'apk add --no-cache curl && curl http://localhost:5556/metrics'
89+
kubectl logs -c metrics zoo-0
90+
kubectl exec -c zookeeper zoo-0 -- /bin/sh -c 'apk add --no-cache curl && curl http://localhost:5556/metrics'
8991
```

zookeeper/50zoo.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,27 @@ spec:
1010
metadata:
1111
labels:
1212
app: zookeeper
13+
annotations:
14+
prometheus.io/scrape: "true"
15+
prometheus.io/port: "5556"
1316
spec:
1417
terminationGracePeriodSeconds: 10
1518
containers:
19+
- name: metrics
20+
image: solsson/kafka-prometheus-jmx-exporter@sha256:1f7c96c287a2dbec1d909cd8f96c0656310239b55a9a90d7fd12c81f384f1f7d
21+
command:
22+
- "java"
23+
- "-jar"
24+
- "jmx_prometheus_httpserver.jar"
25+
- "5556"
26+
- example_configs/zookeeper.yaml
27+
ports:
28+
- containerPort: 5556
1629
- name: zookeeper
1730
image: solsson/kafka:0.11.0.0-rc2@sha256:c1316e0131f4ec83bc645ca2141e4fda94e0d28f4fb5f836e15e37a5e054bdf1
31+
env:
32+
- name: JMX_PORT
33+
value: "5555"
1834
command:
1935
- sh
2036
- -c

0 commit comments

Comments
 (0)