i18n/de/skills/build-grafana-dashboards/SKILL.md
Produktionsreife Grafana-Dashboards mit wiederverwendbaren Panels, Template-Variablen, Annotationen und Provisioning fuer versionskontrolliertes Dashboard-Deployment erstellen. Verwenden, wenn visuelle Darstellungen von Prometheus-, Loki- oder anderen Datenquellen- Metriken benoetigt werden, operative Dashboards fuer SRE-Teams aufgebaut werden, von manueller Dashboard-Erstellung zu versionskontrolliertem Provisioning migriert wird oder Executive-Level-SLO-Compliance-Berichte eingerichtet werden sollen.
npx skillsauth add pjt222/agent-almanac build-grafana-dashboardsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Grafana-Dashboards mit Best Practices fuer Wartbarkeit, Wiederverwendbarkeit und Versionskontrolle entwerfen und bereitstellen.
Unter Extended Examples sind vollstaendige Konfigurationsdateien und Templates verfuegbar.
Dashboard-Layout und -Organisation planen, bevor Panels erstellt werden.
Ein Dashboard-Spezifikationsdokument erstellen:
# Service Overview Dashboard
## Purpose
Real-time operational view for on-call engineers monitoring the API service.
## Rows
1. High-Level Metrics (collapsed by default)
- Request rate, error rate, latency (RED metrics)
- Service uptime, instance count
2. Detailed Metrics (expanded by default)
- Per-endpoint latency breakdown
- Error rate by status code
- Database connection pool status
3. Resource Utilization
- CPU, memory, disk usage per instance
- Network I/O rates
4. Logs (collapsed by default)
- Recent errors from Loki
- Alert firing history
## Variables
- `environment`: production, staging, development
- `instance`: all instances or specific instance selection
- `interval`: aggregation window (5m, 15m, 1h)
## Annotations
- Deployment events from CI/CD system
- Alert firing/resolving events
Wichtige Designprinzipien:
Erwartet: Klare Dashboard-Struktur dokumentiert, Stakeholder zu Metriken und Layout-Prioritaeten abgestimmt.
Bei Fehler:
Dashboard-Grundlage mit wiederverwendbaren Variablen zur Filterung aufbauen.
Dashboard-JSON-Struktur erstellen (oder Benutzerflaeche verwenden und exportieren):
{
"dashboard": {
"title": "API Service Overview",
"uid": "api-service-overview",
"version": 1,
"timezone": "browser",
"editable": true,
"graphTooltip": 1,
"time": {
"from": "now-6h",
"to": "now"
},
"refresh": "30s",
"templating": {
"list": [
{
"name": "environment",
"type": "query",
"datasource": "Prometheus",
"query": "label_values(up{job=\"api-service\"}, environment)",
"multi": false,
"includeAll": false,
"refresh": 1,
"sort": 1,
"current": {
"selected": false,
"text": "production",
"value": "production"
}
},
{
"name": "instance",
"type": "query",
"datasource": "Prometheus",
"query": "label_values(up{job=\"api-service\",environment=\"$environment\"}, instance)",
"multi": true,
"includeAll": true,
"refresh": 1,
"allValue": ".*",
"current": {
"selected": true,
"text": "All",
"value": "$__all"
}
},
{
"name": "interval",
"type": "interval",
"options": [
{"text": "1m", "value": "1m"},
{"text": "5m", "value": "5m"},
{"text": "15m", "value": "15m"},
{"text": "1h", "value": "1h"}
],
"current": {
"text": "5m",
"value": "5m"
},
"auto": false
}
]
},
"annotations": {
"list": [
{
"name": "Deployments",
"datasource": "Prometheus",
"enable": true,
"expr": "changes(app_version{job=\"api-service\",environment=\"$environment\"}[5m]) > 0",
"step": "60s",
"iconColor": "rgba(0, 211, 255, 1)",
"tagKeys": "version"
}
]
}
}
}
Variablentypen und Anwendungsfaelle:
label_values(), query_result())Erwartet: Variablen werden korrekt aus der Datenquelle befuellt, kaskadierende Filter funktionieren (Umgebung filtert Instanzen), Standardauswahl angemessen.
Bei Fehler:
allValue-Feld fuer Multi-Select-Variablen ueberpruefenPanels fuer jede Metrik mit geeigneten Visualisierungstypen erstellen.
Time-Series-Panel (Request Rate):
{
"type": "timeseries",
"title": "Request Rate",
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 0},
"targets": [
{
"expr": "sum(rate(http_requests_total{job=\"api-service\",environment=\"$environment\",instance=~\"$instance\"}[$interval])) by (method)",
"legendFormat": "{{method}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"unit": "reqps",
"color": {
"mode": "palette-classic"
},
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"fillOpacity": 10,
"spanNulls": true
},
"thresholds": {
"mode": "absolute",
"steps": [
{"value": null, "color": "green"},
{"value": 1000, "color": "yellow"},
{"value": 5000, "color": "red"}
]
}
}
},
"options": {
"tooltip": {
"mode": "multi",
"sort": "desc"
},
"legend": {
"displayMode": "table",
"placement": "right",
"calcs": ["mean", "max", "last"]
}
}
}
Stat-Panel (Fehlerrate):
{
"type": "stat",
"title": "Error Rate",
"gridPos": {"h": 4, "w": 6, "x": 12, "y": 0},
"targets": [
{
# ... (see EXAMPLES.md for complete configuration)
Heatmap-Panel (Latenz-Verteilung):
{
"type": "heatmap",
"title": "Request Duration Heatmap",
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 8},
"targets": [
{
# ... (see EXAMPLES.md for complete configuration)
Panel-Auswahlhilfe:
Erwartet: Panels werden mit Daten korrekt gerendert, Visualisierungen entsprechen den beabsichtigten Metriktypen, Legenden beschreibend, Schwellenwerte heben Probleme hervor.
Bei Fehler:
Panels in zusammenfaltbare Reihen zur logischen Gruppierung organisieren.
{
"panels": [
{
"type": "row",
"title": "High-Level Metrics",
"collapsed": false,
# ... (see EXAMPLES.md for complete configuration)
Layout-Best-Practices:
w (Breite) und h (Hoehe) anErwartet: Dashboard-Layout logisch organisiert, Reihen klappen korrekt ein/aus, Panels richten sich optisch ohne Luecken aus.
Bei Fehler:
Navigationspfade zwischen verwandten Dashboards erstellen.
Dashboard-Level-Links in JSON:
{
"links": [
{
"title": "Service Details",
"type": "link",
"icon": "external link",
# ... (see EXAMPLES.md for complete configuration)
Panel-Level-Datenlinks:
{
"fieldConfig": {
"defaults": {
"links": [
{
"title": "View Logs for ${__field.labels.instance}",
# ... (see EXAMPLES.md for complete configuration)
Link-Variablen:
$service, $environment: Dashboard-Template-Variablen${__field.labels.instance}: Label-Wert aus dem angeklickten Datenpunkt${__from}, ${__to}: Aktueller Dashboard-Zeitbereich$__url_time_range: Kodierter Zeitbereich fuer URLErwartet: Das Klicken auf Panel-Elemente oder Dashboard-Links navigiert zu verwandten Ansichten, wobei der Kontext erhalten bleibt (Zeitbereich, Variablen).
Bei Fehler:
includeVars- und keepTime-Flags wie erwartet funktionierenDashboards als Code versionieren fuer reproduzierbare Deployments.
Provisioning-Verzeichnisstruktur erstellen:
mkdir -p /etc/grafana/provisioning/{dashboards,datasources}
Datenquellen-Provisioning (/etc/grafana/provisioning/datasources/prometheus.yml):
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
access: proxy
# ... (see EXAMPLES.md for complete configuration)
Dashboard-Provisioning (/etc/grafana/provisioning/dashboards/default.yml):
apiVersion: 1
providers:
- name: 'default'
orgId: 1
folder: 'Services'
type: file
disableDeletion: false
updateIntervalSeconds: 30
allowUiUpdates: true
options:
path: /var/lib/grafana/dashboards
foldersFromFilesStructure: true
Dashboard-JSON-Dateien in /var/lib/grafana/dashboards/ speichern:
/var/lib/grafana/dashboards/
├── api-service/
│ ├── overview.json
│ └── details.json
├── database/
│ └── postgres.json
└── infrastructure/
├── nodes.json
└── kubernetes.json
Mit Docker Compose:
version: '3.8'
services:
grafana:
image: grafana/grafana:10.2.0
ports:
- "3000:3000"
volumes:
- ./grafana/provisioning:/etc/grafana/provisioning
- ./grafana/dashboards:/var/lib/grafana/dashboards
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Viewer
Erwartet: Dashboards werden beim Grafana-Start automatisch geladen, Aenderungen an JSON-Dateien werden nach dem Aktualisierungsintervall uebernommen, Versionskontrolle verfolgt Dashboard-Aenderungen.
Bei Fehler:
docker logs grafana | grep -i provisioningpython -m json.tool dashboard.jsonchmod 644 *.jsonallowUiUpdates: false testen, um UI-Aenderungen zu verhinderncurl http://localhost:3000/api/admin/provisioning/dashboards/reload -X POST -H "Authorization: Bearer $GRAFANA_API_KEY"$variable-Syntax verwenden, keine fest codierten Werte. Variablen-Refresh-Einstellungen pruefen.legendFormat verwenden, um nur relevante Labels anzuzeigen, nicht den vollstaendigen Metriknamen. Beispiel: {{method}} - {{status}} statt Standard.allowUiUpdates: false verwenden.${__field.labels.labelname} sorgfaeltig verwenden und Label im Abfrageergebnis verifizieren.setup-prometheus-monitoring - Prometheus-Datenquellen konfigurieren, die Grafana-Dashboards speisenconfigure-log-aggregation - Loki fuer Log-Panel-Abfragen und Log-basierte Annotationen einrichtendefine-slo-sli-sla - SLO-Compliance und Fehlerbudgets mit Grafana-Stat- und Gauge-Panels visualisiereninstrument-distributed-tracing - Trace-ID-Links von Metrik-Panels zu Tempo-Trace-Ansichten hinzufuegentesting
Launch all available agents in parallel waves for open-ended hypothesis generation on problems where the correct domain is unknown. Use when facing a cross-domain problem with no clear starting point, when single-agent approaches have stalled, or when diverse perspectives are more valuable than deep expertise. Produces a ranked hypothesis set with convergence analysis and adversarial refinement.
tools
Write integration tests for a Node.js CLI application using the built-in node:test module. Covers the exec helper pattern, output assertions, filesystem state verification, cleanup hooks, JSON output parsing, error case testing, and state restoration after destructive tests. Use when adding tests to an existing CLI, testing a new command, verifying adapter behavior across frameworks, or setting up CI for a CLI tool.
development
Screen a proposed trademark for conflicts and distinctiveness before filing. Covers trademark database searches (TMview, WIPO Global Brand Database, USPTO TESS), distinctiveness analysis using the Abercrombie spectrum, likelihood of confusion assessment using DuPont factors and EUIPO relative grounds, common law rights evaluation, and goods/services overlap analysis. Produces a conflict report with a risk matrix. Use before adopting a new brand name, logo, or slogan — distinct from patent prior art search, which uses different databases, legal frameworks, and analysis methods.
tools
Scaffold a new CLI command using Commander.js with options, action handler, three output modes (human-readable, quiet, JSON), and optional ceremony variant. Covers command naming, option design, shared context patterns, error handling, and integration testing. Use when adding a command to an existing Commander.js CLI, designing a new CLI tool from scratch, or standardizing command structure across a multi-command CLI.