diff --git a/dbrepo-dashboard-service/dashboards/system.json b/dbrepo-dashboard-service/dashboards/system.json index 4eb40a1a2ea5311ed634f406f0603e82d4c1ee91..abb4b61243d65dd3f3a8c3d2f4b53c8e87863575 100644 --- a/dbrepo-dashboard-service/dashboards/system.json +++ b/dbrepo-dashboard-service/dashboards/system.json @@ -18,6 +18,7 @@ "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 1, + "id": 3, "links": [ { "asDropdown": false, @@ -92,7 +93,7 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "11.2.2", + "pluginVersion": "10.4.9", "targets": [ { "datasource": { @@ -160,7 +161,7 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "11.2.2", + "pluginVersion": "10.4.9", "targets": [ { "datasource": { @@ -276,7 +277,7 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "11.2.2", + "pluginVersion": "10.4.9", "targets": [ { "datasource": { @@ -306,18 +307,17 @@ "x": 0, "y": 4 }, - "id": 2, + "id": 22, "panels": [], - "title": "Services", + "title": "UI", "type": "row" }, { "datasource": { - "default": true, "type": "prometheus", "uid": "P18F45E9DC7E75912" }, - "description": "Quality of Service", + "description": "", "fieldConfig": { "defaults": { "mappings": [], @@ -327,38 +327,34 @@ "mode": "absolute", "steps": [ { - "color": "purple", + "color": "green", "value": null }, { - "color": "red", - "value": 0 + "color": "#EAB839", + "value": 300 }, { "color": "orange", - "value": 60 - }, - { - "color": "#EAB839", - "value": 80 + "value": 600 }, { - "color": "green", - "value": 100 + "color": "red", + "value": 900 } ] }, - "unit": "percent" + "unit": "ms" }, "overrides": [] }, "gridPos": { - "h": 4, + "h": 3, "w": 4, "x": 0, "y": 5 }, - "id": 9, + "id": 17, "options": { "colorMode": "background", "graphMode": "none", @@ -376,7 +372,7 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "11.2.2", + "pluginVersion": "10.4.9", "targets": [ { "datasource": { @@ -385,17 +381,17 @@ }, "disableTextWrap": false, "editorMode": "code", - "expr": "sum(up)*100/count(up)", + "expr": "avg(page_render_time)", "fullMetaSearch": false, "includeNullMetadata": true, "instant": false, - "legendFormat": "Services Running", + "legendFormat": "__auto", "range": true, "refId": "A", "useBackend": false } ], - "title": "QoS", + "title": "UI Response Time (avg)", "type": "stat" }, { @@ -403,72 +399,132 @@ "type": "prometheus", "uid": "P18F45E9DC7E75912" }, + "description": "", "fieldConfig": { "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "fillOpacity": 70, - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1 - }, - "mappings": [ - { - "options": { - "0": { - "index": 0, - "text": "DOWN" - }, - "1": { - "index": 1, - "text": "UP" - } - }, - "type": "value" - } - ], + "mappings": [], + "max": 100, + "min": 0, "thresholds": { "mode": "absolute", "steps": [ { - "color": "red", + "color": "green", "value": null }, { - "color": "green", - "value": 1 + "color": "#EAB839", + "value": 0.02 + }, + { + "color": "orange", + "value": 0.05 + }, + { + "color": "red", + "value": 0.1 } ] - } + }, + "unit": "s" }, "overrides": [] }, "gridPos": { - "h": 8, - "w": 20, + "h": 3, + "w": 4, "x": 4, "y": 5 }, - "id": 16, + "id": 24, "options": { - "colWidth": 0.9, - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": false + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "rowHeight": 0.9, - "showValue": "auto", - "tooltip": { - "mode": "single", - "sort": "none" + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.4.9", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "P18F45E9DC7E75912" + }, + "disableTextWrap": false, + "editorMode": "code", + "expr": "nodejs_eventloop_lag_mean_seconds", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false } + ], + "title": "UI Event Lag (avg)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "P18F45E9DC7E75912" + }, + "description": "", + "fieldConfig": { + "defaults": { + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 8, + "y": 5 + }, + "id": 25, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true }, + "pluginVersion": "10.4.9", "targets": [ { "datasource": { @@ -476,26 +532,26 @@ "uid": "P18F45E9DC7E75912" }, "disableTextWrap": false, - "editorMode": "builder", - "expr": "up", + "editorMode": "code", + "expr": "nodejs_active_handles{type=\"Server\"}", "fullMetaSearch": false, "includeNullMetadata": true, "instant": false, - "legendFormat": "{{instance}}", + "legendFormat": "__auto", "range": true, "refId": "A", "useBackend": false } ], - "title": "Service QoS", - "type": "status-history" + "title": "UI Servers", + "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "P18F45E9DC7E75912" }, - "description": "Total used disk space in Storage Service", + "description": "", "fieldConfig": { "defaults": { "mappings": [], @@ -510,17 +566,17 @@ } ] }, - "unit": "decbytes" + "unit": "none" }, "overrides": [] }, "gridPos": { - "h": 4, + "h": 3, "w": 4, - "x": 0, - "y": 9 + "x": 12, + "y": 5 }, - "id": 17, + "id": 26, "options": { "colorMode": "background", "graphMode": "none", @@ -534,11 +590,527 @@ "fields": "", "values": false }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.4.9", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "P18F45E9DC7E75912" + }, + "disableTextWrap": false, + "editorMode": "code", + "expr": "nodejs_active_handles{type=\"Socket\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "UI Sockets", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "P18F45E9DC7E75912" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "fixed" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 16, + "y": 5 + }, + "id": 27, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.4.9", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "P18F45E9DC7E75912" + }, + "disableTextWrap": false, + "editorMode": "code", + "expr": "nodejs_active_requests_total", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "Active Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "P18F45E9DC7E75912" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 300 + }, + { + "color": "orange", + "value": 600 + }, + { + "color": "red", + "value": 900 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 20, + "options": { + "displayMode": "basic", + "maxVizHeight": 300, + "minVizHeight": 16, + "minVizWidth": 8, + "namePlacement": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "sizing": "auto", + "valueMode": "color" + }, + "pluginVersion": "10.4.9", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "P18F45E9DC7E75912" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "page_render_time", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "{{path}}", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "UI Response Time per Path (avg)", + "type": "bargauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "P18F45E9DC7E75912" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 256000000 + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 21, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "P18F45E9DC7E75912" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "nodejs_heap_space_size_total_bytes", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "{{space}}", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "NodeJS Heap Bytes", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 15 + }, + "id": 2, + "panels": [], + "title": "Services", + "type": "row" + }, + { + "datasource": { + "default": true, + "type": "prometheus", + "uid": "P18F45E9DC7E75912" + }, + "description": "Quality of Service", + "fieldConfig": { + "defaults": { + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "purple", + "value": null + }, + { + "color": "red", + "value": 0 + }, + { + "color": "orange", + "value": 60 + }, + { + "color": "#EAB839", + "value": 80 + }, + { + "color": "green", + "value": 100 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 0, + "y": 16 + }, + "id": 9, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.4.9", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "P18F45E9DC7E75912" + }, + "disableTextWrap": false, + "editorMode": "code", + "expr": "sum(up)*100/count(up)", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "Services Running", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "QoS", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "P18F45E9DC7E75912" + }, + "description": "", + "fieldConfig": { + "defaults": { + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 4, + "y": 16 + }, + "id": 28, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.4.9", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "P18F45E9DC7E75912" + }, + "disableTextWrap": false, + "editorMode": "code", + "expr": "min(process_uptime_seconds)", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "Uptime", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "P18F45E9DC7E75912" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "fillOpacity": 70, + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 1 + }, + "mappings": [ + { + "options": { + "0": { + "index": 0, + "text": "DOWN" + }, + "1": { + "index": 1, + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 16, + "options": { + "colWidth": 0.9, + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "rowHeight": 0.9, + "showValue": "auto", + "tooltip": { + "mode": "single", + "sort": "none" + } }, - "pluginVersion": "11.2.2", "targets": [ { "datasource": { @@ -546,25 +1118,26 @@ "uid": "P18F45E9DC7E75912" }, "disableTextWrap": false, - "editorMode": "code", - "expr": "SeaweedFS_volumeServer_total_disk_size", + "editorMode": "builder", + "expr": "up", "fullMetaSearch": false, "includeNullMetadata": true, "instant": false, - "legendFormat": "__auto", + "legendFormat": "{{instance}}", "range": true, "refId": "A", "useBackend": false } ], - "title": "S3 Volume", - "type": "stat" + "title": "Service QoS", + "type": "status-history" }, { "datasource": { "type": "prometheus", "uid": "P18F45E9DC7E75912" }, + "description": "", "fieldConfig": { "defaults": { "color": { @@ -577,9 +1150,8 @@ "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, - "barWidthFactor": 0.6, "drawStyle": "line", - "fillOpacity": 25, + "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, @@ -597,7 +1169,7 @@ "spanNulls": false, "stacking": { "group": "A", - "mode": "normal" + "mode": "none" }, "thresholdsStyle": { "mode": "off" @@ -616,79 +1188,17 @@ "value": 80 } ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "auth-service:8080" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "yellow", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "data-service:8080" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "blue", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "metadata-service:8080" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "purple", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "metadata-service:80" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "blue", - "mode": "fixed" - } - } - ] } - ] + }, + "overrides": [] }, "gridPos": { "h": 7, "w": 12, "x": 0, - "y": 13 + "y": 19 }, - "id": 6, + "id": 23, "options": { "legend": { "calcs": [], @@ -701,7 +1211,7 @@ "sort": "none" } }, - "pluginVersion": "11.2.0", + "pluginVersion": "10.4.9", "targets": [ { "datasource": { @@ -709,19 +1219,18 @@ "uid": "P18F45E9DC7E75912" }, "disableTextWrap": false, - "editorMode": "builder", - "expr": "process_cpu_usage", + "editorMode": "code", + "expr": "process_open_fds\n", "fullMetaSearch": false, - "hide": false, "includeNullMetadata": true, "instant": false, "legendFormat": "{{instance}}", "range": true, - "refId": "process_cpu_usage", + "refId": "process_open_fds", "useBackend": false } ], - "title": "CPU Usage", + "title": "File Descriptors", "type": "timeseries" }, { @@ -743,7 +1252,6 @@ "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, - "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 25, "gradientMode": "none", @@ -774,8 +1282,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" } ] }, @@ -848,7 +1355,7 @@ "h": 7, "w": 12, "x": 12, - "y": 13 + "y": 23 }, "id": 7, "options": { @@ -903,7 +1410,6 @@ "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, - "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 25, "gradientMode": "none", @@ -923,7 +1429,7 @@ "spanNulls": false, "stacking": { "group": "A", - "mode": "none" + "mode": "normal" }, "thresholdsStyle": { "mode": "off" @@ -934,24 +1440,27 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" + }, + { + "color": "red", + "value": 80 } ] }, - "unit": "reqps" + "unit": "none" }, "overrides": [ { "matcher": { - "id": "byRegexp", - "options": "/.*search-service.*/" + "id": "byName", + "options": "auth-service:8080" }, "properties": [ { "id": "color", "value": { - "fixedColor": "orange", + "fixedColor": "yellow", "mode": "fixed" } } @@ -959,14 +1468,44 @@ }, { "matcher": { - "id": "byRegexp", - "options": "/.*analyse-service.*/" + "id": "byName", + "options": "data-service:8080" }, "properties": [ { "id": "color", "value": { - "fixedColor": "super-light-orange", + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "metadata-service:8080" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "metadata-service:80" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", "mode": "fixed" } } @@ -978,9 +1517,9 @@ "h": 7, "w": 12, "x": 0, - "y": 20 + "y": 26 }, - "id": 18, + "id": 6, "options": { "legend": { "calcs": [], @@ -993,21 +1532,27 @@ "sort": "none" } }, + "pluginVersion": "11.2.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "P18F45E9DC7E75912" }, - "editorMode": "code", - "expr": "rate(flask_http_request_duration_seconds_count{status=~\"200|201|202\",path!=\"/health\"}[$__rate_interval])", + "disableTextWrap": false, + "editorMode": "builder", + "expr": "process_cpu_usage", + "fullMetaSearch": false, + "hide": false, + "includeNullMetadata": true, "instant": false, - "legendFormat": "{{method}} {{instance}} {{path}} ({{status}})", + "legendFormat": "{{instance}}", "range": true, - "refId": "A" + "refId": "process_cpu_usage", + "useBackend": false } ], - "title": "Successful API Requests", + "title": "CPU Usage", "type": "timeseries" }, { @@ -1027,7 +1572,6 @@ "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, - "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 25, "gradientMode": "none", @@ -1058,8 +1602,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" } ] }, @@ -1102,7 +1645,7 @@ "h": 7, "w": 12, "x": 12, - "y": 20 + "y": 30 }, "id": 19, "options": { @@ -1136,7 +1679,6 @@ }, { "datasource": { - "default": true, "type": "prometheus", "uid": "P18F45E9DC7E75912" }, @@ -1152,9 +1694,8 @@ "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, - "barWidthFactor": 0.6, "drawStyle": "line", - "fillOpacity": 0, + "fillOpacity": 25, "gradientMode": "none", "hideFrom": { "legend": false, @@ -1162,8 +1703,8 @@ "viz": false }, "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, + "lineInterpolation": "smooth", + "lineWidth": 2, "pointSize": 5, "scaleDistribution": { "type": "linear" @@ -1183,62 +1724,17 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" } ] - } + }, + "unit": "reqps" }, "overrides": [ { "matcher": { - "id": "byName", - "options": "DELETE" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "red", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "GET" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "blue", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "HEAD" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "purple", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "PATCH" + "id": "byRegexp", + "options": "/.*search-service.*/" }, "properties": [ { @@ -1252,28 +1748,14 @@ }, { "matcher": { - "id": "byName", - "options": "OPTIONS" - }, - "properties": [ - { - "id": "color", - "value": { - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "POST" + "id": "byRegexp", + "options": "/.*analyse-service.*/" }, "properties": [ { "id": "color", "value": { - "fixedColor": "green", + "fixedColor": "super-light-orange", "mode": "fixed" } } @@ -1285,9 +1767,9 @@ "h": 7, "w": 12, "x": 0, - "y": 27 + "y": 33 }, - "id": 20, + "id": 18, "options": { "legend": { "calcs": [], @@ -1296,7 +1778,7 @@ "showLegend": true }, "tooltip": { - "mode": "single", + "mode": "multi", "sort": "none" } }, @@ -1306,23 +1788,19 @@ "type": "prometheus", "uid": "P18F45E9DC7E75912" }, - "disableTextWrap": false, - "editorMode": "builder", - "expr": "tusd_requests_total", - "fullMetaSearch": false, - "includeNullMetadata": true, + "editorMode": "code", + "expr": "rate(flask_http_request_duration_seconds_count{status=~\"200|201|202\",path!=\"/health\"}[$__rate_interval])", "instant": false, - "legendFormat": "{{method}}", + "legendFormat": "{{method}} {{instance}} {{path}} ({{status}})", "range": true, - "refId": "A", - "useBackend": false + "refId": "A" } ], - "title": "Storage Service Requests", + "title": "Successful API Requests", "type": "timeseries" } ], - "refresh": "10s", + "refresh": "5s", "schemaVersion": 39, "tags": [ "provisioned", @@ -1332,13 +1810,13 @@ "list": [] }, "time": { - "from": "now-1h", + "from": "now-30m", "to": "now" }, "timepicker": {}, "timezone": "browser", - "title": "DBRepo - Overview", - "uid": "bdz20owu8zn5se", - "version": 1, + "title": "NEW", + "uid": "bdz20owu8zn5se1", + "version": 31, "weekStart": "" } \ No newline at end of file diff --git a/dbrepo-metric-db/prometheus.yml b/dbrepo-metric-db/prometheus.yml index 82986b249082b38e12247ba865cab6a7cd3d440f..e56ba4e7fdf5b0da04e514cccf8023c6bb8c4df7 100644 --- a/dbrepo-metric-db/prometheus.yml +++ b/dbrepo-metric-db/prometheus.yml @@ -12,8 +12,8 @@ scrape_configs: - job_name: 'actuator scrape' metrics_path: '/actuator/prometheus' static_configs: - - targets: ['data-service:8080', 'metadata-service:8080', 'ui:3000'] + - targets: ['data-service:8080', 'metadata-service:8080'] - job_name: 'metrics scrape' metrics_path: '/metrics' static_configs: - - targets: ['auth-service:8080', 'analyse-service:8080', 'search-service:8080', 'data-db-sidecar:8080', 'broker-service:15692', 'storage-service:9090', 'upload-service:8080', 'dashboard-service:3000'] + - targets: ['ui:3000', 'auth-service:8080', 'analyse-service:8080', 'search-service:8080', 'data-db-sidecar:8080', 'broker-service:15692', 'storage-service:9090', 'upload-service:8080', 'dashboard-service:3000'] diff --git a/dbrepo-ui/Dockerfile b/dbrepo-ui/Dockerfile index 07f7f5d903e09c477753bdd0e52042cd61bcf6fb..eef243cca855f6cf18275b8f29231332c420e886 100644 --- a/dbrepo-ui/Dockerfile +++ b/dbrepo-ui/Dockerfile @@ -2,6 +2,7 @@ FROM oven/bun:1.1.20-alpine AS build WORKDIR /app +COPY ./bun.lockb ./bun.lockb COPY ./package.json ./package.json RUN bun install @@ -24,11 +25,13 @@ COPY ./nuxt.config.ts ./nuxt.config.ts RUN bun run build -FROM oven/bun:1.1.20-alpine AS runtime +FROM node:18.19.0-alpine3.19 AS runtime ARG APP_VERSION="latest" ARG COMMIT="" +RUN apk add --no-cache curl bash + USER 1000 WORKDIR /app @@ -39,8 +42,8 @@ RUN chmod -R 755 /app/.output ENV NUXT_PUBLIC_VERSION="${APP_VERSION:-}" ENV NUXT_PUBLIC_COMMIT="${COMMIT:-}" -ENV NODE_OPTIONS="--max_old_space_size=4096" +ENV NODE_OPTIONS="--max_old_space_size=256" EXPOSE 3000 -ENTRYPOINT [ "bun", "run", ".output/server/index.mjs" ] +ENTRYPOINT [ "node", ".output/server/index.mjs" ] diff --git a/dbrepo-ui/assets/globals.css b/dbrepo-ui/assets/globals.css index 8f791a9edd2b82244332b41587708c3197f1d1b3..52da2e48c8c2e7589ddcbce27fe67520acd74763 100644 --- a/dbrepo-ui/assets/globals.css +++ b/dbrepo-ui/assets/globals.css @@ -1,4 +1,13 @@ a { color: var(--v-theme-primary); } +label.native, +select.native { + display: block; } + +select.native { + -webkit-appearance: listbox; + border-style: solid; + width: 100%; } + /*# sourceMappingURL=globals.css.map */ diff --git a/dbrepo-ui/assets/globals.css.map b/dbrepo-ui/assets/globals.css.map index b9c0623a76d6530341406b9f715d4dea45c77046..6f271c8f99f4295e8438524dea16b6a48b253635 100644 --- a/dbrepo-ui/assets/globals.css.map +++ b/dbrepo-ui/assets/globals.css.map @@ -1,6 +1,6 @@ { "version": 3, -"mappings": "AAAA,CAAE;EACA,KAAK,EAAE,sBAAsB", +"mappings": "AAAA,CAAE;EACA,KAAK,EAAE,sBAAsB;;AAG/B;aACc;EACZ,OAAO,EAAE,KAAK;;AAGhB,aAAc;EACZ,kBAAkB,EAAE,OAAO;EAC3B,YAAY,EAAE,KAAK;EACnB,KAAK,EAAE,IAAI", "sources": ["globals.scss"], "names": [], "file": "globals.css" diff --git a/dbrepo-ui/assets/globals.scss b/dbrepo-ui/assets/globals.scss index 6b6b26ac202cdfae8c6783d7a8f5c31116e98697..5d4d4e06a7cdcde8e801cccd14c0eb2f07c0824d 100644 --- a/dbrepo-ui/assets/globals.scss +++ b/dbrepo-ui/assets/globals.scss @@ -1,3 +1,14 @@ a { color: var(--v-theme-primary); } + +label.native, +select.native { + display: block; +} + +select.native { + -webkit-appearance: listbox; + border-style: solid; + width: 100%; +} diff --git a/dbrepo-ui/bun.lockb b/dbrepo-ui/bun.lockb index d4a0ef58602cbb7a069d13bc894340f4b0d72465..32e73e364f9bd9e573f92d3f4a72d9596cb21363 100755 Binary files a/dbrepo-ui/bun.lockb and b/dbrepo-ui/bun.lockb differ diff --git a/dbrepo-ui/nuxt.config.ts b/dbrepo-ui/nuxt.config.ts index f07d9aa0dd42dbfa330c65f36ae361c859a2d3c4..a0fa7f34eaf74276d3211dd6ddcf12ddf98f457b 100644 --- a/dbrepo-ui/nuxt.config.ts +++ b/dbrepo-ui/nuxt.config.ts @@ -1,6 +1,6 @@ -import { transformAssetUrls } from 'vite-plugin-vuetify' +import {transformAssetUrls} from 'vite-plugin-vuetify' -const proxy : any = {} +const proxy: any = {} /* proxies the backend calls, >>NOT<< the frontend calls (clicking) */ if (process.env.NODE_ENV === 'development') { @@ -19,154 +19,156 @@ if (process.env.NODE_ENV === 'development') { /** * https://nuxt.com/docs/guide/concepts/rendering#hybrid-rendering */ -const routeRules = { -} +const routeRules = {} export default defineNuxtConfig({ - app: { - head: { - charset: 'utf-8', - viewport: 'width=device-width, initial-scale=1', - meta: [ - { 'http-equiv': 'Content-Security-Policy', content: 'upgrade-insecure-requests' } - ], - htmlAttrs: { - lang: 'en-US' - } - } - }, - - build: { - transpile: ['vuetify'], - }, - - css: [ - 'vuetify/lib/styles/main.sass', - '@mdi/font/css/materialdesignicons.min.css', - '@/assets/globals.css', - '@/assets/overrides.css', - ], - - runtimeConfig: { - public: { - commit: '', - title: 'Database Repository', - logo: '/logo.svg', - icon: '/favicon.ico', - touch: '/apple-touch-icon.png', - version: 'bun-dev', - broker: { - host: 'localhost', - port: { - '5672': false - }, - extra: '' - }, - variant: { - input: { - normal: 'underlined', - contrast: 'outlined', - }, - button: { - normal: 'flat', - contrast: 'outlined', - }, - list: { - normal: '', - contrast: 'flat', - } - }, - api: { - client: 'http://localhost', - server: 'http://gateway-service', - }, - upload: { - client: 'http://localhost/api/upload/files', - prefix: '/' - }, - database: { - unsupported: '*,AVG,BIT_AND,BIT_OR,BIT_XOR,COUNT,COUNTDISTINCT,GROUP_CONCAT,JSON_ARRAYAGG,JSON_OBJECTAGG,MAX,MIN,STD,STDDEV,STDDEV_POP,STDDEV_SAMP,SUM,VARIANCE,VAR_POP,VAR_SAMP,--', - image: { - width: 200, - height: 200 - }, - extra: '' - }, - pid: { - default: { - publisher: 'Example University' - } - }, - doi: { - enabled: false, - endpoint: 'https://doi.org' - }, - links: { - keycloak: { - text: 'Auth Service', - href: '/api/auth/' - }, - grafana: { - text: 'Dashboard Service', - href: '/dashboard/' - } - } - } - }, - - routeRules, - - devServer: { - port: 3001 - }, - - modules: [ - '@pinia/nuxt', - '@pinia-plugin-persistedstate/nuxt', - '@nuxtjs/i18n' - ], - - pinia: { - storesDirs: ['./stores/**'], - }, - - piniaPersistedstate: { - storage: 'localStorage' - }, - - i18n: { - lazy: false, - langDir: 'locales', - strategy: 'no_prefix', - defaultLocale: 'de', - locales: [ - { - 'code': 'en', - 'file': 'en-US.json', - 'name': 'English (US)', - 'iso': 'en-US' - }, - { - 'code': 'de', - 'file': 'de-AT.json', - 'name': 'German (AT)', - 'iso': 'de-AT' - } - ] - - }, - - vite: { - server: { - proxy - }, - vue: { - template: { - transformAssetUrls, - }, - }, - }, - - devtools: { enabled: true }, - compatibilityDate: '2024-07-24' + app: { + head: { + charset: 'utf-8', + viewport: 'width=device-width, initial-scale=1', + meta: [ + {'http-equiv': 'Content-Security-Policy', content: 'upgrade-insecure-requests'} + ], + htmlAttrs: { + lang: 'en-US' + } + } + }, + + build: { + transpile: ['vuetify'], + }, + + builder: 'vite', + + css: [ + 'vuetify/lib/styles/main.sass', + '@mdi/font/css/materialdesignicons.min.css', + '@/assets/globals.css', + '@/assets/overrides.css', + ], + + runtimeConfig: { + public: { + commit: '', + title: 'Database Repository', + logo: '/logo.svg', + icon: '/favicon.ico', + touch: '/apple-touch-icon.png', + version: 'bun-dev', + broker: { + host: 'localhost', + port: { + '5672': false + }, + extra: '' + }, + variant: { + input: { + normal: 'underlined', + contrast: 'outlined', + }, + button: { + normal: 'flat', + contrast: 'outlined', + }, + list: { + normal: '', + contrast: 'flat', + } + }, + api: { + client: 'http://localhost', + server: 'http://gateway-service', + }, + upload: { + client: 'http://localhost/api/upload/files', + prefix: '/' + }, + database: { + unsupported: '*,AVG,BIT_AND,BIT_OR,BIT_XOR,COUNT,COUNTDISTINCT,GROUP_CONCAT,JSON_ARRAYAGG,JSON_OBJECTAGG,MAX,MIN,STD,STDDEV,STDDEV_POP,STDDEV_SAMP,SUM,VARIANCE,VAR_POP,VAR_SAMP,--', + image: { + width: 200, + height: 200 + }, + extra: '' + }, + pid: { + default: { + publisher: 'Example University' + } + }, + doi: { + enabled: false, + endpoint: 'https://doi.org' + }, + links: { + keycloak: { + text: 'Auth Service', + href: '/api/auth/' + }, + grafana: { + text: 'Dashboard Service', + href: '/dashboard/' + } + } + } + }, + + routeRules, + + devServer: { + port: 3001 + }, + + modules: [ + '@artmizu/nuxt-prometheus', + '@nuxtjs/i18n', + '@pinia/nuxt', + '@pinia-plugin-persistedstate/nuxt' + ], + + pinia: { + storesDirs: ['./stores/**'], + }, + + piniaPersistedstate: { + storage: 'localStorage' + }, + + i18n: { + lazy: false, + langDir: 'locales', + strategy: 'no_prefix', + defaultLocale: 'de', + locales: [ + { + 'code': 'en', + 'file': 'en-US.json', + 'name': 'English (US)', + 'iso': 'en-US' + }, + { + 'code': 'de', + 'file': 'de-AT.json', + 'name': 'German (AT)', + 'iso': 'de-AT' + } + ] + + }, + + vite: { + server: { + proxy + }, + vue: { + template: { + transformAssetUrls, + }, + }, + }, + + devtools: {enabled: true}, + compatibilityDate: '2024-07-24' }) diff --git a/dbrepo-ui/package.json b/dbrepo-ui/package.json index 2bbe6696bc2e59845e4d1d30194a860923f2760d..d521b4e61f91766ca0355ec39dd8ea6496be7cf4 100644 --- a/dbrepo-ui/package.json +++ b/dbrepo-ui/package.json @@ -11,6 +11,7 @@ "prod": "bun run .output/server/index.mjs" }, "dependencies": { + "@artmizu/nuxt-prometheus": "^2.4.0", "@fontsource/open-sans": "^5.0.24", "@mdi/font": "^7.4.47", "@nuxtjs/robots": "^3.0.0", @@ -36,7 +37,7 @@ "vue-meta": "^2.4.0", "vue-toast-notification": "^3.1.2", "vue3-ace-editor": "^2.2.4", - "vuetify": "^3.5.7" + "vuetify": "^3.7.2" }, "devDependencies": { "@nuxtjs/i18n": "^8.1.1", diff --git a/dbrepo-ui/server/routes/actuator/prometheus.ts b/dbrepo-ui/server/routes/actuator/prometheus.ts deleted file mode 100644 index 3647103148b19761fe534d9a70ad004bd8e70199..0000000000000000000000000000000000000000 --- a/dbrepo-ui/server/routes/actuator/prometheus.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default defineEventHandler((event) => { - event.node.res.setHeader('Content-Type', 'text/plain'); - return 'service_started 1' -}) diff --git a/docker-compose.yml b/docker-compose.yml index 9a13b7ca63e2b49ecc32e7004bce2e6ecdc704eb..cb11953b3b0d828ab5db6698276733c921c8653b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -329,7 +329,7 @@ services: dbrepo-storage-service: condition: service_healthy healthcheck: - test: wget -qO- localhost:3000 | grep "Database Repository" || exit 1 + test: curl -fsSL http://127.0.0.1:3000 && curl -fsSL http://127.0.0.1:3000/health interval: 10s timeout: 5s retries: 12