diff options
author | Staffan Olsson <staffan@repos.se> | 2017-06-25 21:47:43 +0200 |
---|---|---|
committer | Staffan Olsson <staffan@repos.se> | 2017-06-25 21:49:34 +0200 |
commit | 26173af8577d3c11904196a04ca0b158f339bd64 (patch) | |
tree | fbc23b19a6b8cd2f3fabb0ab5d5d7233495bdaa7 | |
parent | a8c8a39713cbe5ae6199f0733454ae05cfd4eb20 (diff) | |
download | kubernetes-kafka-26173af8577d3c11904196a04ca0b158f339bd64.tar.gz kubernetes-kafka-26173af8577d3c11904196a04ca0b158f339bd64.tar.bz2 kubernetes-kafka-26173af8577d3c11904196a04ca0b158f339bd64.zip |
Enables metrics export to Prometheus, but they look very uninteresting.
The selected config is from the jmx_exporter examples.
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | zookeeper/50zoo.yml | 16 |
2 files changed, 18 insertions, 0 deletions
@@ -86,4 +86,6 @@ Is the metrics system up and running? ``` kubectl logs -c metrics kafka-0 kubectl exec -c broker kafka-0 -- /bin/sh -c 'apk add --no-cache curl && curl http://localhost:5556/metrics' +kubectl logs -c metrics zoo-0 +kubectl exec -c zookeeper zoo-0 -- /bin/sh -c 'apk add --no-cache curl && curl http://localhost:5556/metrics' ``` diff --git a/zookeeper/50zoo.yml b/zookeeper/50zoo.yml index 9251ce1..12d9c44 100644 --- a/zookeeper/50zoo.yml +++ b/zookeeper/50zoo.yml @@ -10,11 +10,27 @@ spec: metadata: labels: app: zookeeper + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "5556" spec: terminationGracePeriodSeconds: 10 containers: + - name: metrics + image: solsson/kafka-prometheus-jmx-exporter@sha256:1f7c96c287a2dbec1d909cd8f96c0656310239b55a9a90d7fd12c81f384f1f7d + command: + - "java" + - "-jar" + - "jmx_prometheus_httpserver.jar" + - "5556" + - example_configs/zookeeper.yaml + ports: + - containerPort: 5556 - name: zookeeper image: solsson/kafka:0.11.0.0-rc2@sha256:c1316e0131f4ec83bc645ca2141e4fda94e0d28f4fb5f836e15e37a5e054bdf1 + env: + - name: JMX_PORT + value: "5555" command: - sh - -c |