|
| 1 | +{ |
| 2 | + "title": "PayD Backend Overview", |
| 3 | + "uid": "payd-overview", |
| 4 | + "schemaVersion": 39, |
| 5 | + "version": 1, |
| 6 | + "refresh": "30s", |
| 7 | + "time": { "from": "now-1h", "to": "now" }, |
| 8 | + "tags": ["payd", "backend"], |
| 9 | + "panels": [ |
| 10 | + { |
| 11 | + "id": 1, |
| 12 | + "title": "HTTP Request Rate (req/s)", |
| 13 | + "type": "timeseries", |
| 14 | + "gridPos": { "x": 0, "y": 0, "w": 12, "h": 8 }, |
| 15 | + "targets": [ |
| 16 | + { |
| 17 | + "datasource": "Prometheus", |
| 18 | + "expr": "sum(rate(http_requests_total[1m])) by (method, route)", |
| 19 | + "legendFormat": "{{method}} {{route}}" |
| 20 | + } |
| 21 | + ] |
| 22 | + }, |
| 23 | + { |
| 24 | + "id": 2, |
| 25 | + "title": "HTTP Error Rate (4xx/5xx req/s)", |
| 26 | + "type": "timeseries", |
| 27 | + "gridPos": { "x": 12, "y": 0, "w": 12, "h": 8 }, |
| 28 | + "targets": [ |
| 29 | + { |
| 30 | + "datasource": "Prometheus", |
| 31 | + "expr": "sum(rate(http_request_errors_total[1m])) by (status_code)", |
| 32 | + "legendFormat": "HTTP {{status_code}}" |
| 33 | + } |
| 34 | + ] |
| 35 | + }, |
| 36 | + { |
| 37 | + "id": 3, |
| 38 | + "title": "P99 Request Latency (s)", |
| 39 | + "type": "timeseries", |
| 40 | + "gridPos": { "x": 0, "y": 8, "w": 12, "h": 8 }, |
| 41 | + "targets": [ |
| 42 | + { |
| 43 | + "datasource": "Prometheus", |
| 44 | + "expr": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket[5m])) by (le, route))", |
| 45 | + "legendFormat": "p99 {{route}}" |
| 46 | + } |
| 47 | + ] |
| 48 | + }, |
| 49 | + { |
| 50 | + "id": 4, |
| 51 | + "title": "P50 / P95 Latency", |
| 52 | + "type": "timeseries", |
| 53 | + "gridPos": { "x": 12, "y": 8, "w": 12, "h": 8 }, |
| 54 | + "targets": [ |
| 55 | + { |
| 56 | + "datasource": "Prometheus", |
| 57 | + "expr": "histogram_quantile(0.50, sum(rate(http_request_duration_seconds_bucket[5m])) by (le))", |
| 58 | + "legendFormat": "p50" |
| 59 | + }, |
| 60 | + { |
| 61 | + "datasource": "Prometheus", |
| 62 | + "expr": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket[5m])) by (le))", |
| 63 | + "legendFormat": "p95" |
| 64 | + } |
| 65 | + ] |
| 66 | + }, |
| 67 | + { |
| 68 | + "id": 5, |
| 69 | + "title": "Active Connections", |
| 70 | + "type": "stat", |
| 71 | + "gridPos": { "x": 0, "y": 16, "w": 4, "h": 4 }, |
| 72 | + "targets": [ |
| 73 | + { |
| 74 | + "datasource": "Prometheus", |
| 75 | + "expr": "active_connections", |
| 76 | + "legendFormat": "Active" |
| 77 | + } |
| 78 | + ] |
| 79 | + }, |
| 80 | + { |
| 81 | + "id": 6, |
| 82 | + "title": "Total Errors", |
| 83 | + "type": "stat", |
| 84 | + "gridPos": { "x": 4, "y": 16, "w": 4, "h": 4 }, |
| 85 | + "targets": [ |
| 86 | + { |
| 87 | + "datasource": "Prometheus", |
| 88 | + "expr": "sum(increase(errors_total[1h]))", |
| 89 | + "legendFormat": "Errors (1h)" |
| 90 | + } |
| 91 | + ] |
| 92 | + }, |
| 93 | + { |
| 94 | + "id": 7, |
| 95 | + "title": "Node.js Heap Used (MB)", |
| 96 | + "type": "timeseries", |
| 97 | + "gridPos": { "x": 8, "y": 16, "w": 8, "h": 8 }, |
| 98 | + "targets": [ |
| 99 | + { |
| 100 | + "datasource": "Prometheus", |
| 101 | + "expr": "nodejs_heap_size_used_bytes / 1024 / 1024", |
| 102 | + "legendFormat": "Heap used" |
| 103 | + }, |
| 104 | + { |
| 105 | + "datasource": "Prometheus", |
| 106 | + "expr": "nodejs_heap_size_total_bytes / 1024 / 1024", |
| 107 | + "legendFormat": "Heap total" |
| 108 | + } |
| 109 | + ] |
| 110 | + }, |
| 111 | + { |
| 112 | + "id": 8, |
| 113 | + "title": "DB Query Duration P99 (s)", |
| 114 | + "type": "timeseries", |
| 115 | + "gridPos": { "x": 16, "y": 16, "w": 8, "h": 8 }, |
| 116 | + "targets": [ |
| 117 | + { |
| 118 | + "datasource": "Prometheus", |
| 119 | + "expr": "histogram_quantile(0.99, sum(rate(db_query_duration_seconds_bucket[5m])) by (le, operation, table))", |
| 120 | + "legendFormat": "p99 {{operation}}/{{table}}" |
| 121 | + } |
| 122 | + ] |
| 123 | + }, |
| 124 | + { |
| 125 | + "id": 9, |
| 126 | + "title": "Payment Operations / min", |
| 127 | + "type": "timeseries", |
| 128 | + "gridPos": { "x": 0, "y": 24, "w": 12, "h": 8 }, |
| 129 | + "targets": [ |
| 130 | + { |
| 131 | + "datasource": "Prometheus", |
| 132 | + "expr": "sum(rate(payment_operations_total[1m])) by (status, type)", |
| 133 | + "legendFormat": "{{type}} — {{status}}" |
| 134 | + } |
| 135 | + ] |
| 136 | + }, |
| 137 | + { |
| 138 | + "id": 10, |
| 139 | + "title": "Auth Attempts / min", |
| 140 | + "type": "timeseries", |
| 141 | + "gridPos": { "x": 12, "y": 24, "w": 12, "h": 8 }, |
| 142 | + "targets": [ |
| 143 | + { |
| 144 | + "datasource": "Prometheus", |
| 145 | + "expr": "sum(rate(auth_attempts_total[1m])) by (method, status)", |
| 146 | + "legendFormat": "{{method}} — {{status}}" |
| 147 | + } |
| 148 | + ] |
| 149 | + } |
| 150 | + ] |
| 151 | +} |
0 commit comments