74 lines
2.8 KiB
YAML
74 lines
2.8 KiB
YAML
---
|
|
# Keycloak health dashboard (R-OBS-03, docs/10 — "issues and health visible on dashboards"). A
|
|
# ConfigMap labelled grafana_dashboard is auto-discovered by the Grafana sidecar (searchNamespace:
|
|
# ALL, label grafana_dashboard — see platform/monitoring/kube-prometheus-stack.yaml) and provisioned
|
|
# into Grafana. Applied by the `platform` Kustomization (plain ConfigMap, no CRD → no split needed).
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: keycloak-dashboard
|
|
namespace: keycloak
|
|
labels:
|
|
grafana_dashboard: "1"
|
|
data:
|
|
keycloak-health.json: |
|
|
{
|
|
"uid": "keycloak-health",
|
|
"title": "Keycloak — Identity / SSO health",
|
|
"tags": ["keycloak", "identity", "platform-health"],
|
|
"timezone": "browser",
|
|
"schemaVersion": 39,
|
|
"version": 1,
|
|
"refresh": "30s",
|
|
"time": {"from": "now-6h", "to": "now"},
|
|
"panels": [
|
|
{
|
|
"id": 1,
|
|
"type": "stat",
|
|
"title": "Keycloak pods ready",
|
|
"gridPos": {"h": 6, "w": 8, "x": 0, "y": 0},
|
|
"fieldConfig": {"defaults": {"thresholds": {"steps": [{"color": "red", "value": null}, {"color": "green", "value": 1}]}}},
|
|
"targets": [
|
|
{"expr": "sum(kube_pod_status_ready{namespace=\"keycloak\", pod=~\"keycloak-[0-9]+\", condition=\"true\"})", "legendFormat": "ready"}
|
|
]
|
|
},
|
|
{
|
|
"id": 2,
|
|
"type": "stat",
|
|
"title": "Keycloak DB (CNPG) pods ready",
|
|
"gridPos": {"h": 6, "w": 8, "x": 8, "y": 0},
|
|
"fieldConfig": {"defaults": {"thresholds": {"steps": [{"color": "red", "value": null}, {"color": "green", "value": 1}]}}},
|
|
"targets": [
|
|
{"expr": "sum(kube_pod_status_ready{namespace=\"keycloak\", pod=~\"keycloak-db-.*\", condition=\"true\"})", "legendFormat": "db ready"}
|
|
]
|
|
},
|
|
{
|
|
"id": 3,
|
|
"type": "timeseries",
|
|
"title": "Keycloak scrape target up",
|
|
"gridPos": {"h": 6, "w": 8, "x": 16, "y": 0},
|
|
"targets": [
|
|
{"expr": "up{namespace=\"keycloak\"}", "legendFormat": "{{pod}}"}
|
|
]
|
|
},
|
|
{
|
|
"id": 4,
|
|
"type": "timeseries",
|
|
"title": "JVM heap used (Keycloak)",
|
|
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 6},
|
|
"targets": [
|
|
{"expr": "sum by (pod) (jvm_memory_used_bytes{namespace=\"keycloak\", area=\"heap\"})", "legendFormat": "{{pod}}"}
|
|
]
|
|
},
|
|
{
|
|
"id": 5,
|
|
"type": "timeseries",
|
|
"title": "HTTP requests (Keycloak, rate)",
|
|
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 6},
|
|
"targets": [
|
|
{"expr": "sum(rate(http_server_requests_seconds_count{namespace=\"keycloak\"}[5m]))", "legendFormat": "req/s"}
|
|
]
|
|
}
|
|
]
|
|
}
|