|
| 1 | +{ |
| 2 | + "annotations": { |
| 3 | + "list": [] |
| 4 | + }, |
| 5 | + "editable": true, |
| 6 | + "fiscalYearStartMonth": 0, |
| 7 | + "graphTooltip": 1, |
| 8 | + "links": [], |
| 9 | + "panels": [ |
| 10 | + { |
| 11 | + "title": "Request Rate by Endpoint", |
| 12 | + "type": "timeseries", |
| 13 | + "gridPos": { "h": 8, "w": 12, "x": 0, "y": 0 }, |
| 14 | + "datasource": { "type": "prometheus", "uid": "prometheus" }, |
| 15 | + "targets": [ |
| 16 | + { |
| 17 | + "expr": "sum(rate(http_requests_total[5m])) by (endpoint)", |
| 18 | + "legendFormat": "{{endpoint}}", |
| 19 | + "refId": "A" |
| 20 | + } |
| 21 | + ], |
| 22 | + "fieldConfig": { |
| 23 | + "defaults": { |
| 24 | + "unit": "reqps", |
| 25 | + "custom": { |
| 26 | + "drawStyle": "line", |
| 27 | + "lineWidth": 2, |
| 28 | + "fillOpacity": 20, |
| 29 | + "pointSize": 5, |
| 30 | + "showPoints": "auto" |
| 31 | + } |
| 32 | + }, |
| 33 | + "overrides": [] |
| 34 | + } |
| 35 | + }, |
| 36 | + { |
| 37 | + "title": "Error Rate (5xx)", |
| 38 | + "type": "timeseries", |
| 39 | + "gridPos": { "h": 8, "w": 12, "x": 12, "y": 0 }, |
| 40 | + "datasource": { "type": "prometheus", "uid": "prometheus" }, |
| 41 | + "targets": [ |
| 42 | + { |
| 43 | + "expr": "sum(rate(http_requests_total{status=~\"5..\"}[5m]))", |
| 44 | + "legendFormat": "5xx errors/s", |
| 45 | + "refId": "A" |
| 46 | + } |
| 47 | + ], |
| 48 | + "fieldConfig": { |
| 49 | + "defaults": { |
| 50 | + "unit": "reqps", |
| 51 | + "custom": { |
| 52 | + "drawStyle": "line", |
| 53 | + "lineWidth": 2, |
| 54 | + "fillOpacity": 20 |
| 55 | + }, |
| 56 | + "color": { "mode": "fixed", "fixedColor": "red" } |
| 57 | + }, |
| 58 | + "overrides": [] |
| 59 | + } |
| 60 | + }, |
| 61 | + { |
| 62 | + "title": "Request Duration p95", |
| 63 | + "type": "timeseries", |
| 64 | + "gridPos": { "h": 8, "w": 12, "x": 0, "y": 8 }, |
| 65 | + "datasource": { "type": "prometheus", "uid": "prometheus" }, |
| 66 | + "targets": [ |
| 67 | + { |
| 68 | + "expr": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket[5m])) by (le, endpoint))", |
| 69 | + "legendFormat": "p95 {{endpoint}}", |
| 70 | + "refId": "A" |
| 71 | + } |
| 72 | + ], |
| 73 | + "fieldConfig": { |
| 74 | + "defaults": { |
| 75 | + "unit": "s", |
| 76 | + "custom": { |
| 77 | + "drawStyle": "line", |
| 78 | + "lineWidth": 2, |
| 79 | + "fillOpacity": 10 |
| 80 | + } |
| 81 | + }, |
| 82 | + "overrides": [] |
| 83 | + } |
| 84 | + }, |
| 85 | + { |
| 86 | + "title": "Request Duration Heatmap", |
| 87 | + "type": "heatmap", |
| 88 | + "gridPos": { "h": 8, "w": 12, "x": 12, "y": 8 }, |
| 89 | + "datasource": { "type": "prometheus", "uid": "prometheus" }, |
| 90 | + "targets": [ |
| 91 | + { |
| 92 | + "expr": "sum(increase(http_request_duration_seconds_bucket[5m])) by (le)", |
| 93 | + "legendFormat": "{{le}}", |
| 94 | + "refId": "A", |
| 95 | + "format": "heatmap" |
| 96 | + } |
| 97 | + ], |
| 98 | + "options": { |
| 99 | + "calculate": false, |
| 100 | + "yAxis": { |
| 101 | + "unit": "s" |
| 102 | + }, |
| 103 | + "color": { |
| 104 | + "scheme": "Oranges" |
| 105 | + } |
| 106 | + } |
| 107 | + }, |
| 108 | + { |
| 109 | + "title": "Active Requests", |
| 110 | + "type": "timeseries", |
| 111 | + "gridPos": { "h": 8, "w": 8, "x": 0, "y": 16 }, |
| 112 | + "datasource": { "type": "prometheus", "uid": "prometheus" }, |
| 113 | + "targets": [ |
| 114 | + { |
| 115 | + "expr": "http_requests_in_progress", |
| 116 | + "legendFormat": "in-progress", |
| 117 | + "refId": "A" |
| 118 | + } |
| 119 | + ], |
| 120 | + "fieldConfig": { |
| 121 | + "defaults": { |
| 122 | + "unit": "short", |
| 123 | + "custom": { |
| 124 | + "drawStyle": "line", |
| 125 | + "lineWidth": 2, |
| 126 | + "fillOpacity": 30 |
| 127 | + }, |
| 128 | + "color": { "mode": "fixed", "fixedColor": "blue" } |
| 129 | + }, |
| 130 | + "overrides": [] |
| 131 | + } |
| 132 | + }, |
| 133 | + { |
| 134 | + "title": "Status Code Distribution", |
| 135 | + "type": "piechart", |
| 136 | + "gridPos": { "h": 8, "w": 8, "x": 8, "y": 16 }, |
| 137 | + "datasource": { "type": "prometheus", "uid": "prometheus" }, |
| 138 | + "targets": [ |
| 139 | + { |
| 140 | + "expr": "sum by (status) (rate(http_requests_total[5m]))", |
| 141 | + "legendFormat": "{{status}}", |
| 142 | + "refId": "A" |
| 143 | + } |
| 144 | + ], |
| 145 | + "options": { |
| 146 | + "legend": { |
| 147 | + "displayMode": "table", |
| 148 | + "placement": "right" |
| 149 | + }, |
| 150 | + "pieType": "pie" |
| 151 | + } |
| 152 | + }, |
| 153 | + { |
| 154 | + "title": "Service Uptime", |
| 155 | + "type": "stat", |
| 156 | + "gridPos": { "h": 8, "w": 8, "x": 16, "y": 16 }, |
| 157 | + "datasource": { "type": "prometheus", "uid": "prometheus" }, |
| 158 | + "targets": [ |
| 159 | + { |
| 160 | + "expr": "up{job=\"app\"}", |
| 161 | + "legendFormat": "app-python", |
| 162 | + "refId": "A" |
| 163 | + } |
| 164 | + ], |
| 165 | + "fieldConfig": { |
| 166 | + "defaults": { |
| 167 | + "mappings": [ |
| 168 | + { "type": "value", "options": { "0": { "text": "DOWN", "color": "red" }, "1": { "text": "UP", "color": "green" } } } |
| 169 | + ], |
| 170 | + "thresholds": { |
| 171 | + "mode": "absolute", |
| 172 | + "steps": [ |
| 173 | + { "color": "red", "value": null }, |
| 174 | + { "color": "green", "value": 1 } |
| 175 | + ] |
| 176 | + } |
| 177 | + }, |
| 178 | + "overrides": [] |
| 179 | + } |
| 180 | + } |
| 181 | + ], |
| 182 | + "schemaVersion": 39, |
| 183 | + "tags": ["app", "metrics", "RED"], |
| 184 | + "templating": { "list": [] }, |
| 185 | + "time": { "from": "now-30m", "to": "now" }, |
| 186 | + "timepicker": {}, |
| 187 | + "timezone": "browser", |
| 188 | + "title": "Application Metrics", |
| 189 | + "uid": "app-metrics", |
| 190 | + "version": 1 |
| 191 | +} |
0 commit comments