diff --git a/hosts/prometheus-hel/dashboards/knotmirror.json b/hosts/prometheus-hel/dashboards/knotmirror.json index 5314888..fc0c921 100644 --- a/hosts/prometheus-hel/dashboards/knotmirror.json +++ b/hosts/prometheus-hel/dashboards/knotmirror.json @@ -6,11 +6,105 @@ "refresh": "30s", "time": { "from": "now-1h", "to": "now" }, "panels": [ + { + "id": 10, + "title": "HTTP Request Rate", + "type": "timeseries", + "gridPos": { "x": 0, "y": 0, "w": 12, "h": 8 }, + "targets": [ + { + "expr": "sum by (status) (rate(knotmirror_http_requests_total[5m]))", + "legendFormat": "{{ status }}" + } + ] + }, + { + "id": 11, + "title": "HTTP Error Rate", + "type": "timeseries", + "gridPos": { "x": 12, "y": 0, "w": 12, "h": 8 }, + "targets": [ + { + "expr": "sum(rate(knotmirror_http_requests_total{status=~\"5..\"}[5m]))", + "legendFormat": "5xx" + }, + { + "expr": "sum(rate(knotmirror_http_requests_total{status=~\"4..\"}[5m]))", + "legendFormat": "4xx" + } + ] + }, + { + "id": 12, + "title": "HTTP Request Duration Percentiles", + "type": "timeseries", + "gridPos": { "x": 0, "y": 8, "w": 16, "h": 8 }, + "fieldConfig": { "defaults": { "unit": "s" } }, + "targets": [ + { + "expr": "histogram_quantile(0.50, sum by (le) (rate(knotmirror_http_request_duration_seconds_bucket[5m])))", + "legendFormat": "p50" + }, + { + "expr": "histogram_quantile(0.90, sum by (le) (rate(knotmirror_http_request_duration_seconds_bucket[5m])))", + "legendFormat": "p90" + }, + { + "expr": "histogram_quantile(0.99, sum by (le) (rate(knotmirror_http_request_duration_seconds_bucket[5m])))", + "legendFormat": "p99" + } + ] + }, + { + "id": 13, + "title": "Knotstream", + "type": "timeseries", + "gridPos": { "x": 16, "y": 8, "w": 8, "h": 8 }, + "targets": [ + { + "expr": "rate(knotmirror_knotstream_events_received_total[5m])", + "legendFormat": "received" + }, + { + "expr": "rate(knotmirror_knotstream_events_processed_total[5m])", + "legendFormat": "processed" + }, + { + "expr": "rate(knotmirror_knotstream_events_skipped_total[5m])", + "legendFormat": "skipped" + }, + { + "expr": "knotmirror_connected_inbound", + "legendFormat": "connected inbound" + } + ] + }, + { + "id": 14, + "title": "p50/p90/p99 Latency (200s) by Endpoint & Repo", + "type": "timeseries", + "gridPos": { "x": 0, "y": 16, "w": 24, "h": 8 }, + "fieldConfig": { "defaults": { "unit": "s" } }, + "targets": [ + { + "expr": "histogram_quantile(0.50, sum by (le, path, repo) (rate(knotmirror_http_request_duration_seconds_bucket{status=\"200\"}[5m])))", + "legendFormat": "p50 {{ path }} {{ repo }}" + }, + { + "expr": "histogram_quantile(0.90, sum by (le, path, repo) (rate(knotmirror_http_request_duration_seconds_bucket{status=\"200\"}[5m])))", + "legendFormat": "p90 {{ path }} {{ repo }}" + }, + { + "expr": "histogram_quantile(0.99, sum by (le, path, repo) (rate(knotmirror_http_request_duration_seconds_bucket{status=\"200\"}[5m])))", + "legendFormat": "p99 {{ path }} {{ repo }}" + } + ] + }, { "id": 1, "title": "Resync Rate", "type": "timeseries", - "gridPos": { "x": 0, "y": 0, "w": 12, "h": 8 }, + "gridPos": { "x": 0, "y": 24, "w": 12, "h": 8 }, "targets": [ { "expr": "rate(knotmirror_resyncs_started_total[5m])", @@ -30,7 +124,7 @@ "id": 2, "title": "Resync Totals", "type": "stat", - "gridPos": { "x": 12, "y": 0, "w": 12, "h": 8 }, + "gridPos": { "x": 12, "y": 24, "w": 12, "h": 8 }, "targets": [ { "expr": "knotmirror_resyncs_started_total", @@ -50,10 +144,8 @@ "id": 3, "title": "Resync Duration Percentiles", "type": "timeseries", - "gridPos": { "x": 0, "y": 8, "w": 24, "h": 8 }, - "fieldConfig": { - "defaults": { "unit": "s" } - }, + "gridPos": { "x": 0, "y": 32, "w": 24, "h": 8 }, + "fieldConfig": { "defaults": { "unit": "s" } }, "targets": [ { "expr": "histogram_quantile(0.50, rate(knotmirror_resync_duration_seconds_bucket[5m]))", @@ -73,10 +165,8 @@ "id": 4, "title": "Memory", "type": "timeseries", - "gridPos": { "x": 0, "y": 16, "w": 12, "h": 8 }, - "fieldConfig": { - "defaults": { "unit": "bytes" } - }, + "gridPos": { "x": 0, "y": 40, "w": 12, "h": 8 }, + "fieldConfig": { "defaults": { "unit": "bytes" } }, "targets": [ { "expr": "go_memstats_heap_inuse_bytes{job=\"knotmirror\"}", @@ -100,7 +190,7 @@ "id": 5, "title": "Goroutines & Threads", "type": "timeseries", - "gridPos": { "x": 12, "y": 16, "w": 6, "h": 8 }, + "gridPos": { "x": 12, "y": 40, "w": 6, "h": 8 }, "targets": [ { "expr": "go_goroutines{job=\"knotmirror\"}", @@ -116,10 +206,8 @@ "id": 6, "title": "GC Duration", "type": "timeseries", - "gridPos": { "x": 18, "y": 16, "w": 6, "h": 8 }, - "fieldConfig": { - "defaults": { "unit": "s" } - }, + "gridPos": { "x": 18, "y": 40, "w": 6, "h": 8 }, + "fieldConfig": { "defaults": { "unit": "s" } }, "targets": [ { "expr": "rate(go_gc_duration_seconds_sum{job=\"knotmirror\"}[5m]) / rate(go_gc_duration_seconds_count{job=\"knotmirror\"}[5m])", @@ -131,7 +219,7 @@ "id": 7, "title": "CPU & File Descriptors", "type": "timeseries", - "gridPos": { "x": 0, "y": 24, "w": 8, "h": 8 }, + "gridPos": { "x": 0, "y": 48, "w": 8, "h": 8 }, "targets": [ { "expr": "rate(process_cpu_seconds_total{job=\"knotmirror\"}[5m])",