feat: split Grafana dashboards into per-folder ConfigMaps

Replace monolithic dashboards-configmap.yaml with 10 dedicated files,
one per Grafana folder: Ingress, Observability, Infrastructure, Storage,
Identity, DevTools, Search, Media, La Suite, Communications.

New dashboards for Longhorn, PostgreSQL/CNPG, Cert-Manager, SeaweedFS,
Hydra, Kratos, Gitea, OpenSearch, LiveKit, La Suite golden signals
(Linkerd metrics), Matrix, and Email Pipeline.
This commit is contained in:
2026-03-24 12:20:42 +00:00
parent 234fe72707
commit 74bb59cfdc
11 changed files with 1418 additions and 247 deletions

View File

@@ -0,0 +1,179 @@
# Grafana dashboard ConfigMaps — Identity
---
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana-dashboard-hydra
namespace: monitoring
labels:
grafana_dashboard: "1"
annotations:
grafana_folder: "Identity"
data:
hydra.json: |
{
"annotations": { "list": [] },
"editable": true,
"panels": [
{
"title": "Request Rate",
"type": "timeseries",
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 0 },
"datasource": { "uid": "prometheus" },
"targets": [
{
"expr": "sum(rate(http_requests_total{job=~\".*hydra.*\"}[5m])) by (handler)",
"legendFormat": "{{handler}}"
}
],
"fieldConfig": { "defaults": { "unit": "reqps" } }
},
{
"title": "Error Rate",
"type": "timeseries",
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 0 },
"datasource": { "uid": "prometheus" },
"targets": [
{
"expr": "sum(rate(http_requests_total{job=~\".*hydra.*\",code=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=~\".*hydra.*\"}[5m]))",
"legendFormat": "5xx ratio"
}
],
"fieldConfig": {
"defaults": { "unit": "percentunit", "max": 1, "thresholds": { "steps": [{"color":"green","value":null},{"color":"yellow","value":0.01},{"color":"red","value":0.05}] } }
}
},
{
"title": "Request Latency p95",
"type": "timeseries",
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 8 },
"datasource": { "uid": "prometheus" },
"targets": [
{
"expr": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=~\".*hydra.*\"}[5m])) by (le, handler))",
"legendFormat": "{{handler}} p95"
}
],
"fieldConfig": { "defaults": { "unit": "s" } }
},
{
"title": "Go Goroutines",
"type": "timeseries",
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 8 },
"datasource": { "uid": "prometheus" },
"targets": [
{
"expr": "go_goroutines{job=~\".*hydra.*\"}",
"legendFormat": "{{instance}}"
}
]
},
{
"title": "Memory Usage",
"type": "timeseries",
"gridPos": { "h": 8, "w": 24, "x": 0, "y": 16 },
"datasource": { "uid": "prometheus" },
"targets": [
{
"expr": "go_memstats_alloc_bytes{job=~\".*hydra.*\"}",
"legendFormat": "{{instance}}"
}
],
"fieldConfig": { "defaults": { "unit": "bytes" } }
}
],
"schemaVersion": 39,
"tags": ["hydra", "oauth2", "identity"],
"time": { "from": "now-1h", "to": "now" },
"title": "Hydra OAuth2",
"uid": "hydra"
}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana-dashboard-kratos
namespace: monitoring
labels:
grafana_dashboard: "1"
annotations:
grafana_folder: "Identity"
data:
kratos.json: |
{
"annotations": { "list": [] },
"editable": true,
"panels": [
{
"title": "Request Rate",
"type": "timeseries",
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 0 },
"datasource": { "uid": "prometheus" },
"targets": [
{
"expr": "sum(rate(http_requests_total{job=~\".*kratos.*\"}[5m])) by (handler)",
"legendFormat": "{{handler}}"
}
],
"fieldConfig": { "defaults": { "unit": "reqps" } }
},
{
"title": "Error Rate",
"type": "timeseries",
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 0 },
"datasource": { "uid": "prometheus" },
"targets": [
{
"expr": "sum(rate(http_requests_total{job=~\".*kratos.*\",code=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=~\".*kratos.*\"}[5m]))",
"legendFormat": "5xx ratio"
}
],
"fieldConfig": {
"defaults": { "unit": "percentunit", "max": 1, "thresholds": { "steps": [{"color":"green","value":null},{"color":"yellow","value":0.01},{"color":"red","value":0.05}] } }
}
},
{
"title": "Request Latency p95",
"type": "timeseries",
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 8 },
"datasource": { "uid": "prometheus" },
"targets": [
{
"expr": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=~\".*kratos.*\"}[5m])) by (le, handler))",
"legendFormat": "{{handler}} p95"
}
],
"fieldConfig": { "defaults": { "unit": "s" } }
},
{
"title": "Go Goroutines",
"type": "timeseries",
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 8 },
"datasource": { "uid": "prometheus" },
"targets": [
{
"expr": "go_goroutines{job=~\".*kratos.*\"}",
"legendFormat": "{{instance}}"
}
]
},
{
"title": "Memory Usage",
"type": "timeseries",
"gridPos": { "h": 8, "w": 24, "x": 0, "y": 16 },
"datasource": { "uid": "prometheus" },
"targets": [
{
"expr": "go_memstats_alloc_bytes{job=~\".*kratos.*\"}",
"legendFormat": "{{instance}}"
}
],
"fieldConfig": { "defaults": { "unit": "bytes" } }
}
],
"schemaVersion": 39,
"tags": ["kratos", "identity"],
"time": { "from": "now-1h", "to": "now" },
"title": "Kratos Identity",
"uid": "kratos"
}