From f4ac28897dadadf976f862cb525726c30e4f49bc Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Tue, 27 Jun 2017 10:42:19 +0200 Subject: A monitoring-only pod uses 0m / ~32Mi resources --- test/monitoring-test.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 test/monitoring-test.yml (limited to 'test') diff --git a/test/monitoring-test.yml b/test/monitoring-test.yml new file mode 100644 index 0000000..4b5f230 --- /dev/null +++ b/test/monitoring-test.yml @@ -0,0 +1,35 @@ +# Sets up a pod that monitors itself, to test resource usage etc. +# kubectl exec test-metrics-... -- /bin/sh -c 'apk add --no-cache curl && curl http://localhost:5556/metrics' +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: monitoring-test + namespace: kafka +spec: + replicas: 1 + template: + metadata: + labels: + app: monitoring-test + # Uncomment to test with prometheus + #annotations: + # prometheus.io/scrape: "true" + # prometheus.io/port: "5556" + spec: + containers: + - name: monitor + image: solsson/kafka-prometheus-jmx-exporter@sha256:1f7c96c287a2dbec1d909cd8f96c0656310239b55a9a90d7fd12c81f384f1f7d + command: + - java + - -Dcom.sun.management.jmxremote.ssl=false + - -Dcom.sun.management.jmxremote.authenticate=false + - -Dcom.sun.management.jmxremote.port=5555 + - -jar + - jmx_prometheus_httpserver.jar + - "5556" + - example_configs/httpserver_sample_config.yml + ports: + - name: jmx + containerPort: 5555 + - name: slashmetrics + containerPort: 5556 -- cgit v1.2.3