|
| 1 | +apiVersion: v1 |
| 2 | +kind: ConfigMap |
| 3 | +metadata: |
| 4 | + name: agentrax-grafana-dashboard |
| 5 | + namespace: agentrax-system |
| 6 | + labels: |
| 7 | + app.kubernetes.io/name: agentrax |
| 8 | + app.kubernetes.io/component: grafana-dashboard |
| 9 | + # kube-prometheus-stack's Grafana sidecar watches for this label and |
| 10 | + # auto-imports the JSON payload below as a Grafana dashboard. |
| 11 | + grafana_dashboard: "1" |
| 12 | +data: |
| 13 | + agentrax-dashboard.json: | |
| 14 | + { |
| 15 | + "title": "Agentrax Operator — RED Dashboard", |
| 16 | + "uid": "agentrax-red", |
| 17 | + "tags": ["agentrax", "operator", "kubernetes"], |
| 18 | + "timezone": "browser", |
| 19 | + "schemaVersion": 38, |
| 20 | + "refresh": "30s", |
| 21 | + "templating": { |
| 22 | + "list": [ |
| 23 | + { |
| 24 | + "name": "tenant", |
| 25 | + "label": "Tenant", |
| 26 | + "type": "query", |
| 27 | + "datasource": "Prometheus", |
| 28 | + "query": "label_values(agentrax_tenant_quota_usage_ratio, tenant)", |
| 29 | + "includeAll": true, |
| 30 | + "allValue": ".*", |
| 31 | + "refresh": 1, |
| 32 | + "multi": true, |
| 33 | + "current": { "text": "All", "value": "$__all" } |
| 34 | + } |
| 35 | + ] |
| 36 | + }, |
| 37 | + "panels": [ |
| 38 | + { |
| 39 | + "id": 1, |
| 40 | + "title": "Rate — Reconcile Operations / sec", |
| 41 | + "type": "timeseries", |
| 42 | + "gridPos": { "x": 0, "y": 0, "w": 12, "h": 8 }, |
| 43 | + "datasource": "Prometheus", |
| 44 | + "targets": [ |
| 45 | + { |
| 46 | + "expr": "sum(rate(agentrax_reconcile_duration_seconds_count{tenant=~\"$tenant\"}[5m])) by (tenant)", |
| 47 | + "legendFormat": "{{ tenant }}" |
| 48 | + } |
| 49 | + ], |
| 50 | + "fieldConfig": { |
| 51 | + "defaults": { |
| 52 | + "unit": "reqps", |
| 53 | + "custom": { "lineWidth": 2 } |
| 54 | + } |
| 55 | + } |
| 56 | + }, |
| 57 | + { |
| 58 | + "id": 2, |
| 59 | + "title": "Errors — Reconcile Error Rate / sec", |
| 60 | + "type": "timeseries", |
| 61 | + "gridPos": { "x": 12, "y": 0, "w": 12, "h": 8 }, |
| 62 | + "datasource": "Prometheus", |
| 63 | + "targets": [ |
| 64 | + { |
| 65 | + "expr": "sum(rate(controller_runtime_reconcile_errors_total{controller=\"agentdeployment\"}[5m]))", |
| 66 | + "legendFormat": "errors/s" |
| 67 | + } |
| 68 | + ], |
| 69 | + "fieldConfig": { |
| 70 | + "defaults": { |
| 71 | + "unit": "reqps", |
| 72 | + "color": { "fixedColor": "red", "mode": "fixed" }, |
| 73 | + "custom": { "lineWidth": 2 } |
| 74 | + } |
| 75 | + } |
| 76 | + }, |
| 77 | + { |
| 78 | + "id": 3, |
| 79 | + "title": "Duration — Reconcile P99 Latency (seconds)", |
| 80 | + "type": "timeseries", |
| 81 | + "gridPos": { "x": 0, "y": 8, "w": 12, "h": 8 }, |
| 82 | + "datasource": "Prometheus", |
| 83 | + "targets": [ |
| 84 | + { |
| 85 | + "expr": "histogram_quantile(0.99, sum(rate(agentrax_reconcile_duration_seconds_bucket{tenant=~\"$tenant\"}[5m])) by (le, tenant))", |
| 86 | + "legendFormat": "P99 {{ tenant }}" |
| 87 | + }, |
| 88 | + { |
| 89 | + "expr": "histogram_quantile(0.50, sum(rate(agentrax_reconcile_duration_seconds_bucket{tenant=~\"$tenant\"}[5m])) by (le, tenant))", |
| 90 | + "legendFormat": "P50 {{ tenant }}" |
| 91 | + } |
| 92 | + ], |
| 93 | + "fieldConfig": { |
| 94 | + "defaults": { |
| 95 | + "unit": "s", |
| 96 | + "custom": { "lineWidth": 2 }, |
| 97 | + "thresholds": { |
| 98 | + "mode": "absolute", |
| 99 | + "steps": [ |
| 100 | + { "color": "green", "value": null }, |
| 101 | + { "color": "yellow", "value": 1 }, |
| 102 | + { "color": "red", "value": 2 } |
| 103 | + ] |
| 104 | + } |
| 105 | + } |
| 106 | + } |
| 107 | + }, |
| 108 | + { |
| 109 | + "id": 4, |
| 110 | + "title": "Quota — Tenant Replica Usage Ratio", |
| 111 | + "type": "gauge", |
| 112 | + "gridPos": { "x": 12, "y": 8, "w": 12, "h": 8 }, |
| 113 | + "datasource": "Prometheus", |
| 114 | + "targets": [ |
| 115 | + { |
| 116 | + "expr": "agentrax_tenant_quota_usage_ratio{tenant=~\"$tenant\"}", |
| 117 | + "legendFormat": "{{ tenant }}" |
| 118 | + } |
| 119 | + ], |
| 120 | + "fieldConfig": { |
| 121 | + "defaults": { |
| 122 | + "unit": "percentunit", |
| 123 | + "min": 0, |
| 124 | + "max": 1, |
| 125 | + "thresholds": { |
| 126 | + "mode": "absolute", |
| 127 | + "steps": [ |
| 128 | + { "color": "green", "value": null }, |
| 129 | + { "color": "yellow", "value": 0.7 }, |
| 130 | + { "color": "red", "value": 0.9 } |
| 131 | + ] |
| 132 | + } |
| 133 | + } |
| 134 | + } |
| 135 | + } |
| 136 | + ] |
| 137 | + } |
0 commit comments