-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add public-samples/startup-metrics-hizlkn/infrastructure/monitoring/g…
…rafana-dashboards/api.json
- Loading branch information
1 parent
beeca1d
commit 28f875a
Showing
1 changed file
with
302 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,302 @@ | ||
{ | ||
"annotations": { | ||
"list": [ | ||
{ | ||
"builtIn": 1, | ||
"datasource": "-- Grafana --", | ||
"enable": true, | ||
"hide": true, | ||
"iconColor": "rgba(0, 211, 255, 1)", | ||
"name": "Annotations & Alerts", | ||
"type": "dashboard" | ||
} | ||
] | ||
}, | ||
"description": "API Performance Dashboard for Startup Metrics Benchmarking Platform", | ||
"editable": true, | ||
"gnetId": null, | ||
"graphTooltip": 0, | ||
"id": null, | ||
"iteration": 1, | ||
"links": [], | ||
"panels": [ | ||
{ | ||
"title": "API Request Rate", | ||
"type": "graph", | ||
"datasource": "Prometheus", | ||
"targets": [ | ||
{ | ||
"expr": "rate(http_requests_total[5m])", | ||
"legendFormat": "{{method}} {{path}}", | ||
"interval": "", | ||
"exemplar": true | ||
} | ||
], | ||
"gridPos": { | ||
"x": 0, | ||
"y": 0, | ||
"w": 12, | ||
"h": 8 | ||
}, | ||
"fill": 1, | ||
"fillGradient": 0, | ||
"linewidth": 1, | ||
"pointradius": 2, | ||
"legend": { | ||
"alignAsTable": true, | ||
"avg": true, | ||
"current": true, | ||
"max": true, | ||
"min": true, | ||
"show": true, | ||
"total": false, | ||
"values": true | ||
}, | ||
"aliasColors": {}, | ||
"bars": false, | ||
"dashLength": 10, | ||
"dashes": false, | ||
"spaceLength": 10, | ||
"stack": false, | ||
"steppedLine": false, | ||
"timeRegions": [] | ||
}, | ||
{ | ||
"title": "Response Time Distribution", | ||
"type": "heatmap", | ||
"datasource": "Prometheus", | ||
"targets": [ | ||
{ | ||
"expr": "rate(http_request_duration_seconds_bucket[5m])", | ||
"format": "heatmap", | ||
"interval": "", | ||
"legendFormat": "{{le}}" | ||
} | ||
], | ||
"gridPos": { | ||
"x": 12, | ||
"y": 0, | ||
"w": 12, | ||
"h": 8 | ||
}, | ||
"cards": { | ||
"cardPadding": null, | ||
"cardRound": null | ||
}, | ||
"color": { | ||
"cardColor": "#b4ff00", | ||
"colorScale": "linear", | ||
"colorScheme": "interpolateSpectral", | ||
"exponent": 0.5, | ||
"mode": "spectrum" | ||
}, | ||
"dataFormat": "tsbuckets", | ||
"yBucketBound": "auto" | ||
}, | ||
{ | ||
"title": "Error Rate by Status Code", | ||
"type": "graph", | ||
"datasource": "Prometheus", | ||
"targets": [ | ||
{ | ||
"expr": "sum(rate(http_requests_total{status=~\"5..|4..\"}[5m])) by (status)", | ||
"legendFormat": "{{status}}", | ||
"interval": "", | ||
"exemplar": true | ||
} | ||
], | ||
"gridPos": { | ||
"x": 0, | ||
"y": 8, | ||
"w": 12, | ||
"h": 8 | ||
}, | ||
"fill": 1, | ||
"fillGradient": 0, | ||
"linewidth": 1, | ||
"pointradius": 2, | ||
"legend": { | ||
"alignAsTable": true, | ||
"avg": true, | ||
"current": true, | ||
"max": true, | ||
"min": true, | ||
"show": true, | ||
"total": false, | ||
"values": true | ||
}, | ||
"aliasColors": { | ||
"5xx": "red", | ||
"4xx": "orange" | ||
}, | ||
"bars": false, | ||
"dashLength": 10, | ||
"dashes": false, | ||
"spaceLength": 10, | ||
"stack": false, | ||
"steppedLine": false, | ||
"thresholds": [ | ||
{ | ||
"colorMode": "critical", | ||
"fill": true, | ||
"line": true, | ||
"op": "gt", | ||
"value": 10, | ||
"visible": true | ||
} | ||
] | ||
}, | ||
{ | ||
"title": "System Uptime", | ||
"type": "stat", | ||
"datasource": "Prometheus", | ||
"targets": [ | ||
{ | ||
"expr": "avg_over_time(up{job=\"api\"}[24h]) * 100", | ||
"legendFormat": "Uptime %", | ||
"instant": true | ||
} | ||
], | ||
"gridPos": { | ||
"x": 12, | ||
"y": 8, | ||
"w": 6, | ||
"h": 4 | ||
}, | ||
"options": { | ||
"colorMode": "value", | ||
"graphMode": "area", | ||
"justifyMode": "auto", | ||
"orientation": "auto", | ||
"reduceOptions": { | ||
"calcs": ["lastNotNull"], | ||
"fields": "", | ||
"values": false | ||
}, | ||
"textMode": "auto" | ||
}, | ||
"fieldConfig": { | ||
"defaults": { | ||
"thresholds": { | ||
"mode": "absolute", | ||
"steps": [ | ||
{ "color": "red", "value": null }, | ||
{ "color": "orange", "value": 95 }, | ||
{ "color": "green", "value": 99.9 } | ||
] | ||
}, | ||
"unit": "percent", | ||
"decimals": 2 | ||
} | ||
} | ||
}, | ||
{ | ||
"title": "95th Percentile Response Time", | ||
"type": "gauge", | ||
"datasource": "Prometheus", | ||
"targets": [ | ||
{ | ||
"expr": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket[5m])) by (le))", | ||
"legendFormat": "P95 Response Time", | ||
"instant": true | ||
} | ||
], | ||
"gridPos": { | ||
"x": 18, | ||
"y": 8, | ||
"w": 6, | ||
"h": 4 | ||
}, | ||
"options": { | ||
"orientation": "auto", | ||
"reduceOptions": { | ||
"calcs": ["lastNotNull"], | ||
"fields": "", | ||
"values": false | ||
}, | ||
"showThresholdLabels": false, | ||
"showThresholdMarkers": true | ||
}, | ||
"fieldConfig": { | ||
"defaults": { | ||
"thresholds": { | ||
"mode": "absolute", | ||
"steps": [ | ||
{ "color": "green", "value": null }, | ||
{ "color": "orange", "value": 1 }, | ||
{ "color": "red", "value": 2 } | ||
] | ||
}, | ||
"unit": "s", | ||
"max": 5, | ||
"decimals": 2 | ||
} | ||
} | ||
} | ||
], | ||
"refresh": "10s", | ||
"schemaVersion": 36, | ||
"style": "dark", | ||
"tags": ["api", "performance", "monitoring", "sla"], | ||
"templating": { | ||
"list": [ | ||
{ | ||
"current": {}, | ||
"datasource": "Prometheus", | ||
"definition": "label_values(up{job=\"api\"}, instance)", | ||
"hide": 0, | ||
"includeAll": true, | ||
"label": "Instance", | ||
"multi": false, | ||
"name": "instance", | ||
"options": [], | ||
"query": "label_values(up{job=\"api\"}, instance)", | ||
"refresh": 2, | ||
"regex": "", | ||
"skipUrlSync": false, | ||
"sort": 1, | ||
"type": "query" | ||
}, | ||
{ | ||
"current": {}, | ||
"datasource": "Prometheus", | ||
"definition": "label_values(http_requests_total, path)", | ||
"hide": 0, | ||
"includeAll": true, | ||
"label": "Endpoint", | ||
"multi": true, | ||
"name": "endpoint", | ||
"options": [], | ||
"query": "label_values(http_requests_total, path)", | ||
"refresh": 2, | ||
"regex": "", | ||
"skipUrlSync": false, | ||
"sort": 1, | ||
"type": "query" | ||
} | ||
] | ||
}, | ||
"time": { | ||
"from": "now-6h", | ||
"to": "now" | ||
}, | ||
"timepicker": { | ||
"refresh_intervals": [ | ||
"5s", | ||
"10s", | ||
"30s", | ||
"1m", | ||
"5m", | ||
"15m", | ||
"30m", | ||
"1h", | ||
"2h", | ||
"1d" | ||
] | ||
}, | ||
"timezone": "browser", | ||
"title": "API Performance Dashboard", | ||
"uid": "api-performance", | ||
"version": 1, | ||
"weekStart": "" | ||
} |