{ "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- Grafana --" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "target": { "limit": 100, "matchAny": false, "tags": [], "type": "dashboard" }, "type": "dashboard" } ] }, "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": 5, "links": [], "liveNow": false, "panels": [ { "datasource": { "type": "prometheus", "uid": "${prometheusds}" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "s" }, "overrides": [] }, "gridPos": { "h": 9, "w": 12, "x": 0, "y": 0 }, "id": 2, "options": { "legend": { "calcs": [ "lastNotNull" ], "displayMode": "table", "placement": "right", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "${prometheusds}" }, "editorMode": "code", "expr": "histogram_quantile(0.99, sum(rate(starlette_request_duration_seconds_bucket[2m])) by (le))", "interval": "", "legendFormat": "p99", "range": true, "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "${prometheusds}" }, "editorMode": "code", "expr": "histogram_quantile(0.95, sum(rate(starlette_request_duration_seconds_bucket[2m])) by (le))", "hide": false, "legendFormat": "p95", "range": true, "refId": "B" }, { "datasource": { "type": "prometheus", "uid": "${prometheusds}" }, "editorMode": "code", "expr": "histogram_quantile(0.9, sum(rate(starlette_request_duration_seconds_bucket[2m])) by (le))", "hide": false, "legendFormat": "p90", "range": true, "refId": "C" }, { "datasource": { "type": "prometheus", "uid": "${prometheusds}" }, "editorMode": "code", "expr": "histogram_quantile(0.75, sum(rate(starlette_request_duration_seconds_bucket[2m])) by (le))", "hide": false, "legendFormat": "p75", "range": true, "refId": "D" } ], "title": "HTTP Request Duration Percentiles", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "${prometheusds}" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "max": 100, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "yellow", "value": 30 }, { "color": "dark-red", "value": 80 } ] }, "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 9, "w": 5, "x": 12, "y": 0 }, "id": 6, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "pluginVersion": "9.2.1", "targets": [ { "datasource": { "type": "prometheus", "uid": "${prometheusds}" }, "editorMode": "code", "expr": "100 * sum(\n increase(starlette_requests_total{path!=\"/metrics\", status_code=~\"[45]..\"}[2m])\n ) / sum(\n increase(starlette_requests_total{path!=\"/metrics\"}[2m])\n )", "legendFormat": "4xx,5xx codes per 2min", "range": true, "refId": "A" } ], "title": "Percent of failed requests", "type": "timeseries" }, { "datasource": { "type": "loki", "uid": "${lokids}" }, "gridPos": { "h": 15, "w": 17, "x": 0, "y": 9 }, "id": 4, "options": { "dedupStrategy": "signature", "enableLogDetails": true, "prettifyLogMessage": false, "showCommonLabels": false, "showLabels": false, "showTime": false, "sortOrder": "Ascending", "wrapLogMessage": false }, "targets": [ { "datasource": { "type": "loki", "uid": "${lokids}" }, "editorMode": "builder", "expr": "{juju_charm=\"demo-api-charm\"} |= ``", "queryType": "range", "refId": "A" } ], "title": "FastAPI Logs", "type": "logs" } ], "refresh": "10s", "schemaVersion": 37, "style": "dark", "tags": [], "templating": { "list": [] }, "time": { "from": "now-1h", "to": "now" }, "timepicker": {}, "timezone": "", "title": "FastAPI Monitoring", "uid": "LPGoVNc4z", "version": 10, "weekStart": "" }