diff --git a/dbrepo-dashboard-service/dashboards/system.json b/dbrepo-dashboard-service/dashboards/system.json index 6e93f117b37b6e86ffb363be3c437ceda2526838..4d5d4e4b00293cf89dece1058f82e7d7292472cb 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, @@ -46,93 +47,6 @@ "title": "Data", "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": 1 - }, - "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": { "default": true, @@ -158,7 +72,7 @@ "gridPos": { "h": 3, "w": 4, - "x": 4, + "x": 0, "y": 1 }, "id": 4, @@ -226,7 +140,7 @@ "gridPos": { "h": 3, "w": 4, - "x": 8, + "x": 4, "y": 1 }, "id": 5, @@ -322,6 +236,7 @@ "type": "prometheus", "uid": "P18F45E9DC7E75912" }, + "description": "", "fieldConfig": { "defaults": { "mappings": [], @@ -341,7 +256,7 @@ "gridPos": { "h": 3, "w": 4, - "x": 12, + "x": 8, "y": 1 }, "id": 8, @@ -403,216 +318,158 @@ "type": "prometheus", "uid": "P18F45E9DC7E75912" }, + "description": "Quality of Service", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - }, "mappings": [], + "max": 100, + "min": 0, "thresholds": { "mode": "absolute", "steps": [ { - "color": "green", + "color": "purple", "value": null }, { "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "auth-service:8080" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "yellow", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "broker-service:15692" - }, - "properties": [ + "value": 0 + }, { - "id": "color", - "value": { - "fixedColor": "light-blue", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "metadata-service:8080" - }, - "properties": [ + "color": "orange", + "value": 60 + }, { - "id": "color", - "value": { - "fixedColor": "purple", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "analyse-service:80" - }, - "properties": [ + "color": "#EAB839", + "value": 80 + }, { - "id": "color", - "value": { - "fixedColor": "super-light-red", - "mode": "fixed" - } + "color": "green", + "value": 100 } ] }, - { - "matcher": { - "id": "byName", - "options": "auth-service-metrics:8080" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "green", - "mode": "fixed" - } - } - ] + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 0, + "y": 5 + }, + "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" }, - { - "matcher": { - "id": "byName", - "options": "metadata-service:80" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "blue", - "mode": "fixed" - } - } - ] + "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" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" }, - { - "matcher": { - "id": "byName", - "options": "data-service:80" + "custom": { + "fillOpacity": 70, + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "purple", - "mode": "fixed" + "lineWidth": 1 + }, + "mappings": [ + { + "options": { + "0": { + "index": 0, + "text": "DOWN" + }, + "1": { + "index": 1, + "text": "UP" } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "search-service:80" - }, - "properties": [ + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ { - "id": "color", - "value": { - "fixedColor": "semi-dark-purple", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "ui:80" - }, - "properties": [ + "color": "red", + "value": null + }, { - "id": "color", - "value": { - "fixedColor": "super-light-purple", - "mode": "fixed" - } + "color": "green", + "value": 1 } ] } - ] + }, + "overrides": [] }, "gridPos": { - "h": 6, - "w": 24, - "x": 0, + "h": 8, + "w": 20, + "x": 4, "y": 5 }, - "id": 1, + "id": 16, "options": { + "colWidth": 0.9, "legend": { - "calcs": [], "displayMode": "list", "placement": "bottom", - "showLegend": true + "showLegend": false }, + "rowHeight": 0.9, + "showValue": "auto", "tooltip": { "mode": "single", "sort": "none" } }, - "pluginVersion": "11.2.0", "targets": [ { "datasource": { @@ -623,7 +480,6 @@ "editorMode": "builder", "expr": "up", "fullMetaSearch": false, - "hide": false, "includeNullMetadata": true, "instant": false, "legendFormat": "{{instance}}", @@ -632,12 +488,81 @@ "useBackend": false } ], - "title": "Service Instances Running", - "type": "timeseries" + "title": "Service QoS", + "type": "status-history" + }, + { + "datasource": { + "type": "prometheus", + "uid": "P18F45E9DC7E75912" + }, + "description": "Total used disk space in Storage Service", + "fieldConfig": { + "defaults": { + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 0, + "y": 9 + }, + "id": 17, + "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": "SeaweedFS_volumeServer_total_disk_size", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "S3 Volume", + "type": "stat" }, { "datasource": { - "default": true, "type": "prometheus", "uid": "P18F45E9DC7E75912" }, @@ -691,7 +616,8 @@ "value": 80 } ] - } + }, + "unit": "none" }, "overrides": [ { @@ -757,10 +683,10 @@ ] }, "gridPos": { - "h": 6, - "w": 24, + "h": 7, + "w": 12, "x": 0, - "y": 11 + "y": 13 }, "id": 6, "options": { @@ -791,7 +717,7 @@ "instant": false, "legendFormat": "{{instance}}", "range": true, - "refId": "Java", + "refId": "process_cpu_usage", "useBackend": false } ], @@ -918,10 +844,10 @@ ] }, "gridPos": { - "h": 6, - "w": 24, - "x": 0, - "y": 17 + "h": 7, + "w": 12, + "x": 12, + "y": 13 }, "id": 7, "options": { @@ -932,7 +858,7 @@ "showLegend": true }, "tooltip": { - "mode": "single", + "mode": "multi", "sort": "none" } }, @@ -977,6 +903,6 @@ "timezone": "browser", "title": "DBRepo - Overview", "uid": "bdz20owu8zn5se", - "version": 1, + "version": 20, "weekStart": "" } \ No newline at end of file diff --git a/dbrepo-metric-db/prometheus.yml b/dbrepo-metric-db/prometheus.yml index 9957767684206d3d3e29f602ddf448f8facbc898..f7338b011371ec5b12757bbe14693248cc5c7bd3 100644 --- a/dbrepo-metric-db/prometheus.yml +++ b/dbrepo-metric-db/prometheus.yml @@ -9,10 +9,10 @@ alerting: - targets: [] scrape_configs: - - job_name: 'spring boot scrape' + - job_name: 'actuator scrape' metrics_path: '/actuator/prometheus' static_configs: - - targets: ['data-service:8080', 'metadata-service:8080'] + - targets: ['data-service:8080', 'metadata-service:8080', 'ui:3000'] - job_name: 'metrics scrape' metrics_path: '/metrics' static_configs: diff --git a/dbrepo-ui/nuxt.config.ts b/dbrepo-ui/nuxt.config.ts index 9fa82c7660ab22b27e4fa5b5ffee5f3315e769d7..bb30b673f456452b4e1360402b3783bfb27c6ffa 100644 --- a/dbrepo-ui/nuxt.config.ts +++ b/dbrepo-ui/nuxt.config.ts @@ -103,12 +103,16 @@ export default defineNuxtConfig({ }, links: { rabbitmq: { - text: 'RabbitMQ Admin', + text: 'Broker Service', href: '/admin/broker/' }, keycloak: { - text: 'Keycloak Admin', + text: 'Auth Service', href: '/api/auth/' + }, + grafana: { + text: 'Dashboard Service', + href: '/dashboard/' } } } diff --git a/dbrepo-ui/server/routes/actuator/prometheus.ts b/dbrepo-ui/server/routes/actuator/prometheus.ts new file mode 100644 index 0000000000000000000000000000000000000000..3647103148b19761fe534d9a70ad004bd8e70199 --- /dev/null +++ b/dbrepo-ui/server/routes/actuator/prometheus.ts @@ -0,0 +1,4 @@ +export default defineEventHandler((event) => { + event.node.res.setHeader('Content-Type', 'text/plain'); + return 'service_started 1' +})