{
  "uid": "rtgs-overview",
  "title": "RTGS Overview",
  "tags": ["rtgs"],
  "timezone": "browser",
  "schemaVersion": 39,
  "version": 1,
  "refresh": "5s",
  "time": { "from": "now-15m", "to": "now" },
  "templating": { "list": [] },
  "annotations": { "list": [] },
  "panels": [
    {
      "id": 1, "type": "timeseries", "title": "접수 TPS (Chanel /pay)",
      "datasource": { "type": "prometheus", "uid": "rtgs-prom" },
      "gridPos": { "h": 8, "w": 12, "x": 0, "y": 0 },
      "fieldConfig": { "defaults": { "unit": "reqps" }, "overrides": [] },
      "targets": [ { "refId": "A", "datasource": { "type": "prometheus", "uid": "rtgs-prom" }, "expr": "sum(rate(http_server_requests_seconds_count{uri=\"/pay/customer\"}[1m]))", "legendFormat": "접수/초" } ]
    },
    {
      "id": 2, "type": "timeseries", "title": "접수 지연 p95 (s)",
      "datasource": { "type": "prometheus", "uid": "rtgs-prom" },
      "gridPos": { "h": 8, "w": 12, "x": 12, "y": 0 },
      "fieldConfig": { "defaults": { "unit": "s" }, "overrides": [] },
      "targets": [ { "refId": "A", "datasource": { "type": "prometheus", "uid": "rtgs-prom" }, "expr": "histogram_quantile(0.95, sum by (le) (rate(http_server_requests_seconds_bucket{uri=\"/pay/customer\"}[5m])))", "legendFormat": "p95" } ]
    },
    {
      "id": 3, "type": "timeseries", "title": "정산 처리율 (Hermes, status별)",
      "datasource": { "type": "prometheus", "uid": "rtgs-prom" },
      "gridPos": { "h": 8, "w": 12, "x": 0, "y": 8 },
      "fieldConfig": { "defaults": { "unit": "ops" }, "overrides": [] },
      "targets": [ { "refId": "A", "datasource": { "type": "prometheus", "uid": "rtgs-prom" }, "expr": "sum by (status) (rate(rtgs_settlements_total[1m]))", "legendFormat": "{{status}}" } ]
    },
    {
      "id": 4, "type": "timeseries", "title": "정산 지연 p95 (Hermes)",
      "datasource": { "type": "prometheus", "uid": "rtgs-prom" },
      "gridPos": { "h": 8, "w": 12, "x": 12, "y": 8 },
      "fieldConfig": { "defaults": { "unit": "s" }, "overrides": [] },
      "targets": [ { "refId": "A", "datasource": { "type": "prometheus", "uid": "rtgs-prom" }, "expr": "histogram_quantile(0.95, sum by (le) (rate(rtgs_settle_seconds_bucket[5m])))", "legendFormat": "p95" } ]
    },
    {
      "id": 5, "type": "timeseries", "title": "Kafka Consumer Lag",
      "datasource": { "type": "prometheus", "uid": "rtgs-prom" },
      "gridPos": { "h": 8, "w": 12, "x": 0, "y": 16 },
      "fieldConfig": { "defaults": { "unit": "short" }, "overrides": [] },
      "targets": [ { "refId": "A", "datasource": { "type": "prometheus", "uid": "rtgs-prom" }, "expr": "sum by (service) (kafka_consumer_fetch_manager_records_lag)", "legendFormat": "{{service}}" } ]
    },
    {
      "id": 6, "type": "timeseries", "title": "JVM Heap 사용 (service별)",
      "datasource": { "type": "prometheus", "uid": "rtgs-prom" },
      "gridPos": { "h": 8, "w": 12, "x": 12, "y": 16 },
      "fieldConfig": { "defaults": { "unit": "bytes" }, "overrides": [] },
      "targets": [ { "refId": "A", "datasource": { "type": "prometheus", "uid": "rtgs-prom" }, "expr": "sum by (service) (jvm_memory_used_bytes{area=\"heap\"})", "legendFormat": "{{service}}" } ]
    },
    {
      "id": 7, "type": "stat", "title": "완결 누계 (Prada, status별)",
      "datasource": { "type": "prometheus", "uid": "rtgs-prom" },
      "gridPos": { "h": 6, "w": 24, "x": 0, "y": 24 },
      "fieldConfig": { "defaults": { "unit": "short" }, "overrides": [] },
      "targets": [ { "refId": "A", "datasource": { "type": "prometheus", "uid": "rtgs-prom" }, "expr": "sum by (status) (rtgs_finality_total)", "legendFormat": "{{status}}" } ]
    }
  ]
}
