Enriched dashboards for DevTools (Gitea), Identity (Hydra/Kratos), Infrastructure (Longhorn, PostgreSQL, cert-manager, OpenBao), Ingress (Pingora), and Storage (SeaweedFS).
406 lines
15 KiB
YAML
406 lines
15 KiB
YAML
# 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,
|
|
"graphTooltip": 1,
|
|
"panels": [
|
|
{
|
|
"title": "Overview",
|
|
"type": "row",
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 },
|
|
"collapsed": false
|
|
},
|
|
{
|
|
"title": "Request Rate",
|
|
"type": "stat",
|
|
"gridPos": { "h": 4, "w": 6, "x": 0, "y": 1 },
|
|
"datasource": { "uid": "prometheus" },
|
|
"targets": [
|
|
{ "expr": "sum(rate(http_requests_total{job=\"hydra-admin\"}[5m]))", "legendFormat": "", "instant": true }
|
|
],
|
|
"fieldConfig": { "defaults": { "unit": "reqps" } }
|
|
},
|
|
{
|
|
"title": "Error Rate (5xx)",
|
|
"type": "stat",
|
|
"gridPos": { "h": 4, "w": 6, "x": 6, "y": 1 },
|
|
"datasource": { "uid": "prometheus" },
|
|
"targets": [
|
|
{ "expr": "sum(rate(http_requests_statuses_total{job=\"hydra-admin\",code=~\"5..\"}[5m])) / sum(rate(http_requests_statuses_total{job=\"hydra-admin\"}[5m]))", "legendFormat": "", "instant": true }
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": { "unit": "percentunit", "max": 1, "thresholds": { "steps": [{"color":"green","value":null},{"color":"yellow","value":0.01},{"color":"red","value":0.05}] } }
|
|
}
|
|
},
|
|
{
|
|
"title": "Goroutines",
|
|
"type": "stat",
|
|
"gridPos": { "h": 4, "w": 6, "x": 12, "y": 1 },
|
|
"datasource": { "uid": "prometheus" },
|
|
"targets": [
|
|
{ "expr": "go_goroutines{job=\"hydra-admin\"}", "legendFormat": "", "instant": true }
|
|
]
|
|
},
|
|
{
|
|
"title": "Memory (RSS)",
|
|
"type": "stat",
|
|
"gridPos": { "h": 4, "w": 6, "x": 18, "y": 1 },
|
|
"datasource": { "uid": "prometheus" },
|
|
"targets": [
|
|
{ "expr": "process_resident_memory_bytes{job=\"hydra-admin\"}", "legendFormat": "", "instant": true }
|
|
],
|
|
"fieldConfig": { "defaults": { "unit": "bytes" } }
|
|
},
|
|
{
|
|
"title": "Request Traffic",
|
|
"type": "row",
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 5 },
|
|
"collapsed": false
|
|
},
|
|
{
|
|
"title": "Requests / sec by Handler",
|
|
"type": "timeseries",
|
|
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 6 },
|
|
"datasource": { "uid": "prometheus" },
|
|
"targets": [
|
|
{
|
|
"expr": "sum(rate(http_requests_total{job=\"hydra-admin\"}[5m])) by (handler)",
|
|
"legendFormat": "{{handler}}"
|
|
}
|
|
],
|
|
"fieldConfig": { "defaults": { "unit": "reqps" } }
|
|
},
|
|
{
|
|
"title": "Requests / sec by Method",
|
|
"type": "timeseries",
|
|
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 6 },
|
|
"datasource": { "uid": "prometheus" },
|
|
"targets": [
|
|
{
|
|
"expr": "sum(rate(http_requests_total{job=\"hydra-admin\"}[5m])) by (method)",
|
|
"legendFormat": "{{method}}"
|
|
}
|
|
],
|
|
"fieldConfig": { "defaults": { "unit": "reqps" } }
|
|
},
|
|
{
|
|
"title": "Response Status Codes",
|
|
"type": "timeseries",
|
|
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 14 },
|
|
"datasource": { "uid": "prometheus" },
|
|
"targets": [
|
|
{
|
|
"expr": "sum(rate(http_requests_statuses_total{job=\"hydra-admin\"}[5m])) by (code)",
|
|
"legendFormat": "{{code}}"
|
|
}
|
|
],
|
|
"fieldConfig": { "defaults": { "unit": "reqps" } }
|
|
},
|
|
{
|
|
"title": "Request Latency (p50 / p95 / p99)",
|
|
"type": "timeseries",
|
|
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 14 },
|
|
"datasource": { "uid": "prometheus" },
|
|
"targets": [
|
|
{ "expr": "histogram_quantile(0.50, sum(rate(http_requests_duration_seconds_bucket{job=\"hydra-admin\"}[5m])) by (le))", "legendFormat": "p50" },
|
|
{ "expr": "histogram_quantile(0.95, sum(rate(http_requests_duration_seconds_bucket{job=\"hydra-admin\"}[5m])) by (le))", "legendFormat": "p95" },
|
|
{ "expr": "histogram_quantile(0.99, sum(rate(http_requests_duration_seconds_bucket{job=\"hydra-admin\"}[5m])) by (le))", "legendFormat": "p99" }
|
|
],
|
|
"fieldConfig": { "defaults": { "unit": "s" } }
|
|
},
|
|
{
|
|
"title": "Size & Timing",
|
|
"type": "row",
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 22 },
|
|
"collapsed": false
|
|
},
|
|
{
|
|
"title": "Request Size (p95)",
|
|
"type": "timeseries",
|
|
"gridPos": { "h": 8, "w": 8, "x": 0, "y": 23 },
|
|
"datasource": { "uid": "prometheus" },
|
|
"targets": [
|
|
{ "expr": "histogram_quantile(0.95, sum(rate(http_requests_size_bytes_bucket{job=\"hydra-admin\"}[5m])) by (le))", "legendFormat": "p95" }
|
|
],
|
|
"fieldConfig": { "defaults": { "unit": "bytes" } }
|
|
},
|
|
{
|
|
"title": "Response Size (p95)",
|
|
"type": "timeseries",
|
|
"gridPos": { "h": 8, "w": 8, "x": 8, "y": 23 },
|
|
"datasource": { "uid": "prometheus" },
|
|
"targets": [
|
|
{ "expr": "histogram_quantile(0.95, sum(rate(http_response_size_bytes_bucket{job=\"hydra-admin\"}[5m])) by (le))", "legendFormat": "p95" }
|
|
],
|
|
"fieldConfig": { "defaults": { "unit": "bytes" } }
|
|
},
|
|
{
|
|
"title": "Response Time (p95)",
|
|
"type": "timeseries",
|
|
"gridPos": { "h": 8, "w": 8, "x": 16, "y": 23 },
|
|
"datasource": { "uid": "prometheus" },
|
|
"targets": [
|
|
{ "expr": "histogram_quantile(0.95, sum(rate(http_response_time_seconds_bucket{job=\"hydra-admin\"}[5m])) by (le))", "legendFormat": "p95" }
|
|
],
|
|
"fieldConfig": { "defaults": { "unit": "s" } }
|
|
},
|
|
{
|
|
"title": "Runtime",
|
|
"type": "row",
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 31 },
|
|
"collapsed": false
|
|
},
|
|
{
|
|
"title": "Goroutines",
|
|
"type": "timeseries",
|
|
"gridPos": { "h": 8, "w": 8, "x": 0, "y": 32 },
|
|
"datasource": { "uid": "prometheus" },
|
|
"targets": [
|
|
{ "expr": "go_goroutines{job=\"hydra-admin\"}", "legendFormat": "{{instance}}" }
|
|
],
|
|
"fieldConfig": { "defaults": { "unit": "short" } }
|
|
},
|
|
{
|
|
"title": "Memory",
|
|
"type": "timeseries",
|
|
"gridPos": { "h": 8, "w": 8, "x": 8, "y": 32 },
|
|
"datasource": { "uid": "prometheus" },
|
|
"targets": [
|
|
{ "expr": "process_resident_memory_bytes{job=\"hydra-admin\"}", "legendFormat": "RSS" },
|
|
{ "expr": "go_memstats_alloc_bytes{job=\"hydra-admin\"}", "legendFormat": "Go alloc" }
|
|
],
|
|
"fieldConfig": { "defaults": { "unit": "bytes" } }
|
|
},
|
|
{
|
|
"title": "CPU Usage",
|
|
"type": "timeseries",
|
|
"gridPos": { "h": 8, "w": 8, "x": 16, "y": 32 },
|
|
"datasource": { "uid": "prometheus" },
|
|
"targets": [
|
|
{ "expr": "rate(process_cpu_seconds_total{job=\"hydra-admin\"}[5m])", "legendFormat": "{{instance}}" }
|
|
],
|
|
"fieldConfig": { "defaults": { "unit": "short" } }
|
|
}
|
|
],
|
|
"schemaVersion": 39,
|
|
"tags": ["hydra", "oauth2", "identity"],
|
|
"templating": { "list": [] },
|
|
"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,
|
|
"graphTooltip": 1,
|
|
"panels": [
|
|
{
|
|
"title": "Overview",
|
|
"type": "row",
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 },
|
|
"collapsed": false
|
|
},
|
|
{
|
|
"title": "Request Rate",
|
|
"type": "stat",
|
|
"gridPos": { "h": 4, "w": 6, "x": 0, "y": 1 },
|
|
"datasource": { "uid": "prometheus" },
|
|
"targets": [
|
|
{ "expr": "sum(rate(http_requests_total{job=\"kratos-admin\"}[5m]))", "legendFormat": "", "instant": true }
|
|
],
|
|
"fieldConfig": { "defaults": { "unit": "reqps" } }
|
|
},
|
|
{
|
|
"title": "Error Rate (5xx)",
|
|
"type": "stat",
|
|
"gridPos": { "h": 4, "w": 6, "x": 6, "y": 1 },
|
|
"datasource": { "uid": "prometheus" },
|
|
"targets": [
|
|
{ "expr": "sum(rate(http_requests_statuses_total{job=\"kratos-admin\",code=~\"5..\"}[5m])) / sum(rate(http_requests_statuses_total{job=\"kratos-admin\"}[5m]))", "legendFormat": "", "instant": true }
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": { "unit": "percentunit", "max": 1, "thresholds": { "steps": [{"color":"green","value":null},{"color":"yellow","value":0.01},{"color":"red","value":0.05}] } }
|
|
}
|
|
},
|
|
{
|
|
"title": "Goroutines",
|
|
"type": "stat",
|
|
"gridPos": { "h": 4, "w": 6, "x": 12, "y": 1 },
|
|
"datasource": { "uid": "prometheus" },
|
|
"targets": [
|
|
{ "expr": "go_goroutines{job=\"kratos-admin\"}", "legendFormat": "", "instant": true }
|
|
]
|
|
},
|
|
{
|
|
"title": "Memory (RSS)",
|
|
"type": "stat",
|
|
"gridPos": { "h": 4, "w": 6, "x": 18, "y": 1 },
|
|
"datasource": { "uid": "prometheus" },
|
|
"targets": [
|
|
{ "expr": "process_resident_memory_bytes{job=\"kratos-admin\"}", "legendFormat": "", "instant": true }
|
|
],
|
|
"fieldConfig": { "defaults": { "unit": "bytes" } }
|
|
},
|
|
{
|
|
"title": "Request Traffic",
|
|
"type": "row",
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 5 },
|
|
"collapsed": false
|
|
},
|
|
{
|
|
"title": "Requests / sec by Handler",
|
|
"type": "timeseries",
|
|
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 6 },
|
|
"datasource": { "uid": "prometheus" },
|
|
"targets": [
|
|
{
|
|
"expr": "sum(rate(http_requests_total{job=\"kratos-admin\"}[5m])) by (handler)",
|
|
"legendFormat": "{{handler}}"
|
|
}
|
|
],
|
|
"fieldConfig": { "defaults": { "unit": "reqps" } }
|
|
},
|
|
{
|
|
"title": "Requests / sec by Method",
|
|
"type": "timeseries",
|
|
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 6 },
|
|
"datasource": { "uid": "prometheus" },
|
|
"targets": [
|
|
{
|
|
"expr": "sum(rate(http_requests_total{job=\"kratos-admin\"}[5m])) by (method)",
|
|
"legendFormat": "{{method}}"
|
|
}
|
|
],
|
|
"fieldConfig": { "defaults": { "unit": "reqps" } }
|
|
},
|
|
{
|
|
"title": "Response Status Codes",
|
|
"type": "timeseries",
|
|
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 14 },
|
|
"datasource": { "uid": "prometheus" },
|
|
"targets": [
|
|
{
|
|
"expr": "sum(rate(http_requests_statuses_total{job=\"kratos-admin\"}[5m])) by (code)",
|
|
"legendFormat": "{{code}}"
|
|
}
|
|
],
|
|
"fieldConfig": { "defaults": { "unit": "reqps" } }
|
|
},
|
|
{
|
|
"title": "Request Latency (p50 / p95 / p99)",
|
|
"type": "timeseries",
|
|
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 14 },
|
|
"datasource": { "uid": "prometheus" },
|
|
"targets": [
|
|
{ "expr": "histogram_quantile(0.50, sum(rate(http_requests_duration_seconds_bucket{job=\"kratos-admin\"}[5m])) by (le))", "legendFormat": "p50" },
|
|
{ "expr": "histogram_quantile(0.95, sum(rate(http_requests_duration_seconds_bucket{job=\"kratos-admin\"}[5m])) by (le))", "legendFormat": "p95" },
|
|
{ "expr": "histogram_quantile(0.99, sum(rate(http_requests_duration_seconds_bucket{job=\"kratos-admin\"}[5m])) by (le))", "legendFormat": "p99" }
|
|
],
|
|
"fieldConfig": { "defaults": { "unit": "s" } }
|
|
},
|
|
{
|
|
"title": "Size & Timing",
|
|
"type": "row",
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 22 },
|
|
"collapsed": false
|
|
},
|
|
{
|
|
"title": "Request Size (p95)",
|
|
"type": "timeseries",
|
|
"gridPos": { "h": 8, "w": 8, "x": 0, "y": 23 },
|
|
"datasource": { "uid": "prometheus" },
|
|
"targets": [
|
|
{ "expr": "histogram_quantile(0.95, sum(rate(http_requests_size_bytes_bucket{job=\"kratos-admin\"}[5m])) by (le))", "legendFormat": "p95" }
|
|
],
|
|
"fieldConfig": { "defaults": { "unit": "bytes" } }
|
|
},
|
|
{
|
|
"title": "Response Size (p95)",
|
|
"type": "timeseries",
|
|
"gridPos": { "h": 8, "w": 8, "x": 8, "y": 23 },
|
|
"datasource": { "uid": "prometheus" },
|
|
"targets": [
|
|
{ "expr": "histogram_quantile(0.95, sum(rate(http_response_size_bytes_bucket{job=\"kratos-admin\"}[5m])) by (le))", "legendFormat": "p95" }
|
|
],
|
|
"fieldConfig": { "defaults": { "unit": "bytes" } }
|
|
},
|
|
{
|
|
"title": "Response Time (p95)",
|
|
"type": "timeseries",
|
|
"gridPos": { "h": 8, "w": 8, "x": 16, "y": 23 },
|
|
"datasource": { "uid": "prometheus" },
|
|
"targets": [
|
|
{ "expr": "histogram_quantile(0.95, sum(rate(http_response_time_seconds_bucket{job=\"kratos-admin\"}[5m])) by (le))", "legendFormat": "p95" }
|
|
],
|
|
"fieldConfig": { "defaults": { "unit": "s" } }
|
|
},
|
|
{
|
|
"title": "Runtime",
|
|
"type": "row",
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 31 },
|
|
"collapsed": false
|
|
},
|
|
{
|
|
"title": "Goroutines",
|
|
"type": "timeseries",
|
|
"gridPos": { "h": 8, "w": 8, "x": 0, "y": 32 },
|
|
"datasource": { "uid": "prometheus" },
|
|
"targets": [
|
|
{ "expr": "go_goroutines{job=\"kratos-admin\"}", "legendFormat": "{{instance}}" }
|
|
],
|
|
"fieldConfig": { "defaults": { "unit": "short" } }
|
|
},
|
|
{
|
|
"title": "Memory",
|
|
"type": "timeseries",
|
|
"gridPos": { "h": 8, "w": 8, "x": 8, "y": 32 },
|
|
"datasource": { "uid": "prometheus" },
|
|
"targets": [
|
|
{ "expr": "process_resident_memory_bytes{job=\"kratos-admin\"}", "legendFormat": "RSS" },
|
|
{ "expr": "go_memstats_alloc_bytes{job=\"kratos-admin\"}", "legendFormat": "Go alloc" }
|
|
],
|
|
"fieldConfig": { "defaults": { "unit": "bytes" } }
|
|
},
|
|
{
|
|
"title": "CPU Usage",
|
|
"type": "timeseries",
|
|
"gridPos": { "h": 8, "w": 8, "x": 16, "y": 32 },
|
|
"datasource": { "uid": "prometheus" },
|
|
"targets": [
|
|
{ "expr": "rate(process_cpu_seconds_total{job=\"kratos-admin\"}[5m])", "legendFormat": "{{instance}}" }
|
|
],
|
|
"fieldConfig": { "defaults": { "unit": "short" } }
|
|
}
|
|
],
|
|
"schemaVersion": 39,
|
|
"tags": ["kratos", "identity"],
|
|
"templating": { "list": [] },
|
|
"time": { "from": "now-1h", "to": "now" },
|
|
"title": "Kratos Identity",
|
|
"uid": "kratos"
|
|
}
|