From adab2906fee4f6cb8efb9b49c151beefec35df5f Mon Sep 17 00:00:00 2001 From: John Awogboro Date: Fri, 9 Aug 2024 12:42:27 +0100 Subject: [PATCH 1/2] fix: updated dashboard templates/queries with correct prometheus metric names Signed-off-by: John Awogboro > --- .../ClickHouseKeeper_dashboard.json | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/grafana-dashboard/ClickHouseKeeper_dashboard.json b/grafana-dashboard/ClickHouseKeeper_dashboard.json index 292828adc..234fb091e 100644 --- a/grafana-dashboard/ClickHouseKeeper_dashboard.json +++ b/grafana-dashboard/ClickHouseKeeper_dashboard.json @@ -106,15 +106,15 @@ "steppedLine": false, "targets": [ { - "expr": "zk_avg_latency{namespace=~\"$namespace\", pod_name=~\"$pod_name\", container_name=\"clickhouse-keeper\"}", + "expr": "ClickHouseAsyncMetrics_KeeperAvgLatency{namespace=~\"$namespace\", pod=~\"$pod_name\", container=\"clickhouse-keeper\"}", "interval": "", - "legendFormat": "avg {{namespace}}.{{pod_name}}", + "legendFormat": "avg {{namespace}}.{{pod}}", "refId": "A" }, { - "expr": "zk_max_latency{namespace=~\"$namespace\", pod_name=~\"$pod_name\", container_name=\"clickhouse-keeper\"}", + "expr": "ClickHouseAsyncMetrics_KeeperMaxLatency{namespace=~\"$namespace\", pod=~\"$pod_name\", container=\"clickhouse-keeper\"}", "interval": "", - "legendFormat": "max {{namespace}}.{{pod_name}}", + "legendFormat": "max {{namespace}}.{{pod}}", "refId": "B" } ], @@ -206,10 +206,10 @@ "steppedLine": false, "targets": [ { - "expr": "zk_num_alive_connections{namespace=~\"$namespace\", pod_name=~\"$pod_name\", container_name=\"clickhouse-keeper\"}", + "expr": "ClickHouseMetrics_KeeperAliveConnections{namespace=~\"$namespace\", pod=~\"$pod_name\", container=\"clickhouse-keeper\"}", "hide": false, "interval": "", - "legendFormat": "{{namespace}}.{{pod_name}}", + "legendFormat": "{{namespace}}.{{pod}}", "refId": "A" } ], @@ -301,16 +301,16 @@ "steppedLine": false, "targets": [ { - "expr": "irate(zk_packets_sent{namespace=~\"$namespace\", pod_name=~\"$pod_name\", container_name=\"clickhouse-keeper\"}[1m])", + "expr": "irate(ClickHouseAsyncMetrics_KeeperPacketsSent{namespace=~\"$namespace\", pod=~\"$pod_name\", container=\"clickhouse-keeper\"}[1m])", "hide": false, "interval": "", - "legendFormat": "OUT {{namespace}}.{{pod_name}}", + "legendFormat": "OUT {{namespace}}.{{pod}}", "refId": "A" }, { - "expr": "-irate(zk_packets_received{namespace=~\"$namespace\", pod_name=~\"$pod_name\", container_name=\"clickhouse-keeper\"}[1m])", + "expr": "-irate(ClickHouseAsyncMetrics_KeeperPacketsReceived{namespace=~\"$namespace\", pod=~\"$pod_name\", container=\"clickhouse-keeper\"}[1m])", "interval": "", - "legendFormat": "IN {{namespace}}.{{pod_name}}", + "legendFormat": "IN {{namespace}}.{{pod}}", "refId": "B" } ], @@ -402,9 +402,9 @@ "steppedLine": false, "targets": [ { - "expr": "zk_znode_count{namespace=~\"$namespace\", pod_name=~\"$pod_name\", container_name=\"clickhouse-keeper\"}", + "expr": "ClickHouseAsyncMetrics_KeeperZnodeCount{namespace=~\"$namespace\", pod=~\"$pod_name\", container=\"clickhouse-keeper\"}", "interval": "", - "legendFormat": "{{namespace}}.{{pod_name}}", + "legendFormat": "{{namespace}}.{{pod}}", "refId": "A" } ], @@ -496,9 +496,9 @@ "steppedLine": false, "targets": [ { - "expr": "zk_watch_count{namespace=~\"$namespace\", pod_name=~\"$pod_name\", container_name=\"clickhouse-keeper\"}", + "expr": "ClickHouseAsyncMetrics_KeeperWatchCount{namespace=~\"$namespace\", pod=~\"$pod_name\", container=\"clickhouse-keeper\"}", "interval": "", - "legendFormat": "{{namespace}}.{{pod_name}}", + "legendFormat": "{{namespace}}.{{pod}}", "refId": "A" } ], @@ -590,9 +590,9 @@ "steppedLine": false, "targets": [ { - "expr": "zk_ephemerals_count{namespace=~\"$namespace\", pod_name=~\"$pod_name\", container_name=\"clickhouse-keeper\"}", + "expr": "ClickHouseAsyncMetrics_KeeperEphemeralsCount{namespace=~\"$namespace\", pod=~\"$pod_name\", container=\"clickhouse-keeper\"}", "interval": "", - "legendFormat": "{{namespace}}.{{pod_name}}", + "legendFormat": "{{namespace}}.{{pod}}", "refId": "A" } ], @@ -684,9 +684,9 @@ "steppedLine": false, "targets": [ { - "expr": "zk_approximate_data_size{namespace=~\"$namespace\", pod_name=~\"$pod_name\", container_name=\"clickhouse-keeper\"}", + "expr": "ClickHouseAsyncMetrics_KeeperApproximateDataSize{namespace=~\"$namespace\", pod=~\"$pod_name\", container=\"clickhouse-keeper\"}", "interval": "", - "legendFormat": "{{namespace}}.{{pod_name}}", + "legendFormat": "{{namespace}}.{{pod}}", "refId": "A" } ], @@ -784,9 +784,9 @@ "steppedLine": false, "targets": [ { - "expr": "irate(zk_outstanding_requests{namespace=~\"$namespace\", pod_name=~\"$pod_name\", container_name=\"clickhouse-keeper\"}[1m])", + "expr": "irate(ClickHouseMetrics_KeeperOutstandingRequests{namespace=~\"$namespace\", pod=~\"$pod_name\", container=\"clickhouse-keeper\"}[1m])", "interval": "", - "legendFormat": "{{namespace}}.{{pod_name}}", + "legendFormat": "{{namespace}}.{{pod}}", "refId": "A" } ], @@ -878,9 +878,9 @@ "steppedLine": false, "targets": [ { - "expr": "zk_open_file_descriptor_count{namespace=~\"$namespace\", pod_name=~\"$pod_name\", container_name=\"clickhouse-keeper\"}", + "expr": "ClickHouseAsyncMetrics_KeeperOpenFileDescriptorCount{namespace=~\"$namespace\", pod=~\"$pod_name\", container=\"clickhouse-keeper\"}", "interval": "", - "legendFormat": "{{namespace}}.{{pod_name}}", + "legendFormat": "{{namespace}}.{{pod}}", "refId": "A" } ], @@ -941,14 +941,14 @@ "allValue": ".+", "current": {}, "datasource": "${DS_PROMETHEUS}", - "definition": "label_values(zk_ruok, namespace)", + "definition": "label_values(ClickHouseAsyncMetrics_KeeperPacketsSent,namespace)", "hide": 0, "includeAll": true, "label": null, "multi": true, "name": "namespace", "options": [], - "query": "label_values(zk_ruok, namespace)", + "query": "label_values(ClickHouseAsyncMetrics_KeeperPacketsSent,namespace)", "refresh": 2, "regex": "", "skipUrlSync": false, @@ -963,14 +963,14 @@ "allValue": ".+", "current": {}, "datasource": "${DS_PROMETHEUS}", - "definition": "label_values(zk_ruok, pod_name)", + "definition": "label_values(ClickHouseAsyncMetrics_KeeperPacketsReceived,pod)", "hide": 0, "includeAll": true, "label": null, "multi": true, "name": "pod_name", "options": [], - "query": "label_values(zk_ruok, pod_name)", + "query": "label_values(ClickHouseAsyncMetrics_KeeperPacketsReceived,pod)", "refresh": 2, "regex": "", "skipUrlSync": false, @@ -1004,4 +1004,4 @@ "title": "ClickHouseKeeper Dashboard", "uid": "clickhouse-keeper", "version": 20220214 -} \ No newline at end of file +} From 9f034f22e24421e19b79b3c22f83432cf3b9fa22 Mon Sep 17 00:00:00 2001 From: John Awogboro Date: Fri, 9 Aug 2024 19:59:51 +0100 Subject: [PATCH 2/2] fix: restore old label names, update templating queries Signed-off-by: John Awogboro --- .../ClickHouseKeeper_dashboard.json | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/grafana-dashboard/ClickHouseKeeper_dashboard.json b/grafana-dashboard/ClickHouseKeeper_dashboard.json index 234fb091e..c02ab0e38 100644 --- a/grafana-dashboard/ClickHouseKeeper_dashboard.json +++ b/grafana-dashboard/ClickHouseKeeper_dashboard.json @@ -106,15 +106,15 @@ "steppedLine": false, "targets": [ { - "expr": "ClickHouseAsyncMetrics_KeeperAvgLatency{namespace=~\"$namespace\", pod=~\"$pod_name\", container=\"clickhouse-keeper\"}", + "expr": "ClickHouseAsyncMetrics_KeeperAvgLatency{namespace=~\"$namespace\", pod_name=~\"$pod_name\", container_name=\"clickhouse-keeper\"}", "interval": "", - "legendFormat": "avg {{namespace}}.{{pod}}", + "legendFormat": "avg {{namespace}}.{{pod_name}}", "refId": "A" }, { - "expr": "ClickHouseAsyncMetrics_KeeperMaxLatency{namespace=~\"$namespace\", pod=~\"$pod_name\", container=\"clickhouse-keeper\"}", + "expr": "ClickHouseAsyncMetrics_KeeperMaxLatency{namespace=~\"$namespace\", pod_name=~\"$pod_name\", container_name=\"clickhouse-keeper\"}", "interval": "", - "legendFormat": "max {{namespace}}.{{pod}}", + "legendFormat": "max {{namespace}}.{{pod_name}}", "refId": "B" } ], @@ -206,10 +206,10 @@ "steppedLine": false, "targets": [ { - "expr": "ClickHouseMetrics_KeeperAliveConnections{namespace=~\"$namespace\", pod=~\"$pod_name\", container=\"clickhouse-keeper\"}", + "expr": "ClickHouseMetrics_KeeperAliveConnections{namespace=~\"$namespace\", pod_name=~\"$pod_name\", container_name=\"clickhouse-keeper\"}", "hide": false, "interval": "", - "legendFormat": "{{namespace}}.{{pod}}", + "legendFormat": "{{namespace}}.{{pod_name}}", "refId": "A" } ], @@ -301,16 +301,16 @@ "steppedLine": false, "targets": [ { - "expr": "irate(ClickHouseAsyncMetrics_KeeperPacketsSent{namespace=~\"$namespace\", pod=~\"$pod_name\", container=\"clickhouse-keeper\"}[1m])", + "expr": "irate(ClickHouseAsyncMetrics_KeeperPacketsSent{namespace=~\"$namespace\", pod_name=~\"$pod_name\", container_name=\"clickhouse-keeper\"}[1m])", "hide": false, "interval": "", - "legendFormat": "OUT {{namespace}}.{{pod}}", + "legendFormat": "OUT {{namespace}}.{{pod_name}}", "refId": "A" }, { - "expr": "-irate(ClickHouseAsyncMetrics_KeeperPacketsReceived{namespace=~\"$namespace\", pod=~\"$pod_name\", container=\"clickhouse-keeper\"}[1m])", + "expr": "-irate(ClickHouseAsyncMetrics_KeeperPacketsReceived{namespace=~\"$namespace\", pod_name=~\"$pod_name\", container_name=\"clickhouse-keeper\"}[1m])", "interval": "", - "legendFormat": "IN {{namespace}}.{{pod}}", + "legendFormat": "IN {{namespace}}.{{pod_name}}", "refId": "B" } ], @@ -402,9 +402,9 @@ "steppedLine": false, "targets": [ { - "expr": "ClickHouseAsyncMetrics_KeeperZnodeCount{namespace=~\"$namespace\", pod=~\"$pod_name\", container=\"clickhouse-keeper\"}", + "expr": "ClickHouseAsyncMetrics_KeeperZnodeCount{namespace=~\"$namespace\", pod_name=~\"$pod_name\", container_name=\"clickhouse-keeper\"}", "interval": "", - "legendFormat": "{{namespace}}.{{pod}}", + "legendFormat": "{{namespace}}.{{pod_name}}", "refId": "A" } ], @@ -496,9 +496,9 @@ "steppedLine": false, "targets": [ { - "expr": "ClickHouseAsyncMetrics_KeeperWatchCount{namespace=~\"$namespace\", pod=~\"$pod_name\", container=\"clickhouse-keeper\"}", + "expr": "ClickHouseAsyncMetrics_KeeperWatchCount{namespace=~\"$namespace\", pod_name=~\"$pod_name\", container_name=\"clickhouse-keeper\"}", "interval": "", - "legendFormat": "{{namespace}}.{{pod}}", + "legendFormat": "{{namespace}}.{{pod_name}}", "refId": "A" } ], @@ -590,9 +590,9 @@ "steppedLine": false, "targets": [ { - "expr": "ClickHouseAsyncMetrics_KeeperEphemeralsCount{namespace=~\"$namespace\", pod=~\"$pod_name\", container=\"clickhouse-keeper\"}", + "expr": "ClickHouseAsyncMetrics_KeeperEphemeralsCount{namespace=~\"$namespace\", pod_name=~\"$pod_name\", container_name=\"clickhouse-keeper\"}", "interval": "", - "legendFormat": "{{namespace}}.{{pod}}", + "legendFormat": "{{namespace}}.{{pod_name}}", "refId": "A" } ], @@ -684,9 +684,9 @@ "steppedLine": false, "targets": [ { - "expr": "ClickHouseAsyncMetrics_KeeperApproximateDataSize{namespace=~\"$namespace\", pod=~\"$pod_name\", container=\"clickhouse-keeper\"}", + "expr": "ClickHouseAsyncMetrics_KeeperApproximateDataSize{namespace=~\"$namespace\", pod_name=~\"$pod_name\", container_name=\"clickhouse-keeper\"}", "interval": "", - "legendFormat": "{{namespace}}.{{pod}}", + "legendFormat": "{{namespace}}.{{pod_name}}", "refId": "A" } ], @@ -784,9 +784,9 @@ "steppedLine": false, "targets": [ { - "expr": "irate(ClickHouseMetrics_KeeperOutstandingRequests{namespace=~\"$namespace\", pod=~\"$pod_name\", container=\"clickhouse-keeper\"}[1m])", + "expr": "irate(ClickHouseMetrics_KeeperOutstandingRequests{namespace=~\"$namespace\", pod_name=~\"$pod_name\", container_name=\"clickhouse-keeper\"}[1m])", "interval": "", - "legendFormat": "{{namespace}}.{{pod}}", + "legendFormat": "{{namespace}}.{{pod_name}}", "refId": "A" } ], @@ -878,9 +878,9 @@ "steppedLine": false, "targets": [ { - "expr": "ClickHouseAsyncMetrics_KeeperOpenFileDescriptorCount{namespace=~\"$namespace\", pod=~\"$pod_name\", container=\"clickhouse-keeper\"}", + "expr": "ClickHouseAsyncMetrics_KeeperOpenFileDescriptorCount{namespace=~\"$namespace\", pod_name=~\"$pod_name\", container_name=\"clickhouse-keeper\"}", "interval": "", - "legendFormat": "{{namespace}}.{{pod}}", + "legendFormat": "{{namespace}}.{{pod_name}}", "refId": "A" } ], @@ -941,14 +941,14 @@ "allValue": ".+", "current": {}, "datasource": "${DS_PROMETHEUS}", - "definition": "label_values(ClickHouseAsyncMetrics_KeeperPacketsSent,namespace)", + "definition": "label_values(up{container_name=\"clickhouse-keeper\"},namespace}", "hide": 0, "includeAll": true, "label": null, "multi": true, "name": "namespace", "options": [], - "query": "label_values(ClickHouseAsyncMetrics_KeeperPacketsSent,namespace)", + "query": "label_values(up{container_name=\"clickhouse-keeper\"},namespace}", "refresh": 2, "regex": "", "skipUrlSync": false, @@ -963,14 +963,14 @@ "allValue": ".+", "current": {}, "datasource": "${DS_PROMETHEUS}", - "definition": "label_values(ClickHouseAsyncMetrics_KeeperPacketsReceived,pod)", + "definition": "label_values(up{container_name=\"clickhouse-keeper\"},pod_name}", "hide": 0, "includeAll": true, "label": null, "multi": true, "name": "pod_name", "options": [], - "query": "label_values(ClickHouseAsyncMetrics_KeeperPacketsReceived,pod)", + "query": "label_values(up{container_name=\"clickhouse-keeper\"},pod_name}", "refresh": 2, "regex": "", "skipUrlSync": false,