How-to · Troubleshooting
Fix Grafana dashboards showing “No data”¶
This guide shows you how to diagnose and fix CrowdSec Grafana dashboards that show “No data” across panels.
Diagnostic order¶
Follow these checks in order. Stop when you find the root cause.
Check 1: Are the metrics scraped at all?¶
Query Prometheus directly:
kubectl exec -n monitoring prometheus-kube-prometheus-stack-prometheus-0 -c prometheus -- \
promtool query instant http://localhost:9090 'sum(cs_active_decisions)'
If this returns a number, metrics are reaching Prometheus. Continue with Check 2.
If empty, the ServiceMonitor is not scraping the metrics endpoint. Verify with:
kubectl get servicemonitor -n crowdsec
kubectl get svc -n crowdsec -o yaml | grep -A 2 "port: 6060"
Check 2: Does the dashboard use the object-form datasource?¶
Modern Grafana (v9+) binds datasources reliably only via the object form {"type": "prometheus", "uid": "prometheus"}.
The legacy string form "datasource": "prometheus" fails silently as “No data”.
Inspect the live ConfigMap:
kubectl get cm -n crowdsec crowdsec-lapi-dashboard \
-o jsonpath='{.data.crowdsec-lapi-metrics\.json}' \
| jq -r '[.. | objects | .datasource? // empty] | unique'
Only object-form entries should appear. If string entries remain, the fix is the same as the dp-infra MR !9 from Phase 1.
Check 3: Label collision?¶
Some LAPI metrics carry an endpoint label that collides with the ServiceMonitor’s added endpoint=metrics label.
Prometheus renames the scraped label to exported_endpoint.
Dashboard queries filtering by endpoint=... return empty.
Quick check:
kubectl exec -n monitoring prometheus-kube-prometheus-stack-prometheus-0 -c prometheus -- \
promtool query instant http://localhost:9090 \
'cs_lapi_request_duration_seconds_bucket{exported_endpoint="/v1/heartbeat"}' | head -3
If this returns values but the dashboard panel is empty, dashboard JSON uses endpoint=... instead of exported_endpoint=....
The fix matches dp-infra MR !10 from Phase 1.
Check 4: Grafana 11+ legacy panel type?¶
Grafana v11 removed the legacy graph panel type.
Dashboards still using "type": "graph" fail to render.
kubectl get cm -n crowdsec crowdsec-overview-dashboard \
-o jsonpath='{.data.crowdsec-overview\.json}' \
| jq -r '.panels[] | "\(.type)\t\(.title)"' | grep '^graph'
If any matches return, migrate to timeseries per dp-infra MR !11 from Phase 1.
Check 5: Sidecar load delay¶
The Grafana sidecar reloads dashboards roughly every 30 seconds. After a ConfigMap update, recent changes may not yet be visible.
Inspect the most recent reload:
kubectl logs -n monitoring deploy/kube-prometheus-stack-grafana \
-c grafana-sc-dashboard --tail=50 | grep -i crowdsec
Force-trigger an ArgoCD refresh if the ConfigMap is stale:
kubectl annotate application crowdsec-app-c83f79ee -n argocd \
argocd.argoproj.io/refresh=hard --overwrite
Check 6: Time range too short¶
cs_active_decisions is a gauge and shows an instant value.
Time-series panels need historical samples — if the dashboard defaults to now-15m but CrowdSec scraped for only 10 minutes, panels appear empty.
In Grafana, change the time-range selector to “Last 1 hour” or “Last 24 hours”.
Known empty-by-design panels¶
These dashboard panels remain permanently empty due to the chosen configuration:
Agent panels (Acquisitions, Parsers, Buckets overflow) — the CrowdSec agent is disabled (
agent.enabled: false) so no agent metrics flowAppSec rule-hit panels — AppSec is deployed but not attached to any IngressRoute; this changes in Phase 3
These are expected and not bugs.
Phase 1 dashboard fix history¶
The Phase 1 implementation required three rendering fixes, all merged in dp-infra:
MR !9 — convert legacy string-form datasource to object form
MR !10 — rewrite
endpoint=query filters toexported_endpoint=MR !11 — migrate legacy
graphpanels totimeseriesfor Grafana 13
New CrowdSec deployments should not hit these issues, since the fixes are merged.