diff --git a/manifests/grafana-dashboards/assemply-dashboard.yaml b/manifests/grafana-dashboards/assemply-dashboard.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d39ed8a1837859487e763dfea7b4f082ea07d9b0 --- /dev/null +++ b/manifests/grafana-dashboards/assemply-dashboard.yaml @@ -0,0 +1,323 @@ +apiVersion: v1 +data: + assemply.json: |- + { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "limit": 100, + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 33, + "iteration": 1640959428297, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 26, + "panels": [], + "title": "Workadventure API", + "type": "row" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 11, + "w": 12, + "x": 0, + "y": 1 + }, + "id": 32, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "label_replace((sum by (room) (exneuland_cowboy_init_count{namespace=\"$environment\",room=~\"https://[^/]+/@/rc3_21/${assembly}/(.+)\"})) - (sum by (room) (exneuland_cowboy_terminate_count{namespace=\"$environment\",room=~\"https://[^/]+/@/rc3_21/${assembly}/(.+)\"})), \"roomslug\", \"$1\", \"room\", \"https://[^/]+/@/rc3_21/(.+)\")", + "interval": "", + "legendFormat": "{{roomslug}}", + "refId": "A" + } + ], + "title": "Sessions per Room", + "type": "timeseries" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 14, + "w": 6, + "x": 18, + "y": 1 + }, + "id": 34, + "options": { + "displayLabels": [], + "legend": { + "displayMode": "table", + "placement": "bottom", + "values": [ + "percent", + "value" + ] + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "label_replace((sum by (room) (exneuland_cowboy_init_count{namespace=\"$environment\",room=~\"https://[^/]+/@/rc3_21/${assembly}/(.+)\"})) - (sum by (room) (exneuland_cowboy_terminate_count{namespace=\"$environment\"})), \"roomslug\", \"$1\", \"room\", \"https://[^/]+/@/rc3_21/(.+)\")", + "interval": "", + "legendFormat": "{{roomslug}}", + "refId": "A" + } + ], + "title": "Popular Maps (now)", + "type": "piechart" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 13000 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 12 + }, + "id": 38, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "sum(exneuland_cowboy_init_count{namespace=\"$environment\",room=~\"https://[^/]+/@/rc3_21/${assembly}/(.+)\"})-sum(exneuland_cowboy_terminate_count{namespace=\"$environment\",room=~\"https://[^/]+/@/rc3_21/${assembly}/(.+)\"})", + "interval": "", + "legendFormat": "users", + "refId": "A" + } + ], + "title": "Total Users", + "type": "stat" + } + ], + "refresh": "", + "schemaVersion": 34, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "prod", + "value": "prod" + }, + "definition": "vm_memory_total", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "environment", + "options": [], + "query": { + "query": "vm_memory_total", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "/.*namespace=\"(?<value>\\w+)\".*/", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "lobby", + "value": "lobby" + }, + "definition": "exneuland_cowboy_init_count", + "hide": 0, + "includeAll": true, + "multi": true, + "name": "assembly", + "options": [], + "query": { + "query": "exneuland_cowboy_init_count", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "/.*room=\"https://visit.rc3.world/@/rc3_21/(?<value>[^/]+)/main.json\".*/", + "skipUrlSync": false, + "sort": 1, + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Assembly Metrics", + "uid": "hbS85407k", + "version": 6, + "weekStart": "" + } +kind: ConfigMap +metadata: + labels: + grafana_dashboard: assemply + name: grafana-assemply + namespace: monitoring