|
| 1 | +{ |
| 2 | + "annotations": { |
| 3 | + "list": [ |
| 4 | + { |
| 5 | + "builtIn": 1, |
| 6 | + "datasource": { "type": "grafana", "uid": "-- Grafana --" }, |
| 7 | + "enable": true, |
| 8 | + "hide": true, |
| 9 | + "iconColor": "rgba(0, 211, 255, 1)", |
| 10 | + "name": "Annotations & Alerts", |
| 11 | + "type": "dashboard" |
| 12 | + } |
| 13 | + ] |
| 14 | + }, |
| 15 | + "editable": true, |
| 16 | + "fiscalYearStartMonth": 0, |
| 17 | + "graphTooltip": 1, |
| 18 | + "id": null, |
| 19 | + "links": [], |
| 20 | + "panels": [ |
| 21 | + { |
| 22 | + "collapsed": false, |
| 23 | + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, |
| 24 | + "id": 100, |
| 25 | + "panels": [], |
| 26 | + "title": "System Resources (Threads & Connections) [$env]", |
| 27 | + "type": "row" |
| 28 | + }, |
| 29 | + { |
| 30 | + "datasource": { "type": "prometheus", "uid": "prometheus-default" }, |
| 31 | + "description": "API 서버의 Tomcat 스레드 상태 (Busy, Current, Max)", |
| 32 | + "fieldConfig": { |
| 33 | + "defaults": { |
| 34 | + "color": { "mode": "palette-classic" }, |
| 35 | + "custom": { "drawStyle": "line", "fillOpacity": 10, "lineWidth": 2 }, |
| 36 | + "unit": "short" |
| 37 | + } |
| 38 | + }, |
| 39 | + "gridPos": { "h": 8, "w": 12, "x": 0, "y": 1 }, |
| 40 | + "id": 1, |
| 41 | + "options": { |
| 42 | + "legend": { "calcs": ["lastNotNull", "max"], "displayMode": "table", "placement": "bottom" }, |
| 43 | + "tooltip": { "mode": "multi", "sort": "none" } |
| 44 | + }, |
| 45 | + "targets": [ |
| 46 | + { "expr": "tomcat_threads_busy_threads{env=\"$env\", role=\"api\"}", "legendFormat": "Busy: {{instance}}", "refId": "A" }, |
| 47 | + { "expr": "tomcat_threads_current_threads{env=\"$env\", role=\"api\"}", "legendFormat": "Current: {{instance}}", "refId": "B" }, |
| 48 | + { "expr": "tomcat_threads_config_max_threads{env=\"$env\", role=\"api\"}", "legendFormat": "Max: {{instance}}", "refId": "C" } |
| 49 | + ], |
| 50 | + "title": "API Tomcat Threads", |
| 51 | + "type": "timeseries" |
| 52 | + }, |
| 53 | + { |
| 54 | + "datasource": { "type": "prometheus", "uid": "prometheus-default" }, |
| 55 | + "description": "API 서버의 HikariCP 커넥션 풀 상태 (Active, Idle, Pending)", |
| 56 | + "fieldConfig": { |
| 57 | + "defaults": { |
| 58 | + "color": { "mode": "palette-classic" }, |
| 59 | + "custom": { "drawStyle": "line", "fillOpacity": 15, "lineWidth": 2 }, |
| 60 | + "unit": "short" |
| 61 | + } |
| 62 | + }, |
| 63 | + "gridPos": { "h": 8, "w": 12, "x": 12, "y": 1 }, |
| 64 | + "id": 3, |
| 65 | + "options": { |
| 66 | + "legend": { "calcs": ["lastNotNull", "max"], "displayMode": "table", "placement": "bottom" }, |
| 67 | + "tooltip": { "mode": "multi", "sort": "none" } |
| 68 | + }, |
| 69 | + "targets": [ |
| 70 | + { "expr": "hikaricp_connections_active{env=\"$env\", role=\"api\"}", "legendFormat": "Active: {{instance}}", "refId": "A" }, |
| 71 | + { "expr": "hikaricp_connections_idle{env=\"$env\", role=\"api\"}", "legendFormat": "Idle: {{instance}}", "refId": "B" }, |
| 72 | + { "expr": "hikaricp_connections_pending{env=\"$env\", role=\"api\"}", "legendFormat": "Pending: {{instance}}", "refId": "C" } |
| 73 | + ], |
| 74 | + "title": "API HikariCP Connections", |
| 75 | + "type": "timeseries" |
| 76 | + }, |
| 77 | + { |
| 78 | + "collapsed": false, |
| 79 | + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 9 }, |
| 80 | + "id": 101, |
| 81 | + "panels": [], |
| 82 | + "title": "Core Business Metrics (MQ & Defense) [$env]", |
| 83 | + "type": "row" |
| 84 | + }, |
| 85 | + { |
| 86 | + "datasource": { "type": "prometheus", "uid": "prometheus-default" }, |
| 87 | + "fieldConfig": { |
| 88 | + "defaults": { |
| 89 | + "color": { "mode": "palette-classic" }, |
| 90 | + "custom": { "drawStyle": "line", "fillOpacity": 10, "lineWidth": 2 }, |
| 91 | + "unit": "s" |
| 92 | + } |
| 93 | + }, |
| 94 | + "gridPos": { "h": 8, "w": 16, "x": 0, "y": 10 }, |
| 95 | + "id": 120, |
| 96 | + "options": { |
| 97 | + "legend": { "calcs": ["max", "lastNotNull"], "displayMode": "table", "placement": "bottom" }, |
| 98 | + "tooltip": { "mode": "single" } |
| 99 | + }, |
| 100 | + "targets": [ |
| 101 | + { "expr": "max(lesson_apply_latency_seconds_max{env=\"$env\"}) by (instance, instance_id)", "legendFormat": "Latency: {{instance}}", "refId": "A" } |
| 102 | + ], |
| 103 | + "title": "Async Processing Latency (Max)", |
| 104 | + "type": "timeseries" |
| 105 | + }, |
| 106 | + { |
| 107 | + "datasource": { "type": "prometheus", "uid": "prometheus-default" }, |
| 108 | + "fieldConfig": { |
| 109 | + "defaults": { |
| 110 | + "color": { "mode": "thresholds" }, |
| 111 | + "mappings": [], |
| 112 | + "thresholds": { |
| 113 | + "mode": "absolute", |
| 114 | + "steps": [ |
| 115 | + { "color": "green", "value": null }, |
| 116 | + { "color": "red", "value": 1 } |
| 117 | + ] |
| 118 | + } |
| 119 | + } |
| 120 | + }, |
| 121 | + "gridPos": { "h": 8, "w": 8, "x": 16, "y": 10 }, |
| 122 | + "id": 121, |
| 123 | + "options": { |
| 124 | + "colorMode": "value", |
| 125 | + "graphMode": "area", |
| 126 | + "justifyMode": "auto", |
| 127 | + "orientation": "auto", |
| 128 | + "reduceOptions": { "calcs": ["sum"], "fields": "", "values": false }, |
| 129 | + "textMode": "auto" |
| 130 | + }, |
| 131 | + "targets": [ |
| 132 | + { "expr": "sum(lesson_apply_total{env=\"$env\", result=\"pre_filter_reject\"})", "legendFormat": "Rejected Total", "refId": "A" } |
| 133 | + ], |
| 134 | + "title": "[Defend] Pre-filter Reject Count", |
| 135 | + "type": "stat" |
| 136 | + }, |
| 137 | + { |
| 138 | + "collapsed": false, |
| 139 | + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 18 }, |
| 140 | + "id": 102, |
| 141 | + "panels": [], |
| 142 | + "title": "Throughput & Latency (HTTP) [$env]", |
| 143 | + "type": "row" |
| 144 | + }, |
| 145 | + { |
| 146 | + "datasource": { "type": "prometheus", "uid": "prometheus-default" }, |
| 147 | + "fieldConfig": { |
| 148 | + "defaults": { |
| 149 | + "color": { "mode": "palette-classic" }, |
| 150 | + "custom": { "drawStyle": "line", "lineWidth": 2 }, |
| 151 | + "unit": "reqps" |
| 152 | + } |
| 153 | + }, |
| 154 | + "gridPos": { "h": 8, "w": 12, "x": 0, "y": 19 }, |
| 155 | + "id": 4, |
| 156 | + "targets": [ |
| 157 | + { "expr": "sum(rate(http_server_requests_seconds_count{env=\"$env\"}[1m])) by (uri, instance)", "legendFormat": "{{uri}} ({{instance}})", "refId": "A" } |
| 158 | + ], |
| 159 | + "title": "Request Throughput (RPS)", |
| 160 | + "type": "timeseries" |
| 161 | + }, |
| 162 | + { |
| 163 | + "datasource": { "type": "prometheus", "uid": "prometheus-default" }, |
| 164 | + "fieldConfig": { |
| 165 | + "defaults": { |
| 166 | + "color": { "mode": "palette-classic" }, |
| 167 | + "custom": { "drawStyle": "line", "lineWidth": 2 }, |
| 168 | + "unit": "s" |
| 169 | + } |
| 170 | + }, |
| 171 | + "gridPos": { "h": 8, "w": 12, "x": 12, "y": 19 }, |
| 172 | + "id": 5, |
| 173 | + "targets": [ |
| 174 | + { "expr": "rate(http_server_requests_seconds_sum{env=\"$env\"}[1m]) / rate(http_server_requests_seconds_count{env=\"$env\"}[1m])", "legendFormat": "{{uri}} ({{instance}})", "refId": "A" } |
| 175 | + ], |
| 176 | + "title": "Average Response Time", |
| 177 | + "type": "timeseries" |
| 178 | + } |
| 179 | + ], |
| 180 | + "refresh": "5s", |
| 181 | + "schemaVersion": 40, |
| 182 | + "templating": { |
| 183 | + "list": [ |
| 184 | + { |
| 185 | + "current": { "selected": true, "text": "production", "value": "production" }, |
| 186 | + "hide": 0, |
| 187 | + "includeAll": false, |
| 188 | + "label": "Environment", |
| 189 | + "multi": false, |
| 190 | + "name": "env", |
| 191 | + "options": [ |
| 192 | + { "selected": true, "text": "production", "value": "production" }, |
| 193 | + { "selected": false, "text": "baseline", "value": "baseline" } |
| 194 | + ], |
| 195 | + "query": "production,baseline", |
| 196 | + "type": "custom" |
| 197 | + } |
| 198 | + ] |
| 199 | + }, |
| 200 | + "time": { "from": "now-15m", "to": "now" }, |
| 201 | + "title": "TrainUs Master Dashboard", |
| 202 | + "uid": "trainus-master-v1", |
| 203 | + "version": 4 |
| 204 | +} |
0 commit comments