From 57ba61256ce7568a52d4e5c266b5914f28462cd7 Mon Sep 17 00:00:00 2001 From: Erich Blume Date: Sun, 18 Jan 2026 12:05:09 -0800 Subject: [PATCH] Fix zot dashboard: correct latency metric, replace memory with storage - Use zot_http_method_latency_seconds_bucket (not zot_http_request_duration_*) - Replace Memory Usage stat with Total Storage - Replace Memory Over Time with Storage by Repository Co-Authored-By: Claude Opus 4.5 --- .../roles/grafana/files/dashboards/zot.json | 28 ++++++------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/ansible/roles/grafana/files/dashboards/zot.json b/ansible/roles/grafana/files/dashboards/zot.json index dab1876..41c99a8 100644 --- a/ansible/roles/grafana/files/dashboards/zot.json +++ b/ansible/roles/grafana/files/dashboards/zot.json @@ -153,11 +153,11 @@ "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "process_resident_memory_bytes{job=\"prometheus.scrape.zot\"}", + "expr": "sum(zot_repo_storage_bytes)", "refId": "A" } ], - "title": "Memory Usage", + "title": "Total Storage", "type": "stat" }, { @@ -385,19 +385,19 @@ "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "histogram_quantile(0.50, sum(rate(zot_http_request_duration_seconds_bucket{job=\"prometheus.scrape.zot\"}[5m])) by (le))", + "expr": "histogram_quantile(0.50, sum(rate(zot_http_method_latency_seconds_bucket{job=\"prometheus.scrape.zot\"}[5m])) by (le))", "legendFormat": "p50", "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "histogram_quantile(0.95, sum(rate(zot_http_request_duration_seconds_bucket{job=\"prometheus.scrape.zot\"}[5m])) by (le))", + "expr": "histogram_quantile(0.95, sum(rate(zot_http_method_latency_seconds_bucket{job=\"prometheus.scrape.zot\"}[5m])) by (le))", "legendFormat": "p95", "refId": "B" }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "histogram_quantile(0.99, sum(rate(zot_http_request_duration_seconds_bucket{job=\"prometheus.scrape.zot\"}[5m])) by (le))", + "expr": "histogram_quantile(0.99, sum(rate(zot_http_method_latency_seconds_bucket{job=\"prometheus.scrape.zot\"}[5m])) by (le))", "legendFormat": "p99", "refId": "C" } @@ -460,24 +460,12 @@ "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "process_resident_memory_bytes{job=\"prometheus.scrape.zot\"}", - "legendFormat": "Resident Memory", + "expr": "zot_repo_storage_bytes", + "legendFormat": "{{repo}}", "refId": "A" - }, - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "go_memstats_heap_alloc_bytes{job=\"prometheus.scrape.zot\"}", - "legendFormat": "Heap Alloc", - "refId": "B" - }, - { - "datasource": { "type": "prometheus", "uid": "prometheus" }, - "expr": "go_memstats_heap_inuse_bytes{job=\"prometheus.scrape.zot\"}", - "legendFormat": "Heap In Use", - "refId": "C" } ], - "title": "Memory Over Time", + "title": "Storage by Repository", "type": "timeseries" } ],