blob: 9b2a05079fbf59d80766c6a4b90b8edffc55f050 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# Sets up a pod that monitors itself, to test resource usage etc.
# kubectl exec -n test-kafka jmx-selftest-... -- /bin/sh -c 'apk add --no-cache curl && curl http://localhost:5556/metrics'
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: jmx-selftest
namespace: test-kafka
spec:
replicas: 1
template:
metadata:
labels:
test-target: jmx-exporter
test-type: readiness
# 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
# Test run, again and again
readinessProbe:
httpGet:
path: /metrics
port: 5556
|