{ "uid": "factory-realtime", "title": "Factory — Realtime", "tags": ["factory", "observability", "realtime"], "timezone": "browser", "schemaVersion": 39, "version": 1, "editable": true, "refresh": "15s", "time": { "from": "now-3h", "to": "now" }, "panels": [ { "id": 1, "type": "stat", "title": "Active connections (process)", "datasource": { "type": "prometheus", "uid": "factory-prometheus" }, "gridPos": { "h": 4, "w": 4, "x": 0, "y": 0 }, "fieldConfig": { "defaults": { "unit": "short", "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [] }, "options": { "colorMode": "value", "graphMode": "area" }, "targets": [ { "refId": "A", "expr": "sum(ws_active_connections{service_name=\"factory-realtime\"})", "legendFormat": "connections" } ] }, { "id": 2, "type": "stat", "title": "Messages / s (5 m)", "datasource": { "type": "prometheus", "uid": "factory-prometheus" }, "gridPos": { "h": 4, "w": 4, "x": 4, "y": 0 }, "fieldConfig": { "defaults": { "unit": "ops", "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [] }, "options": { "colorMode": "value", "graphMode": "area" }, "targets": [ { "refId": "A", "expr": "sum(rate(ws_messages_total{service_name=\"factory-realtime\"}[5m]))", "legendFormat": "msg/s" } ] }, { "id": 3, "type": "stat", "title": "Live rooms", "datasource": { "type": "prometheus", "uid": "factory-prometheus" }, "gridPos": { "h": 4, "w": 4, "x": 8, "y": 0 }, "fieldConfig": { "defaults": { "unit": "short", "thresholds": { "mode": "absolute", "steps": [ { "color": "blue", "value": null } ] } }, "overrides": [] }, "options": { "colorMode": "value", "graphMode": "none" }, "targets": [ { "refId": "A", "expr": "sum(ws_rooms{service_name=\"factory-realtime\"})", "legendFormat": "rooms" } ] }, { "id": 4, "type": "timeseries", "title": "Active connections over time (per pod + total)", "datasource": { "type": "prometheus", "uid": "factory-prometheus" }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 4 }, "fieldConfig": { "defaults": { "unit": "short", "custom": { "drawStyle": "line", "fillOpacity": 10 } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, "targets": [ { "refId": "A", "expr": "ws_active_connections{service_name=\"factory-realtime\"}", "legendFormat": "{{pod}}" }, { "refId": "B", "expr": "sum(ws_active_connections{service_name=\"factory-realtime\"})", "legendFormat": "TOTAL" } ] }, { "id": 5, "type": "timeseries", "title": "Connections per room (local registry)", "datasource": { "type": "prometheus", "uid": "factory-prometheus" }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 4 }, "fieldConfig": { "defaults": { "unit": "short", "custom": { "drawStyle": "line" } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, "targets": [ { "refId": "A", "expr": "sum by (room) (ws_connections{service_name=\"factory-realtime\"})", "legendFormat": "{{room}}" } ] }, { "id": 6, "type": "timeseries", "title": "Messages / s by frame type", "datasource": { "type": "prometheus", "uid": "factory-prometheus" }, "gridPos": { "h": 8, "w": 8, "x": 0, "y": 12 }, "fieldConfig": { "defaults": { "unit": "ops", "custom": { "drawStyle": "line" } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, "targets": [ { "refId": "A", "expr": "sum by (frame) (rate(ws_messages_total{service_name=\"factory-realtime\"}[5m]))", "legendFormat": "{{frame}}" } ] }, { "id": 7, "type": "timeseries", "title": "Drops / s by cause", "datasource": { "type": "prometheus", "uid": "factory-prometheus" }, "gridPos": { "h": 8, "w": 8, "x": 8, "y": 12 }, "fieldConfig": { "defaults": { "unit": "ops", "custom": { "drawStyle": "bars" } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, "targets": [ { "refId": "A", "expr": "sum by (cause) (rate(ws_drops_total{service_name=\"factory-realtime\"}[5m]))", "legendFormat": "{{cause}}" } ] }, { "id": 8, "type": "timeseries", "title": "Largest room occupancy + update-log size", "datasource": { "type": "prometheus", "uid": "factory-prometheus" }, "gridPos": { "h": 8, "w": 8, "x": 16, "y": 12 }, "fieldConfig": { "defaults": { "unit": "short", "custom": { "drawStyle": "line" } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, "targets": [ { "refId": "A", "expr": "sum by (room) (ws_room_peers{service_name=\"factory-realtime\"})", "legendFormat": "peers {{room}}" }, { "refId": "B", "expr": "sum by (room) (ws_update_log_size{service_name=\"factory-realtime\"})", "legendFormat": "log {{room}}" } ] } ] }