From 698db95c4258bfb296527009bc9096d57d92417c Mon Sep 17 00:00:00 2001
From: Simon Ehrenstein <simon.ehrenstein@gmail.com>
Date: Thu, 17 Feb 2022 19:02:01 +0100
Subject: [PATCH] Make Grafana dashboard more generic

---
 helm/templates/grafana/dashboard-config-map.yaml | 4 ++--
 helm/templates/strimzi/kafka-cluster.yaml        | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/helm/templates/grafana/dashboard-config-map.yaml b/helm/templates/grafana/dashboard-config-map.yaml
index ace873e80..ea4603918 100644
--- a/helm/templates/grafana/dashboard-config-map.yaml
+++ b/helm/templates/grafana/dashboard-config-map.yaml
@@ -71,7 +71,7 @@ data:
         "steppedLine": false,
         "targets": [
           {
-            "expr": "sum(kafka_server_brokertopicmetrics_messagesin_total{topic='input'})",
+            "expr": "sum by (topic) (rate(kafka_server_brokertopicmetrics_messagesin_total[60s]))",
             "format": "time_series",
             "intervalFactor": 1,
             "legendFormat": "{{Messages In Per Second}}",
@@ -344,7 +344,7 @@ data:
         "steppedLine": false,
         "targets": [
           {
-            "expr": "count(count (kafka_consumer_consumer_fetch_manager_metrics_records_lag) by(pod))",
+            "expr": "sum by(consumergroup) (kafka_consumergroup_members >= 0)",
             "format": "time_series",
             "intervalFactor": 1,
             "legendFormat": "instances",
diff --git a/helm/templates/strimzi/kafka-cluster.yaml b/helm/templates/strimzi/kafka-cluster.yaml
index b56033cc8..29356d391 100644
--- a/helm/templates/strimzi/kafka-cluster.yaml
+++ b/helm/templates/strimzi/kafka-cluster.yaml
@@ -4,6 +4,7 @@ metadata:
   name: theodolite-strimzi
 spec:
   kafka:
+    jmxOptions: {}
     listeners:
       - name: plain
         port: 9092
-- 
GitLab