File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,21 @@ spec:
10
10
metadata :
11
11
labels :
12
12
app : kafka
13
+ annotations :
14
+ prometheus.io/scrape : " true"
15
+ prometheus.io/port : " 5556"
13
16
spec :
14
17
terminationGracePeriodSeconds : 10
15
18
containers :
19
+ - name : metrics
20
+ image : solsson/kafka-prometheus-jmx-exporter@sha256:1f7c96c287a2dbec1d909cd8f96c0656310239b55a9a90d7fd12c81f384f1f7d
21
+ ports :
22
+ - containerPort : 5556
16
23
- name : broker
17
24
image : solsson/kafka:0.11.0.0-rc2@sha256:c1316e0131f4ec83bc645ca2141e4fda94e0d28f4fb5f836e15e37a5e054bdf1
25
+ env :
26
+ - name : JMX_PORT
27
+ value : " 5555"
18
28
ports :
19
29
- containerPort : 9092
20
30
command :
Original file line number Diff line number Diff line change @@ -78,3 +78,11 @@ Testing and retesting... delete the namespace. PVs are outside namespaces so del
78
78
kubectl delete namespace kafka
79
79
rm -R ./data/ && kubectl -n kafka delete pv datadir-kafka-0 datadir-kafka-1 datadir-kafka-2
80
80
```
81
+
82
+ ## Metrics, Prometheus style
83
+
84
+ Is the metrics system up and running?
85
+ ```
86
+ kubectl logs -c metrics kafka-0
87
+ kubectl exec -c broker kafka-0 -- /bin/sh -c 'apk add --no-cache curl && curl http://localhost:5556/metrics'
88
+ ```
You can’t perform that action at this time.
0 commit comments