Skills · Infrastructure & ops

Grafana Dashboards

Unverified30/40

Create and manage production Grafana dashboards for real-time visualization of system and application metrics. Use when building monitoring dashboards, visualizing metrics, or creating operational observability interfaces.

Originally by wshobson · MIT

Claude CodePartialHas SKILL.md but declares no allowed-tools — Claude Code will ask for permission each time
CursorPartialPlain prose you can paste in — but no Cursor rules file
CodexPartialPlain prose you can paste in — but no AGENTS.md
Gemini CLIPartialPlain prose you can paste in
CopilotPartialPlain prose you can paste in — but no Copilot instructions file
npx agentalley add grafana-dashboards

This command does not work yet — the CLI is still being built. Until then, use Raw in the reader below to take the file.

Who is stuck, and on what

Create and manage production Grafana dashboards for real-time visualization of system and application metrics. Use when building monitoring dashboards, visualizing metrics, or creating operational observability interfaces.

The whole source

No sign-in, no blur, nothing truncated
grafana-dashboards/SKILL.md383 lines8.0 KBRawView on GitHub
Frontmatter — 2 properties
namegrafana-dashboards
descriptionCreate and manage production Grafana dashboards for real-time visualization of system and application metrics. Use when building monitoring dashboards, visualizing metrics, or creating operational observability interfaces.
1---
2name: grafana-dashboards
3description: Create and manage production Grafana dashboards for real-time visualization of system and application metrics. Use when building monitoring dashboards, visualizing metrics, or creating operational observability interfaces.
4---A5No allowed-tools declared — no way to tell what this skill may touch
5 
6# Grafana Dashboards
7 
8Create and manage production-ready Grafana dashboards for comprehensive system observability.
9 
10## Purpose
11 
12Design effective Grafana dashboards for monitoring applications, infrastructure, and business metrics.
13 
14## When to Use
15 
16- Visualize Prometheus metrics
17- Create custom dashboards
18- Implement SLO dashboards
19- Monitor infrastructure
20- Track business KPIs
21 
22## Dashboard Design Principles
23 
24### 1. Hierarchy of Information
25 
26```
27┌─────────────────────────────────────┐
28│ Critical Metrics (Big Numbers) │
29├─────────────────────────────────────┤
30│ Key Trends (Time Series) │
31├─────────────────────────────────────┤
32│ Detailed Metrics (Tables/Heatmaps) │
33└─────────────────────────────────────┘
34```
35 
36### 2. RED Method (Services)
37 
38- **Rate** - Requests per second
39- **Errors** - Error rate
40- **Duration** - Latency/response time
41 
42### 3. USE Method (Resources)
43 
44- **Utilization** - % time resource is busy
45- **Saturation** - Queue length/wait time
46- **Errors** - Error count
47 
48## Dashboard Structure
49 
50### API Monitoring Dashboard
51 
52```json
53{
54 "dashboard": {
55 "title": "API Monitoring",
56 "tags": ["api", "production"],
57 "timezone": "browser",
58 "refresh": "30s",
59 "panels": [
60 {
61 "title": "Request Rate",
62 "type": "graph",
63 "targets": [
64 {
65 "expr": "sum(rate(http_requests_total[5m])) by (service)",
66 "legendFormat": "{{service}}"
67 }
68 ],
69 "gridPos": { "x": 0, "y": 0, "w": 12, "h": 8 }
70 },
71 {
72 "title": "Error Rate %",
73 "type": "graph",
74 "targets": [
75 {
76 "expr": "(sum(rate(http_requests_total{status=~\"5..\"}[5m])) / sum(rate(http_requests_total[5m]))) * 100",
77 "legendFormat": "Error Rate"
78 }
79 ],
80 "alert": {
81 "conditions": [
82 {
83 "evaluator": { "params": [5], "type": "gt" },
84 "operator": { "type": "and" },
85 "query": { "params": ["A", "5m", "now"] },
86 "type": "query"
87 }
88 ]
89 },
90 "gridPos": { "x": 12, "y": 0, "w": 12, "h": 8 }
91 },
92 {
93 "title": "P95 Latency",
94 "type": "graph",
95 "targets": [
96 {
97 "expr": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket[5m])) by (le, service))",
98 "legendFormat": "{{service}}"
99 }
100 ],
101 "gridPos": { "x": 0, "y": 8, "w": 24, "h": 8 }
102 }
103 ]
104 }
105}
106```
107 
108**Reference:** See `assets/api-dashboard.json`
109 
110## Panel Types
111 
112### 1. Stat Panel (Single Value)
113 
114```json
115{
116 "type": "stat",
117 "title": "Total Requests",
118 "targets": [
119 {
120 "expr": "sum(http_requests_total)"
121 }
122 ],
123 "options": {
124 "reduceOptions": {
125 "values": false,
126 "calcs": ["lastNotNull"]
127 },
128 "orientation": "auto",
129 "textMode": "auto",
130 "colorMode": "value"
131 },
132 "fieldConfig": {
133 "defaults": {
134 "thresholds": {
135 "mode": "absolute",
136 "steps": [
137 { "value": 0, "color": "green" },
138 { "value": 80, "color": "yellow" },
139 { "value": 90, "color": "red" }
140 ]
141 }
142 }
143 }
144}
145```
146 
147### 2. Time Series Graph
148 
149```json
150{
151 "type": "graph",
152 "title": "CPU Usage",
153 "targets": [
154 {
155 "expr": "100 - (avg by (instance) (rate(node_cpu_seconds_total{mode=\"idle\"}[5m])) * 100)"
156 }
157 ],
158 "yaxes": [
159 { "format": "percent", "max": 100, "min": 0 },
160 { "format": "short" }
161 ]
162}
163```
164 
165### 3. Table Panel
166 
167```json
168{
169 "type": "table",
170 "title": "Service Status",
171 "targets": [
172 {
173 "expr": "up",
174 "format": "table",
175 "instant": true
176 }
177 ],
178 "transformations": [
179 {
180 "id": "organize",
181 "options": {
182 "excludeByName": { "Time": true },
183 "indexByName": {},
184 "renameByName": {
185 "instance": "Instance",
186 "job": "Service",
187 "Value": "Status"
188 }
189 }
190 }
191 ]
192}
193```
194 
195### 4. Heatmap
196 
197```json
198{
199 "type": "heatmap",
200 "title": "Latency Heatmap",
201 "targets": [
202 {
203 "expr": "sum(rate(http_request_duration_seconds_bucket[5m])) by (le)",
204 "format": "heatmap"
205 }
206 ],
207 "dataFormat": "tsbuckets",
208 "yAxis": {
209 "format": "s"
210 }
211}
212```
213 
214## Variables
215 
216### Query Variables
217 
218```json
219{
220 "templating": {
221 "list": [
222 {
223 "name": "namespace",
224 "type": "query",
225 "datasource": "Prometheus",
226 "query": "label_values(kube_pod_info, namespace)",
227 "refresh": 1,
228 "multi": false
229 },
230 {
231 "name": "service",
232 "type": "query",
233 "datasource": "Prometheus",
234 "query": "label_values(kube_service_info{namespace=\"$namespace\"}, service)",
235 "refresh": 1,
236 "multi": true
237 }
238 ]
239 }
240}
241```
242 
243### Use Variables in Queries
244 
245```
246sum(rate(http_requests_total{namespace="$namespace", service=~"$service"}[5m]))
247```
248 
249## Alerts in Dashboards
250 
251```json
252{
253 "alert": {
254 "name": "High Error Rate",
255 "conditions": [
256 {
257 "evaluator": {
258 "params": [5],
259 "type": "gt"
260 },
261 "operator": { "type": "and" },
262 "query": {
263 "params": ["A", "5m", "now"]
264 },
265 "reducer": { "type": "avg" },
266 "type": "query"
267 }
268 ],
269 "executionErrorState": "alerting",
270 "for": "5m",
271 "frequency": "1m",
272 "message": "Error rate is above 5%",
273 "noDataState": "no_data",
274 "notifications": [{ "uid": "slack-channel" }]
275 }
276}
277```
278 
279## Dashboard Provisioning
280 
281**dashboards.yml:**
282 
283```yaml
284apiVersion: 1
285 
286providers:
287 - name: "default"
288 orgId: 1
289 folder: "General"
290 type: file
291 disableDeletion: false
292 updateIntervalSeconds: 10
293 allowUiUpdates: true
294 options:
295 path: /etc/grafana/dashboards
296```
297 
298## Common Dashboard Patterns
299 
300### Infrastructure Dashboard
301 
302**Key Panels:**
303 
304- CPU utilization per node
305- Memory usage per node
306- Disk I/O
307- Network traffic
308- Pod count by namespace
309- Node status
310 
311**Reference:** See `assets/infrastructure-dashboard.json`
312 
313### Database Dashboard
314 
315**Key Panels:**
316 
317- Queries per second
318- Connection pool usage
319- Query latency (P50, P95, P99)
320- Active connections
321- Database size
322- Replication lag
323- Slow queries
324 
325**Reference:** See `assets/database-dashboard.json`
326 
327### Application Dashboard
328 
329**Key Panels:**
330 
331- Request rate
332- Error rate
333- Response time (percentiles)
334- Active users/sessions
335- Cache hit rate
336- Queue length
337 
338## Best Practices
339 
3401. **Start with templates** (Grafana community dashboards)
3412. **Use consistent naming** for panels and variables
3423. **Group related metrics** in rows
3434. **Set appropriate time ranges** (default: Last 6 hours)
3445. **Use variables** for flexibility
3456. **Add panel descriptions** for context
3467. **Configure units** correctly
3478. **Set meaningful thresholds** for colors
3489. **Use consistent colors** across dashboards
34910. **Test with different time ranges**
350 
351## Dashboard as Code
352 
353### Terraform Provisioning
354 
355```hcl
356resource "grafana_dashboard" "api_monitoring" {
357 config_json = file("${path.module}/dashboards/api-monitoring.json")
358 folder = grafana_folder.monitoring.id
359}
360 
361resource "grafana_folder" "monitoring" {
362 title = "Production Monitoring"
363}
364```
365 
366### Ansible Provisioning
367 
368```yaml
369- name: Deploy Grafana dashboards
370 copy:
371 src: "{{ item }}"
372 dest: /etc/grafana/dashboards/
373 with_fileglob:
374 - "dashboards/*.json"
375 notify: restart grafana
376```
377 
378 
379## Related Skills
380 
381- `prometheus-configuration` - For metric collection
382- `slo-implementation` - For SLO dashboards
383 

Reviews

Installed this one?Write the first review and take the Trailblazer badge.

Reviews only open after a real install, so this is empty — and we leave it empty rather than invent one.

Alternatives

Also in Infrastructure & ops