Skip to content

Commit f752b05

Browse files
committed
Uses JMX config from config map, so we can experiment
1 parent d7784d0 commit f752b05

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

zookeeper/10zookeeper-config.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,22 @@ data:
3535
# Suppress connection log messages, three lines per livenessProbe execution
3636
log4j.logger.org.apache.zookeeper.server.NIOServerCnxnFactory=WARN
3737
log4j.logger.org.apache.zookeeper.server.NIOServerCnxn=WARN
38+
39+
jmx-zookeeper-prometheus.yaml: |+
40+
rules:
41+
- pattern: "org.apache.ZooKeeperService<name0=ReplicatedServer_id(\\d)><>(\\w+)"
42+
name: "zookeeper_$2"
43+
- pattern: "org.apache.ZooKeeperService<name0=ReplicatedServer_id(\\d), name1=replica.(\\d)><>(\\w+)"
44+
name: "zookeeper_$3"
45+
labels:
46+
replicaId: "$2"
47+
- pattern: "org.apache.ZooKeeperService<name0=ReplicatedServer_id(\\d), name1=replica.(\\d), name2=(\\w+)><>(\\w+)"
48+
name: "zookeeper_$4"
49+
labels:
50+
replicaId: "$2"
51+
memberType: "$3"
52+
- pattern: "org.apache.ZooKeeperService<name0=ReplicatedServer_id(\\d), name1=replica.(\\d), name2=(\\w+), name3=(\\w+)><>(\\w+)"
53+
name: "zookeeper_$4_$5"
54+
labels:
55+
replicaId: "$2"
56+
memberType: "$3"

zookeeper/51zoo.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ spec:
7676
- -jar
7777
- jmx_prometheus_httpserver.jar
7878
- "5556"
79-
- example_configs/zookeeper.yaml
79+
- /etc/kafka/jmx-zookeeper-prometheus.yaml
8080
ports:
8181
- containerPort: 5556
8282
resources:
@@ -85,6 +85,9 @@ spec:
8585
memory: 100Mi
8686
limits:
8787
memory: 150Mi
88+
volumeMounts:
89+
- name: config
90+
mountPath: /etc/kafka
8891
volumes:
8992
- name: config
9093
configMap:

0 commit comments

Comments
 (0)