From 09949508f3754a8e4605623ab8a98e9a4c1b6863 Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Tue, 8 Aug 2017 13:57:29 +0200 Subject: [PATCH 1/4] Gets you JVM metrics from zoo, lots and lots of it --- zookeeper/10zookeeper-config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/zookeeper/10zookeeper-config.yml b/zookeeper/10zookeeper-config.yml index c9b7a6f3..82ce63fd 100644 --- a/zookeeper/10zookeeper-config.yml +++ b/zookeeper/10zookeeper-config.yml @@ -54,3 +54,4 @@ data: labels: replicaId: "$2" memberType: "$3" + - pattern : java.lang From e35d0773fcd485311751d10ccfe78811203a6e3a Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Tue, 8 Aug 2017 14:16:24 +0200 Subject: [PATCH 2/4] Still not getting anything zookeeper-specific --- zookeeper/10zookeeper-config.yml | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/zookeeper/10zookeeper-config.yml b/zookeeper/10zookeeper-config.yml index 82ce63fd..40abf623 100644 --- a/zookeeper/10zookeeper-config.yml +++ b/zookeeper/10zookeeper-config.yml @@ -38,20 +38,5 @@ data: jmx-zookeeper-prometheus.yaml: |+ rules: - - pattern: "org.apache.ZooKeeperService<>(\\w+)" - name: "zookeeper_$2" - - pattern: "org.apache.ZooKeeperService<>(\\w+)" - name: "zookeeper_$3" - labels: - replicaId: "$2" - - pattern: "org.apache.ZooKeeperService<>(\\w+)" - name: "zookeeper_$4" - labels: - replicaId: "$2" - memberType: "$3" - - pattern: "org.apache.ZooKeeperService<>(\\w+)" - name: "zookeeper_$4_$5" - labels: - replicaId: "$2" - memberType: "$3" + - pattern : org.apache.ZooKeeperService - pattern : java.lang From 42d1b1ae3b8a6d78437be92527fec844700d403c Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Tue, 8 Aug 2017 15:37:53 +0200 Subject: [PATCH 3/4] Adds directives from kafka's rules, now for pzoo too. But before this, how did the metrics container know which port to connect to? --- zookeeper/10zookeeper-config.yml | 2 ++ zookeeper/50pzoo.yml | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/zookeeper/10zookeeper-config.yml b/zookeeper/10zookeeper-config.yml index 40abf623..6bdffe59 100644 --- a/zookeeper/10zookeeper-config.yml +++ b/zookeeper/10zookeeper-config.yml @@ -37,6 +37,8 @@ data: log4j.logger.org.apache.zookeeper.server.NIOServerCnxn=WARN jmx-zookeeper-prometheus.yaml: |+ + lowercaseOutputName: true + jmxUrl: service:jmx:rmi:///jndi/rmi://localhost:5555/jmxrmi rules: - pattern : org.apache.ZooKeeperService - pattern : java.lang diff --git a/zookeeper/50pzoo.yml b/zookeeper/50pzoo.yml index 70d7c0ee..6ac35ba1 100644 --- a/zookeeper/50pzoo.yml +++ b/zookeeper/50pzoo.yml @@ -67,7 +67,7 @@ spec: - -jar - jmx_prometheus_httpserver.jar - "5556" - - example_configs/zookeeper.yaml + - /etc/kafka/jmx-zookeeper-prometheus.yaml ports: - containerPort: 5556 resources: @@ -76,6 +76,9 @@ spec: memory: 100Mi limits: memory: 150Mi + volumeMounts: + - name: config + mountPath: /etc/kafka volumes: - name: config configMap: From 253633f05318833d134ef5484063bba76d76579d Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Fri, 3 Nov 2017 13:59:26 +0100 Subject: [PATCH 4/4] Zookeeper metrics conf contributed by @yacut #61 --- zookeeper/10zookeeper-config.yml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/zookeeper/10zookeeper-config.yml b/zookeeper/10zookeeper-config.yml index 6bdffe59..eeba1e00 100644 --- a/zookeeper/10zookeeper-config.yml +++ b/zookeeper/10zookeeper-config.yml @@ -39,6 +39,25 @@ data: jmx-zookeeper-prometheus.yaml: |+ lowercaseOutputName: true jmxUrl: service:jmx:rmi:///jndi/rmi://localhost:5555/jmxrmi + ssl: false + whitelistObjectNames: ["org.apache.ZooKeeperService:*","java.lang:*"] rules: - - pattern : org.apache.ZooKeeperService - - pattern : java.lang + - pattern: "org.apache.ZooKeeperService<>(\\w+)" + name: "zookeeper_$2" + - pattern: "org.apache.ZooKeeperService<>(\\w+)" + name: "zookeeper_$3" + labels: + replicaId: "$2" + - pattern: "org.apache.ZooKeeperService<>(\\w+)" + name: "zookeeper_$4" + labels: + replicaId: "$2" + memberType: "$3" + - pattern: "org.apache.ZooKeeperService<>(\\w+)" + name: "zookeeper_$4_$5" + labels: + replicaId: "$2" + memberType: "$3" + - pattern : java.lang<>SystemCpuLoad + - pattern : java.langused + - pattern : java.lang<>FreePhysicalMemorySize