1{ 2 "uid": "factory-realtime", 3 "title": "Factory — Realtime", 4 "tags": ["factory", "observability", "realtime"], 5 "timezone": "browser", 6 "schemaVersion": 39, 7 "version": 1, 8 "editable": true, 9 "refresh": "15s", 10 "time": { "from": "now-3h", "to": "now" }, 11 "panels": [ 12 { 13 "id": 1, 14 "type": "stat", 15 "title": "Active connections (process)", 16 "datasource": { "type": "prometheus", "uid": "factory-prometheus" }, 17 "gridPos": { "h": 4, "w": 4, "x": 0, "y": 0 }, 18 "fieldConfig": { "defaults": { "unit": "short", "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [] }, 19 "options": { "colorMode": "value", "graphMode": "area" }, 20 "targets": [ { "refId": "A", "expr": "sum(ws_active_connections{service_name=\"factory-realtime\"})", "legendFormat": "connections" } ] 21 }, 22 { 23 "id": 2, 24 "type": "stat", 25 "title": "Messages / s (5 m)", 26 "datasource": { "type": "prometheus", "uid": "factory-prometheus" }, 27 "gridPos": { "h": 4, "w": 4, "x": 4, "y": 0 }, 28 "fieldConfig": { "defaults": { "unit": "ops", "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [] }, 29 "options": { "colorMode": "value", "graphMode": "area" }, 30 "targets": [ { "refId": "A", "expr": "sum(rate(ws_messages_total{service_name=\"factory-realtime\"}[5m]))", "legendFormat": "msg/s" } ] 31 }, 32 { 33 "id": 3, 34 "type": "stat", 35 "title": "Live rooms", 36 "datasource": { "type": "prometheus", "uid": "factory-prometheus" }, 37 "gridPos": { "h": 4, "w": 4, "x": 8, "y": 0 }, 38 "fieldConfig": { "defaults": { "unit": "short", "thresholds": { "mode": "absolute", "steps": [ { "color": "blue", "value": null } ] } }, "overrides": [] }, 39 "options": { "colorMode": "value", "graphMode": "none" }, 40 "targets": [ { "refId": "A", "expr": "sum(ws_rooms{service_name=\"factory-realtime\"})", "legendFormat": "rooms" } ] 41 }, 42 { 43 "id": 4, 44 "type": "timeseries", 45 "title": "Active connections over time (per pod + total)", 46 "datasource": { "type": "prometheus", "uid": "factory-prometheus" }, 47 "gridPos": { "h": 8, "w": 12, "x": 0, "y": 4 }, 48 "fieldConfig": { "defaults": { "unit": "short", "custom": { "drawStyle": "line", "fillOpacity": 10 } }, "overrides": [] }, 49 "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, 50 "targets": [ 51 { "refId": "A", "expr": "ws_active_connections{service_name=\"factory-realtime\"}", "legendFormat": "{{pod}}" }, 52 { "refId": "B", "expr": "sum(ws_active_connections{service_name=\"factory-realtime\"})", "legendFormat": "TOTAL" } 53 ] 54 }, 55 { 56 "id": 5, 57 "type": "timeseries", 58 "title": "Connections per room (local registry)", 59 "datasource": { "type": "prometheus", "uid": "factory-prometheus" }, 60 "gridPos": { "h": 8, "w": 12, "x": 12, "y": 4 }, 61 "fieldConfig": { "defaults": { "unit": "short", "custom": { "drawStyle": "line" } }, "overrides": [] }, 62 "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, 63 "targets": [ { "refId": "A", "expr": "sum by (room) (ws_connections{service_name=\"factory-realtime\"})", "legendFormat": "{{room}}" } ] 64 }, 65 { 66 "id": 6, 67 "type": "timeseries", 68 "title": "Messages / s by frame type", 69 "datasource": { "type": "prometheus", "uid": "factory-prometheus" }, 70 "gridPos": { "h": 8, "w": 8, "x": 0, "y": 12 }, 71 "fieldConfig": { "defaults": { "unit": "ops", "custom": { "drawStyle": "line" } }, "overrides": [] }, 72 "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, 73 "targets": [ { "refId": "A", "expr": "sum by (frame) (rate(ws_messages_total{service_name=\"factory-realtime\"}[5m]))", "legendFormat": "{{frame}}" } ] 74 }, 75 { 76 "id": 7, 77 "type": "timeseries", 78 "title": "Drops / s by cause", 79 "datasource": { "type": "prometheus", "uid": "factory-prometheus" }, 80 "gridPos": { "h": 8, "w": 8, "x": 8, "y": 12 }, 81 "fieldConfig": { "defaults": { "unit": "ops", "custom": { "drawStyle": "bars" } }, "overrides": [] }, 82 "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, 83 "targets": [ { "refId": "A", "expr": "sum by (cause) (rate(ws_drops_total{service_name=\"factory-realtime\"}[5m]))", "legendFormat": "{{cause}}" } ] 84 }, 85 { 86 "id": 8, 87 "type": "timeseries", 88 "title": "Largest room occupancy + update-log size", 89 "datasource": { "type": "prometheus", "uid": "factory-prometheus" }, 90 "gridPos": { "h": 8, "w": 8, "x": 16, "y": 12 }, 91 "fieldConfig": { "defaults": { "unit": "short", "custom": { "drawStyle": "line" } }, "overrides": [] }, 92 "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, 93 "targets": [ 94 { "refId": "A", "expr": "sum by (room) (ws_room_peers{service_name=\"factory-realtime\"})", "legendFormat": "peers {{room}}" }, 95 { "refId": "B", "expr": "sum by (room) (ws_update_log_size{service_name=\"factory-realtime\"})", "legendFormat": "log {{room}}" } 96 ] 97 } 98 ] 99} 100