diff --git a/.docker/docker-compose.yml b/.docker/docker-compose.yml index c0c8cf091311910c28fba797fefa4ba31b83d52d..0e0d7487222e1cbe56ffd7fe4c10682eb4a79e5b 100644 --- a/.docker/docker-compose.yml +++ b/.docker/docker-compose.yml @@ -398,12 +398,7 @@ services: restart: "no" container_name: dbrepo-dashboard-service hostname: dashboard-service - image: docker.io/bitnami/grafana:11.2.0-debian-12-r4 - volumes: - - ./config/dashboards:/app/dashboards - - ./config/provisioning:/etc/grafana/provisioning - - ./config/grafana.ini:/etc/grafana/grafana.ini - - ./config/ldap.toml:/etc/grafana/ldap.toml + image: registry.datalab.tuwien.ac.at/dbrepo/dashboard-service:1.4.6 environment: GF_SERVER_DOMAIN: "dashboard-service" GF_SERVER_ROOT_URL: "${BASE_URL:-http://localhost}/dashboard/" diff --git a/.docs/api/dashboard-service.md b/.docs/api/dashboard-service.md index 2f4529e2adfbd2185c271ccacda7f6fa20887e6e..cc2e06758f23ae1bea5287b3493e1a76373ab9db 100644 --- a/.docs/api/dashboard-service.md +++ b/.docs/api/dashboard-service.md @@ -6,7 +6,7 @@ author: Martin Weise !!! debug "Debug Information" - Image: [`docker.io/bitnami/grafana:11.2.0-debian-12-r4`](https://hub.docker.com/r/bitnami/grafana) + Image: [`docker.io/bitnami/grafana:10.4.9-debian-12-r0`](https://hub.docker.com/r/bitnami/grafana) * Ports: `http://<hostname>/dashboard` * Prometheus: `http://<hostname>/dashboard/prometheus` @@ -24,7 +24,7 @@ seconds and makes the available in the Dashboard Service. <figure markdown>  -<figcaption>Figure 2: Database Dashboard</figcaption> +<figcaption>Figure 2: Database Dashboard (Kubernetes deployment only)</figcaption> </figure> <figure markdown> diff --git a/.docs/api/data-db.md b/.docs/api/data-db.md index 648640bb4c85413a7f5afbf65d1649a6e1706c3c..d5ba8d8361351ec7c52d2428f5e1304a64c6791e 100644 --- a/.docs/api/data-db.md +++ b/.docs/api/data-db.md @@ -4,7 +4,7 @@ author: Martin Weise !!! debug "Debug Information" - Image: [`docker.io/bitnami/mariadb:11.1.3-debian-11-r6`](https://hub.docker.com/r/bitnami/mariadb) + Image: [`docker.io/bitnami/mariadb-galera:11.1.3-debian-11-r8`](https://hub.docker.com/r/bitnami/mariadb-galera) * Ports: 3306/tcp * JDBC: `jdbc://mariadb:<hostname>:3306` diff --git a/.docs/api/metadata-db.md b/.docs/api/metadata-db.md index 4336c7666c012caf5b7f2b8f6979a77d049c9643..61a56ed1ac4f50ae2dcfd4b66e35f317f5bb9ded 100644 --- a/.docs/api/metadata-db.md +++ b/.docs/api/metadata-db.md @@ -4,7 +4,7 @@ author: Martin Weise !!! debug "Debug Information" - Image: [`docker.io/bitnami/mariadb:11.1.3-debian-11-r6`](https://hub.docker.com/r/bitnami/mariadb) + Image: [`docker.io/bitnami/mariadb-galera:11.1.3-debian-11-r8`](https://hub.docker.com/r/bitnami/mariadb-galera) * Ports: 3306/tcp * JDBC: `jdbc://mariadb:<hostname>:3306` diff --git a/.docs/help.md b/.docs/help.md index eaecbe6b0461a18320f9572bb408728e110281d2..bde92d1b13f10fb4d40c70ca5a9438ae69f54ad5 100644 --- a/.docs/help.md +++ b/.docs/help.md @@ -9,3 +9,15 @@ The [concepts documentation](../concepts/) is the most complete guide on how to ## API Documentation The [API documentation](../api/) present reference docs for all APIs. + +## Troubleshooting + +**The Dashboard Service reloads recurrently** + +: *Origin*: Your Ad-Blocker blocks client-side requests of Grafana to its endpoints, resulting in authorization + errors, causing full page reloads. +: *Solution*: Disable uBlock Origin, AdBlock Plus, etc. for `/dashboard/*`. + +!!! info "Additional Help" + + [Contact us](../contact) via e-mail. \ No newline at end of file diff --git a/.docs/images/screenshots/grafana4.png b/.docs/images/screenshots/grafana4.png index 94cdf5f9ed79356cade533add69aafa426df3e45..1a514fca73b3208ef658b6ef8b2e98e38f3389b2 100644 Binary files a/.docs/images/screenshots/grafana4.png and b/.docs/images/screenshots/grafana4.png differ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9f048df9a44ad1812a3cd0b0f8298c7ad459759d..f943d18b85c705bd5e5b8aa92adb86473ea5522b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -145,7 +145,7 @@ lint-docker-compose: - "bash .scripts/check-service.sh 'dbrepo-auth-db'" - "IGNORE_IMAGE=1 IGNORE_PORTS=1 bash .scripts/check-service.sh 'dbrepo-auth-service'" - "IGNORE_IMAGE=1 IGNORE_PORTS=1 bash .scripts/check-service.sh 'dbrepo-broker-service'" - - "IGNORE_VOLUMES=1 bash .scripts/check-service.sh 'dbrepo-dashboard-service'" + - "IGNORE_PORTS=1 bash .scripts/check-service.sh 'dbrepo-dashboard-service'" - "bash .scripts/check-service.sh 'dbrepo-data-db'" - "IGNORE_IMAGE=1 IGNORE_PORTS=1 bash .scripts/check-service.sh 'dbrepo-data-db-sidecar'" - "IGNORE_IMAGE=1 IGNORE_PORTS=1 bash .scripts/check-service.sh 'dbrepo-data-service'" diff --git a/dbrepo-dashboard-service/Dockerfile b/dbrepo-dashboard-service/Dockerfile index 374e72e41d31f17e6df2ace7dd57eed925fd14ab..00fc60339b15b2e1ebeda9dbbf7849c96bd7a401 100644 --- a/dbrepo-dashboard-service/Dockerfile +++ b/dbrepo-dashboard-service/Dockerfile @@ -1,9 +1,9 @@ -FROM docker.io/bitnami/grafana:11.2.0-debian-12-r4 AS runtime +FROM docker.io/bitnami/grafana:10.4.9-debian-12-r0 AS runtime LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at" WORKDIR /app -COPY ./grafana.ini /etc/grafana/grafana.ini -COPY ldap.toml /etc/grafana/ldap.toml -COPY provisioning/datasources/prometheus.yaml /etc/grafana/provisioning/datasources/datasource.yaml -#COPY --chown=999:999 ./system.yaml /var/lib/grafana/dashboards/system.yaml +COPY --chown=grafana:grafana ./dashboards /app/dashboards +COPY --chown=grafana:grafana ./provisioning /etc/grafana/provisioning +COPY --chown=grafana:grafana ./grafana.ini /etc/grafana/grafana.ini +COPY --chown=grafana:grafana ./ldap.toml /etc/grafana/ldap.toml diff --git a/dbrepo-dashboard-service/dashboards/system.json b/dbrepo-dashboard-service/dashboards/system.json index 75287d5a0353df5aa77f82ee361888fe00274ef8..68279f8fe4ffc11a52e7a53de0d21f07797f80d5 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": 2, "links": [ { "asDropdown": false, @@ -29,7 +30,7 @@ "title": "Docs", "tooltip": "", "type": "link", - "url": "https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/" + "url": "https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.4.6/" } ], "panels": [ @@ -41,9 +42,9 @@ "x": 0, "y": 0 }, - "id": 3, + "id": 15, "panels": [], - "title": "Overview", + "title": "Data", "type": "row" }, { @@ -54,9 +55,10 @@ }, "fieldConfig": { "defaults": { + "displayName": "QoS", "mappings": [], "thresholds": { - "mode": "percentage", + "mode": "absolute", "steps": [ { "color": "purple", @@ -80,13 +82,13 @@ } ] }, - "unit": "percentunit" + "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 3, - "w": 3, + "w": 4, "x": 0, "y": 1 }, @@ -108,7 +110,7 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "11.2.0", + "pluginVersion": "", "targets": [ { "datasource": { @@ -117,7 +119,7 @@ }, "disableTextWrap": false, "editorMode": "code", - "expr": "sum(up)/count(up)", + "expr": "sum(up)*100/count(up)", "fullMetaSearch": false, "includeNullMetadata": true, "instant": false, @@ -130,17 +132,87 @@ "type": "stat" }, { - "collapsed": false, + "datasource": { + "default": true, + "type": "prometheus", + "uid": "P18F45E9DC7E75912" + }, + "fieldConfig": { + "defaults": { + "displayName": "UI Response Time (Mean)", + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "purple", + "value": null + }, + { + "color": "green", + "value": 0 + }, + { + "color": "yellow", + "value": 200 + }, + { + "color": "orange", + "value": 400 + }, + { + "color": "red", + "value": 600 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 4 + "h": 3, + "w": 4, + "x": 4, + "y": 1 }, - "id": 15, - "panels": [], - "title": "Data", - "type": "row" + "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": "", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "P18F45E9DC7E75912" + }, + "editorMode": "code", + "expr": "avg(page_total_time)", + "format": "table", + "intervalFactor": 3, + "legendFormat": "__auto", + "range": true, + "refId": "B", + "step": 15, + "target": "dev.grafana.cb-office.alerting.active_alerts" + } + ], + "type": "stat" }, { "datasource": { @@ -167,9 +239,9 @@ }, "gridPos": { "h": 3, - "w": 5, - "x": 0, - "y": 5 + "w": 4, + "x": 8, + "y": 1 }, "id": 4, "options": { @@ -189,7 +261,7 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "11.2.0", + "pluginVersion": "", "targets": [ { "datasource": { @@ -235,9 +307,9 @@ }, "gridPos": { "h": 3, - "w": 5, - "x": 5, - "y": 5 + "w": 4, + "x": 12, + "y": 1 }, "id": 5, "options": { @@ -257,7 +329,7 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "11.2.0", + "pluginVersion": "", "targets": [ { "datasource": { @@ -350,9 +422,9 @@ }, "gridPos": { "h": 3, - "w": 5, - "x": 10, - "y": 5 + "w": 4, + "x": 16, + "y": 1 }, "id": 8, "options": { @@ -372,7 +444,7 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "11.2.0", + "pluginVersion": "", "targets": [ { "datasource": { @@ -399,13 +471,101 @@ "h": 1, "w": 24, "x": 0, - "y": 8 + "y": 4 }, "id": 2, "panels": [], "title": "Services", "type": "row" }, + { + "datasource": { + "type": "prometheus", + "uid": "P18F45E9DC7E75912" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 200 + }, + { + "color": "orange", + "value": 400 + }, + { + "color": "red", + "value": 600 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 5 + }, + "id": 13, + "options": { + "displayMode": "gradient", + "maxVizHeight": 300, + "minVizHeight": 16, + "minVizWidth": 8, + "namePlacement": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "sizing": "auto", + "valueMode": "color" + }, + "pluginVersion": "", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "P18F45E9DC7E75912" + }, + "disableTextWrap": false, + "editorMode": "builder", + "exemplar": false, + "expr": "page_total_time{path!=\"empty: empty\"}", + "format": "time_series", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "intervalFactor": 3, + "legendFormat": "{{path}}", + "range": true, + "refId": "B", + "step": 15, + "target": "dev.grafana.cb-office.alerting.active_alerts", + "useBackend": false + } + ], + "title": "UI Response Time", + "type": "bargauge" + }, { "datasource": { "default": true, @@ -424,7 +584,6 @@ "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, - "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 25, "gradientMode": "none", @@ -607,7 +766,7 @@ "h": 6, "w": 24, "x": 0, - "y": 9 + "y": 14 }, "id": 1, "options": { @@ -663,7 +822,6 @@ "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, - "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 25, "gradientMode": "none", @@ -771,7 +929,7 @@ "h": 6, "w": 24, "x": 0, - "y": 15 + "y": 20 }, "id": 6, "options": { @@ -828,7 +986,6 @@ "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, - "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 25, "gradientMode": "none", @@ -933,7 +1090,7 @@ "h": 6, "w": 24, "x": 0, - "y": 21 + "y": 26 }, "id": 7, "options": { @@ -970,240 +1127,19 @@ ], "title": "JVM Memory Usage", "type": "timeseries" - }, - { - "datasource": { - "default": true, - "type": "prometheus", - "uid": "P18F45E9DC7E75912" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "smooth", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "400" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "orange", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "500" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#BF1B00", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "-1" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "purple", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "200" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "302" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-yellow", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "304" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "super-light-yellow", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "401" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-orange", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "499" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "red", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 24, - "x": 0, - "y": 27 - }, - "id": 13, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.1.0-pre", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "P18F45E9DC7E75912" - }, - "editorMode": "code", - "expr": "sum by (status_code) (irate(grafana_http_request_duration_seconds_count[5m]))", - "format": "time_series", - "intervalFactor": 3, - "legendFormat": "{{status_code}}", - "range": true, - "refId": "B", - "step": 15, - "target": "dev.grafana.cb-office.alerting.active_alerts" - } - ], - "title": "Dashboard Service HTTP Status Codes", - "type": "timeseries" } ], "refresh": "10s", "schemaVersion": 39, - "tags": ["provisioned", "dbrepo"], + "tags": [ + "provisioned", + "dbrepo" + ], "templating": { "list": [] }, "time": { - "from": "now-15m", + "from": "now-1h", "to": "now" }, "timepicker": {}, diff --git a/dbrepo-data-service/querystore/pom.xml b/dbrepo-data-service/querystore/pom.xml index 57bb5dd76ca4f08668eab02c0391ef54a7ea5fa5..3d301be50f460d547e635cf27d9bbd64e17c3261 100644 --- a/dbrepo-data-service/querystore/pom.xml +++ b/dbrepo-data-service/querystore/pom.xml @@ -6,12 +6,12 @@ <parent> <groupId>at.tuwien</groupId> <artifactId>dbrepo-data-service</artifactId> - <version>1.4.5</version> + <version>1.4.6</version> </parent> <artifactId>dbrepo-data-service-querystore</artifactId> <name>dbrepo-data-service-querystore</name> - <version>1.4.5</version> + <version>1.4.6</version> <dependencies/> diff --git a/dbrepo-data-service/report/pom.xml b/dbrepo-data-service/report/pom.xml index 10663ef86dfa470e69a0254308d00761af5f7a44..76bce1e9290ecf4a74283c0f1f95d9575617f67e 100644 --- a/dbrepo-data-service/report/pom.xml +++ b/dbrepo-data-service/report/pom.xml @@ -6,12 +6,12 @@ <parent> <groupId>at.tuwien</groupId> <artifactId>dbrepo-data-service</artifactId> - <version>1.4.5</version> + <version>1.4.6</version> </parent> <artifactId>report</artifactId> <name>dbrepo-data-service-report</name> - <version>1.4.5</version> + <version>1.4.6</version> <description> This module is only intended for the pipeline coverage report. See the detailed report in the respective modules diff --git a/dbrepo-data-service/rest-service/pom.xml b/dbrepo-data-service/rest-service/pom.xml index 9eb7ec933b8a66a8984d900f2382b838e2c6b2d5..214912d816594f01618f0d631b224e1246be29bf 100644 --- a/dbrepo-data-service/rest-service/pom.xml +++ b/dbrepo-data-service/rest-service/pom.xml @@ -6,18 +6,18 @@ <parent> <groupId>at.tuwien</groupId> <artifactId>dbrepo-data-service</artifactId> - <version>1.4.5</version> + <version>1.4.6</version> </parent> <artifactId>rest-service</artifactId> <name>dbrepo-data-service-rest-service</name> - <version>1.4.5</version> + <version>1.4.6</version> <dependencies> <dependency> <groupId>at.tuwien</groupId> <artifactId>services</artifactId> - <version>1.4.5</version> + <version>1.4.6</version> </dependency> </dependencies> diff --git a/dbrepo-data-service/services/pom.xml b/dbrepo-data-service/services/pom.xml index 0b57ceef9d0e575cdedd03c769ecc24aacf682e5..ccb8ca4360458a9db0797a7f833703dc1d7dc4ca 100644 --- a/dbrepo-data-service/services/pom.xml +++ b/dbrepo-data-service/services/pom.xml @@ -6,12 +6,12 @@ <parent> <groupId>at.tuwien</groupId> <artifactId>dbrepo-data-service</artifactId> - <version>1.4.5</version> + <version>1.4.6</version> </parent> <artifactId>services</artifactId> <name>dbrepo-data-service-services</name> - <version>1.4.5</version> + <version>1.4.6</version> <dependencies> <dependency> @@ -22,7 +22,7 @@ <dependency> <groupId>at.tuwien</groupId> <artifactId>dbrepo-data-service-querystore</artifactId> - <version>1.4.5</version> + <version>1.4.6</version> </dependency> </dependencies> diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/config/MetricsConfig.java b/dbrepo-data-service/services/src/main/java/at/tuwien/config/MetricsConfig.java index 450be2f7df8b52fe493dd498dc0422350bb3ff39..9ff09ab42b2c2e62536e1d46fa986057ff664d53 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/config/MetricsConfig.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/config/MetricsConfig.java @@ -1,5 +1,7 @@ package at.tuwien.config; +import io.micrometer.core.instrument.Counter; +import io.micrometer.core.instrument.Metrics; import io.micrometer.observation.ObservationRegistry; import io.micrometer.observation.aop.ObservedAspect; import org.springframework.context.annotation.Bean; @@ -12,4 +14,20 @@ public class MetricsConfig { public ObservedAspect observedAspect(ObservationRegistry observationRegistry) { return new ObservedAspect(observationRegistry); } + + @Bean + public Counter httpDataAccessCounter() { + return Counter.builder("dbrepo.data.access") + .tag("protocol", "http") + .description("The total number of accessed data sources") + .register(Metrics.globalRegistry); + } + + @Bean + public Counter amqpDataAccessCounter() { + return Counter.builder("dbrepo.data.access") + .tag("protocol", "amqp") + .description("The total number of accessed data sources") + .register(Metrics.globalRegistry); + } } diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/QueueServiceRabbitMqImpl.java b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/QueueServiceRabbitMqImpl.java index 0b1dc7caa1cd7f530d6d8590ffb09225e8048ff4..797de6567445ea6acdc45c656d8910f68084ac8b 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/QueueServiceRabbitMqImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/QueueServiceRabbitMqImpl.java @@ -6,6 +6,7 @@ import at.tuwien.mapper.DataMapper; import at.tuwien.mapper.MetadataMapper; import at.tuwien.service.QueueService; import com.mchange.v2.c3p0.ComboPooledDataSource; +import io.micrometer.core.instrument.Counter; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -20,11 +21,14 @@ import java.util.Optional; @Service public class QueueServiceRabbitMqImpl extends HibernateConnector implements QueueService { + private final Counter amqpDataAccessCounter; private final DataMapper dataMapper; private final MetadataMapper metadataMapper; @Autowired - public QueueServiceRabbitMqImpl(DataMapper dataMapper, MetadataMapper metadataMapper) { + public QueueServiceRabbitMqImpl(Counter amqpDataAccessCounter, DataMapper dataMapper, + MetadataMapper metadataMapper) { + this.amqpDataAccessCounter = amqpDataAccessCounter; this.dataMapper = dataMapper; this.metadataMapper = metadataMapper; } @@ -50,6 +54,7 @@ public class QueueServiceRabbitMqImpl extends HibernateConnector implements Queu preparedStatement.executeUpdate(); log.debug("executed statement in {} ms", System.currentTimeMillis() - start); log.trace("successfully inserted tuple"); + amqpDataAccessCounter.increment(); } finally { dataSource.close(); } diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/SubsetServiceMariaDbImpl.java b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/SubsetServiceMariaDbImpl.java index e839800fe577f951bf868b44c5d595d96258f7b0..e691bee25e4513c335b440d802cfc20d8b6c52a2 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/SubsetServiceMariaDbImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/SubsetServiceMariaDbImpl.java @@ -20,6 +20,7 @@ import at.tuwien.mapper.MetadataMapper; import at.tuwien.service.SubsetService; import at.tuwien.service.StorageService; import com.mchange.v2.c3p0.ComboPooledDataSource; +import io.micrometer.core.instrument.Counter; import lombok.extern.log4j.Log4j2; import net.sf.jsqlparser.JSQLParserException; import org.apache.commons.lang3.RandomUtils; @@ -38,6 +39,7 @@ import java.util.UUID; @Service public class SubsetServiceMariaDbImpl extends HibernateConnector implements SubsetService { + private final Counter httpDataAccessCounter; private final S3Config s3Config; private final DataMapper dataMapper; private final MariaDbMapper mariaDbMapper; @@ -47,10 +49,11 @@ public class SubsetServiceMariaDbImpl extends HibernateConnector implements Subs private final DataDatabaseSidecarGateway dataDatabaseSidecarGateway; @Autowired - public SubsetServiceMariaDbImpl(S3Config s3Config, DataMapper dataMapper, MariaDbMapper mariaDbMapper, - MetadataMapper metadataMapper, StorageService storageService, - MetadataServiceGateway metadataServiceGateway, + public SubsetServiceMariaDbImpl(Counter httpDataAccessCounter, S3Config s3Config, DataMapper dataMapper, + MariaDbMapper mariaDbMapper, MetadataMapper metadataMapper, + StorageService storageService, MetadataServiceGateway metadataServiceGateway, DataDatabaseSidecarGateway dataDatabaseSidecarGateway) { + this.httpDataAccessCounter = httpDataAccessCounter; this.s3Config = s3Config; this.dataMapper = dataMapper; this.mariaDbMapper = mariaDbMapper; @@ -106,6 +109,7 @@ public class SubsetServiceMariaDbImpl extends HibernateConnector implements Subs MetadataServiceException { final Long queryId = storeQuery(database, statement, timestamp, userId); final QueryDto query = findById(database, queryId); + httpDataAccessCounter.increment(); return reExecute(database, query, page, size, sortDirection, sortColumn); } @@ -200,6 +204,7 @@ public class SubsetServiceMariaDbImpl extends HibernateConnector implements Subs dataSource.close(); } dataDatabaseSidecarGateway.exportFile(database.getContainer().getSidecarHost(), database.getContainer().getSidecarPort(), filename); + httpDataAccessCounter.increment(); return storageService.getResource(filename); } @@ -212,6 +217,7 @@ public class SubsetServiceMariaDbImpl extends HibernateConnector implements Subs final PreparedStatement preparedStatement = connection.prepareStatement(statement); final ResultSet resultSet = preparedStatement.executeQuery(); log.debug("executed statement in {} ms", System.currentTimeMillis() - start); + httpDataAccessCounter.increment(); return dataMapper.resultListToQueryResultDto(columns, resultSet); } catch (SQLException e) { log.error("Failed to execute and map time-versioned query: {}", e.getMessage()); @@ -231,6 +237,7 @@ public class SubsetServiceMariaDbImpl extends HibernateConnector implements Subs final ResultSet resultSet = connection.prepareStatement(mariaDbMapper.countRawSelectQuery(statement, timestamp)) .executeQuery(); log.debug("executed statement in {} ms", System.currentTimeMillis() - start); + httpDataAccessCounter.increment(); return mariaDbMapper.resultSetToNumber(resultSet); } catch (SQLException e) { log.error("Failed to map object: {}", e.getMessage()); diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/TableServiceMariaDbImpl.java b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/TableServiceMariaDbImpl.java index 15ed27f4414a02680511f914453b8bda9ce98da3..cdcde4f2c2c785702284022ab28c9237846f0ec8 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/TableServiceMariaDbImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/TableServiceMariaDbImpl.java @@ -20,6 +20,7 @@ import at.tuwien.service.StorageService; import at.tuwien.service.TableService; import at.tuwien.utils.MariaDbUtil; import com.mchange.v2.c3p0.ComboPooledDataSource; +import io.micrometer.core.instrument.Counter; import lombok.extern.log4j.Log4j2; import org.apache.commons.lang3.RandomStringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -34,6 +35,7 @@ import java.util.*; @Service public class TableServiceMariaDbImpl extends HibernateConnector implements TableService { + private final Counter httpDataAccessCounter; private final S3Config s3Config; private final DataMapper dataMapper; private final MariaDbMapper mariaDbMapper; @@ -42,9 +44,11 @@ public class TableServiceMariaDbImpl extends HibernateConnector implements Table private final DataDatabaseSidecarGateway dataDatabaseSidecarGateway; @Autowired - public TableServiceMariaDbImpl(S3Config s3Config, DataMapper dataMapper, MariaDbMapper mariaDbMapper, - SchemaService schemaService, StorageService storageService, + public TableServiceMariaDbImpl(Counter httpDataAccessCounter, S3Config s3Config, DataMapper dataMapper, + MariaDbMapper mariaDbMapper, SchemaService schemaService, + StorageService storageService, DataDatabaseSidecarGateway dataDatabaseSidecarGateway) { + this.httpDataAccessCounter = httpDataAccessCounter; this.s3Config = s3Config; this.dataMapper = dataMapper; this.mariaDbMapper = mariaDbMapper; @@ -203,6 +207,7 @@ public class TableServiceMariaDbImpl extends HibernateConnector implements Table connection.commit(); queryResult = dataMapper.resultListToQueryResultDto(table.getColumns(), resultSet); log.debug("mapped result in {} ms", System.currentTimeMillis() - start); + httpDataAccessCounter.increment(); } catch (SQLException e) { connection.rollback(); log.error("Failed to find data from table {}.{}: {}", table.getDatabase().getInternalName(), table.getInternalName(), e.getMessage()); @@ -438,6 +443,7 @@ public class TableServiceMariaDbImpl extends HibernateConnector implements Table dataSource.close(); } dataDatabaseSidecarGateway.exportFile(table.getDatabase().getContainer().getSidecarHost(), table.getDatabase().getContainer().getSidecarPort(), fileName); + httpDataAccessCounter.increment(); return storageService.getResource(fileName); } diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/ViewServiceMariaDbImpl.java b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/ViewServiceMariaDbImpl.java index 06cf42ae6ed0b49f56f63648cd3286b4226f727a..bc7a36acd5cad95d84caa428c94e73f0c3bb753a 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/ViewServiceMariaDbImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/ViewServiceMariaDbImpl.java @@ -19,6 +19,7 @@ import at.tuwien.service.StorageService; import at.tuwien.service.ViewService; import com.google.common.hash.Hashing; import com.mchange.v2.c3p0.ComboPooledDataSource; +import io.micrometer.core.instrument.Counter; import lombok.extern.log4j.Log4j2; import org.apache.commons.lang3.RandomStringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -38,6 +39,7 @@ import java.util.List; @Service public class ViewServiceMariaDbImpl extends HibernateConnector implements ViewService { + private final Counter httpDataAccessCounter; private final S3Config s3Config; private final DataMapper dataMapper; private final QueryConfig queryConfig; @@ -48,10 +50,11 @@ public class ViewServiceMariaDbImpl extends HibernateConnector implements ViewSe private final DataDatabaseSidecarGateway dataDatabaseSidecarGateway; @Autowired - public ViewServiceMariaDbImpl(S3Config s3Config, DataMapper dataMapper, QueryConfig queryConfig, - MariaDbMapper mariaDbMapper, SchemaService schemaService, + public ViewServiceMariaDbImpl(Counter httpDataAccessCounter, S3Config s3Config, DataMapper dataMapper, + QueryConfig queryConfig, MariaDbMapper mariaDbMapper, SchemaService schemaService, StorageService storageService, MetadataMapper metadataMapper, DataDatabaseSidecarGateway dataDatabaseSidecarGateway) { + this.httpDataAccessCounter = httpDataAccessCounter; this.s3Config = s3Config; this.dataMapper = dataMapper; this.queryConfig = queryConfig; @@ -165,6 +168,7 @@ public class ViewServiceMariaDbImpl extends HibernateConnector implements ViewSe queryResult = dataMapper.resultListToQueryResultDto(mappedColumns, resultSet); queryResult.setId(view.getId()); connection.commit(); + httpDataAccessCounter.increment(); } catch (SQLException e) { log.error("Failed to map object: {}", e.getMessage()); throw new ViewMalformedException("Failed to map object: " + e.getMessage(), e); @@ -252,6 +256,7 @@ public class ViewServiceMariaDbImpl extends HibernateConnector implements ViewSe } dataDatabaseSidecarGateway.exportFile(database.getContainer().getSidecarHost(), database.getContainer().getSidecarPort(), fileName); + httpDataAccessCounter.increment(); return storageService.getResource(fileName); } diff --git a/dbrepo-metadata-db/1_setup-schema.sql b/dbrepo-metadata-db/1_setup-schema.sql index 9f0f2775cbd235973c1c44d773fa3efe79da5728..9c21d44c0ec15b39f4c0a4205755ae3e904ab521 100644 --- a/dbrepo-metadata-db/1_setup-schema.sql +++ b/dbrepo-metadata-db/1_setup-schema.sql @@ -176,8 +176,8 @@ CREATE TABLE IF NOT EXISTS `mdb_columns` std_dev Numeric NULL, created timestamp NOT NULL DEFAULT NOW(), last_modified timestamp, - PRIMARY KEY (ID), FOREIGN KEY (tID) REFERENCES mdb_tables (ID) ON DELETE CASCADE, + PRIMARY KEY (ID), UNIQUE (tID, internal_name) ) WITH SYSTEM VERSIONING; @@ -201,25 +201,25 @@ CREATE TABLE IF NOT EXISTS `mdb_columns_sets` CREATE TABLE IF NOT EXISTS `mdb_columns_nom` ( - tID bigint, cID bigint, + tID bigint, maxlength INTEGER, last_modified timestamp, created timestamp NOT NULL DEFAULT NOW(), - FOREIGN KEY (tID, cID) REFERENCES mdb_columns (tID, ID), - PRIMARY KEY (tID, cID) + PRIMARY KEY (cID), + FOREIGN KEY (cID) REFERENCES mdb_columns (ID) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_columns_cat` ( - tID bigint, cID bigint, + tID bigint, num_cat INTEGER, -- cat_array TEXT[], last_modified timestamp, created timestamp NOT NULL DEFAULT NOW(), - FOREIGN KEY (tID, cID) REFERENCES mdb_columns (tID, ID), - PRIMARY KEY (tID, cID) + PRIMARY KEY (cID), + FOREIGN KEY (cID) REFERENCES mdb_columns (ID) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_constraints_foreign_key` diff --git a/dbrepo-metadata-service/api/pom.xml b/dbrepo-metadata-service/api/pom.xml index b62bfdc94ad922ffa7b1c8f44e3f1e54d89a2d87..4722e9c3c91fbc07e86af58622d2e3d0cc53de0b 100644 --- a/dbrepo-metadata-service/api/pom.xml +++ b/dbrepo-metadata-service/api/pom.xml @@ -6,12 +6,12 @@ <parent> <groupId>at.tuwien</groupId> <artifactId>dbrepo-metadata-service</artifactId> - <version>1.4.5</version> + <version>1.4.6</version> </parent> <artifactId>dbrepo-metadata-service-api</artifactId> <name>dbrepo-metadata-service-api</name> - <version>1.4.5</version> + <version>1.4.6</version> <dependencies/> diff --git a/dbrepo-metadata-service/entities/pom.xml b/dbrepo-metadata-service/entities/pom.xml index 2fb8efa9e9f07076e4891377c876658dbb04d146..5fc5626e5fb2b3edf42a1c17f1811454a2fc0fdf 100644 --- a/dbrepo-metadata-service/entities/pom.xml +++ b/dbrepo-metadata-service/entities/pom.xml @@ -6,12 +6,12 @@ <parent> <groupId>at.tuwien</groupId> <artifactId>dbrepo-metadata-service</artifactId> - <version>1.4.5</version> + <version>1.4.6</version> </parent> <artifactId>dbrepo-metadata-service-entities</artifactId> <name>dbrepo-metadata-service-entity</name> - <version>1.4.5</version> + <version>1.4.6</version> <dependencies/> diff --git a/dbrepo-metadata-service/oai/pom.xml b/dbrepo-metadata-service/oai/pom.xml index 5b37750134eb43f3c077ac3c719c94fcad8d6d77..c49ff844e9cb921e6eb861e6bfd10f4a25ed822b 100644 --- a/dbrepo-metadata-service/oai/pom.xml +++ b/dbrepo-metadata-service/oai/pom.xml @@ -6,12 +6,12 @@ <parent> <groupId>at.tuwien</groupId> <artifactId>dbrepo-metadata-service</artifactId> - <version>1.4.5</version> + <version>1.4.6</version> </parent> <artifactId>dbrepo-metadata-service-oai</artifactId> <name>dbrepo-metadata-service-oai</name> - <version>1.4.5</version> + <version>1.4.6</version> <dependencies/> diff --git a/dbrepo-metadata-service/pom.xml b/dbrepo-metadata-service/pom.xml index fd44e71dd94659ac965b5819202e7844ffb02291..357275f5ab4facd77aeba583f1aa2a3106717b00 100644 --- a/dbrepo-metadata-service/pom.xml +++ b/dbrepo-metadata-service/pom.xml @@ -27,7 +27,7 @@ <module>report</module> </modules> - <url>https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/</url> + <url>https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.4.6/</url> <developers> <developer> <name>Martin Weise</name> diff --git a/dbrepo-metadata-service/report/pom.xml b/dbrepo-metadata-service/report/pom.xml index 6a7874d4e9352a783ca03711ab1e8efe4eabadea..b1f3d406e814127927acf3ad675467d615bb453b 100644 --- a/dbrepo-metadata-service/report/pom.xml +++ b/dbrepo-metadata-service/report/pom.xml @@ -6,12 +6,12 @@ <parent> <artifactId>dbrepo-metadata-service</artifactId> <groupId>at.tuwien</groupId> - <version>1.4.5</version> + <version>1.4.6</version> </parent> <artifactId>dbrepo-metadata-service-report</artifactId> <name>dbrepo-metadata-service-report</name> - <version>1.4.5</version> + <version>1.4.6</version> <dependencies> <dependency> diff --git a/dbrepo-metadata-service/repositories/pom.xml b/dbrepo-metadata-service/repositories/pom.xml index b67917715a5c2e1200e3e14884e45cd1ff60c055..e80d722a109155e6e78cf4a9e222b11522cf1627 100644 --- a/dbrepo-metadata-service/repositories/pom.xml +++ b/dbrepo-metadata-service/repositories/pom.xml @@ -6,12 +6,12 @@ <parent> <artifactId>dbrepo-metadata-service</artifactId> <groupId>at.tuwien</groupId> - <version>1.4.5</version> + <version>1.4.6</version> </parent> <artifactId>dbrepo-metadata-service-repositories</artifactId> <name>dbrepo-metadata-service-repositories</name> - <version>1.4.5</version> + <version>1.4.6</version> <dependencies> <dependency> diff --git a/dbrepo-metadata-service/rest-service/pom.xml b/dbrepo-metadata-service/rest-service/pom.xml index ab556f9c4521be25c046a5777200ce9ab59cfc6b..c06be275269fbedd04aeea33fe9926abaae09edb 100644 --- a/dbrepo-metadata-service/rest-service/pom.xml +++ b/dbrepo-metadata-service/rest-service/pom.xml @@ -6,12 +6,12 @@ <parent> <artifactId>dbrepo-metadata-service</artifactId> <groupId>at.tuwien</groupId> - <version>1.4.5</version> + <version>1.4.6</version> </parent> <artifactId>dbrepo-metadata-service-rest-service</artifactId> <name>dbrepo-metadata-service-rest</name> - <version>1.4.5</version> + <version>1.4.6</version> <dependencies> <dependency> diff --git a/dbrepo-metadata-service/services/pom.xml b/dbrepo-metadata-service/services/pom.xml index bf2105f98da2ff1644bd94493f54f1b5929ea9ce..5f0bc0960c21eee8b171addb2bdd240a55b3faf7 100644 --- a/dbrepo-metadata-service/services/pom.xml +++ b/dbrepo-metadata-service/services/pom.xml @@ -6,12 +6,12 @@ <parent> <artifactId>dbrepo-metadata-service</artifactId> <groupId>at.tuwien</groupId> - <version>1.4.5</version> + <version>1.4.6</version> </parent> <artifactId>dbrepo-metadata-service-services</artifactId> <name>dbrepo-metadata-service-services</name> - <version>1.4.5</version> + <version>1.4.6</version> <dependencies> <dependency> diff --git a/dbrepo-metadata-service/test/pom.xml b/dbrepo-metadata-service/test/pom.xml index 2c4091eace14d78e0a6323f8960be5ffa6f5cfb0..b7bed994e55bae1797efdd69602e415c275a5062 100644 --- a/dbrepo-metadata-service/test/pom.xml +++ b/dbrepo-metadata-service/test/pom.xml @@ -6,12 +6,12 @@ <parent> <groupId>at.tuwien</groupId> <artifactId>dbrepo-metadata-service</artifactId> - <version>1.4.5</version> + <version>1.4.6</version> </parent> <artifactId>dbrepo-metadata-service-test</artifactId> <name>dbrepo-metadata-service-test</name> - <version>1.4.5</version> + <version>1.4.6</version> <dependencies> <dependency> diff --git a/docker-compose.yml b/docker-compose.yml index 6b412ac7d8153c3c75b166177252dc88e336f656..5effbfdb0b75bd013f09e2b85f3ac55a755e7b3a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,7 +13,7 @@ services: restart: "no" container_name: dbrepo-metadata-db hostname: metadata-db - image: docker.io/bitnami/mariadb:11.1.3-debian-11-r6 + image: docker.io/bitnami/mariadb-galera:11.1.3-debian-11-r8 volumes: - metadata-db-data:/bitnami/mariadb - ./dbrepo-metadata-db/1_setup-schema.sql:/docker-entrypoint-initdb.d/1_setup-schema.sql @@ -21,8 +21,10 @@ services: ports: - "3306:3306" environment: + BITNAMI_DEBUG: "true" MARIADB_DATABASE: "${METADATA_DB:-dbrepo}" MARIADB_ROOT_PASSWORD: "${METADATA_DB_PASSWORD:-dbrepo}" + MARIADB_GALERA_MARIABACKUP_PASSWORD: "${METADATA_DB_BACKUP_PASSWORD:-dbrepobackup}" healthcheck: test: mysqladmin ping --user=root --password="${METADATA_DB_PASSWORD:-dbrepo}" --silent interval: 10s @@ -35,7 +37,7 @@ services: restart: "no" container_name: dbrepo-data-db hostname: data-db - image: docker.io/bitnami/mariadb:11.1.3-debian-11-r6 + image: docker.io/bitnami/mariadb-galera:11.1.3-debian-11-r8 volumes: - data-db-data:/bitnami/mariadb - "${SHARED_VOLUME:-/tmp}:/tmp" @@ -43,6 +45,7 @@ services: - "3307:3306" environment: MARIADB_ROOT_PASSWORD: "${DATA_DB_PASSWORD:-dbrepo}" + MARIADB_GALERA_MARIABACKUP_PASSWORD: "${DATA_DB_BACKUP_PASSWORD:-dbrepobackup}" healthcheck: test: mysqladmin ping --user=root --password="${DATA_DB_PASSWORD:-dbrepo}" --silent interval: 10s @@ -63,6 +66,7 @@ services: environment: MARIADB_DATABASE: "${AUTH_DB_NAME:-keycloak}" MARIADB_ROOT_PASSWORD: "${AUTH_DB_PASSWORD:-dbrepo}" + MARIADB_GALERA_MARIABACKUP_PASSWORD: "${AUTH_DB_BACKUP_PASSWORD:-dbrepobackup}" healthcheck: test: mysqladmin ping --user=root --password="${AUTH_DB_PASSWORD:-dbrepo}" --silent interval: 15s @@ -428,6 +432,8 @@ services: image: bitnami/prometheus:2.54.1-debian-12-r4 volumes: - ./dbrepo-metric-db/prometheus.yml:/etc/prometheus/prometheus.yml + ports: + - 9090:9090 healthcheck: test: promtool check healthy interval: 10s @@ -440,12 +446,10 @@ services: restart: "no" container_name: dbrepo-dashboard-service hostname: dashboard-service - image: docker.io/bitnami/grafana:11.2.0-debian-12-r4 - volumes: - - ./dbrepo-dashboard-service/dashboards:/app/dashboards - - ./dbrepo-dashboard-service/provisioning:/etc/grafana/provisioning - - ./dbrepo-dashboard-service/grafana.ini:/etc/grafana/grafana.ini - - ./dbrepo-dashboard-service/ldap.toml:/etc/grafana/ldap.toml + image: dbrepo-dashboard-service:latest + build: + context: ./dbrepo-dashboard-service + network: host environment: GF_SERVER_DOMAIN: "dashboard-service" GF_SERVER_ROOT_URL: "${BASE_URL:-http://localhost}/dashboard/" diff --git a/helm/dbrepo/Chart.lock b/helm/dbrepo/Chart.lock index a7db225a0715d49501237bdba216941faed2d41c..1607f157b81e5ef8b547ada448735729febc4e71 100644 --- a/helm/dbrepo/Chart.lock +++ b/helm/dbrepo/Chart.lock @@ -25,9 +25,9 @@ dependencies: version: 4.2.5 - name: grafana repository: https://charts.bitnami.com/bitnami - version: 11.3.20 + version: 10.1.1 - name: prometheus repository: https://charts.bitnami.com/bitnami version: 1.3.22 -digest: sha256:5d2c18d8f42cdade4d83cc8906d8b3f31104fb7bb46a6b682348fceaa09258b5 -generated: "2024-09-28T10:34:39.251599835+02:00" +digest: sha256:840d2ea4b1e36fe8fa399fc4170b6274a3de161c13a4a1a3b18ce3107ab71f79 +generated: "2024-10-01T07:48:55.174297756+02:00" diff --git a/helm/dbrepo/Chart.yaml b/helm/dbrepo/Chart.yaml index bf69c2237fbb3101631b80244a769a5031507e79..bbe83a55c4030fc3492b6cb6b1edb050870132c6 100644 --- a/helm/dbrepo/Chart.yaml +++ b/helm/dbrepo/Chart.yaml @@ -58,7 +58,7 @@ dependencies: condition: identityservice.enabled - name: grafana alias: dashboardservice - version: 11.3.20 + version: 10.1.1 repository: https://charts.bitnami.com/bitnami condition: dashboardservice.enabled - name: prometheus diff --git a/helm/dbrepo/charts/dbrepo-mariadb-galera-1.4.6.tgz b/helm/dbrepo/charts/dbrepo-mariadb-galera-1.4.6.tgz index f1735191aaf7450ecb12ba5686cc6872047d66c0..f5a16c907c311685e859a0f971aeae9e603300bc 100644 Binary files a/helm/dbrepo/charts/dbrepo-mariadb-galera-1.4.6.tgz and b/helm/dbrepo/charts/dbrepo-mariadb-galera-1.4.6.tgz differ diff --git a/helm/dbrepo/charts/grafana-10.1.1.tgz b/helm/dbrepo/charts/grafana-10.1.1.tgz new file mode 100644 index 0000000000000000000000000000000000000000..332c7758f160e873e5e5bebe46e5c0353aa03d88 Binary files /dev/null and b/helm/dbrepo/charts/grafana-10.1.1.tgz differ diff --git a/helm/dbrepo/charts/grafana-11.3.20.tgz b/helm/dbrepo/charts/grafana-11.3.20.tgz deleted file mode 100644 index 489481f1027c446bff9a60a9411eeda957d789ee..0000000000000000000000000000000000000000 Binary files a/helm/dbrepo/charts/grafana-11.3.20.tgz and /dev/null differ diff --git a/helm/dbrepo/files/system.json b/helm/dbrepo/files/system.json index 75287d5a0353df5aa77f82ee361888fe00274ef8..68279f8fe4ffc11a52e7a53de0d21f07797f80d5 100644 --- a/helm/dbrepo/files/system.json +++ b/helm/dbrepo/files/system.json @@ -18,6 +18,7 @@ "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 1, + "id": 2, "links": [ { "asDropdown": false, @@ -29,7 +30,7 @@ "title": "Docs", "tooltip": "", "type": "link", - "url": "https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/" + "url": "https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.4.6/" } ], "panels": [ @@ -41,9 +42,9 @@ "x": 0, "y": 0 }, - "id": 3, + "id": 15, "panels": [], - "title": "Overview", + "title": "Data", "type": "row" }, { @@ -54,9 +55,10 @@ }, "fieldConfig": { "defaults": { + "displayName": "QoS", "mappings": [], "thresholds": { - "mode": "percentage", + "mode": "absolute", "steps": [ { "color": "purple", @@ -80,13 +82,13 @@ } ] }, - "unit": "percentunit" + "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 3, - "w": 3, + "w": 4, "x": 0, "y": 1 }, @@ -108,7 +110,7 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "11.2.0", + "pluginVersion": "", "targets": [ { "datasource": { @@ -117,7 +119,7 @@ }, "disableTextWrap": false, "editorMode": "code", - "expr": "sum(up)/count(up)", + "expr": "sum(up)*100/count(up)", "fullMetaSearch": false, "includeNullMetadata": true, "instant": false, @@ -130,17 +132,87 @@ "type": "stat" }, { - "collapsed": false, + "datasource": { + "default": true, + "type": "prometheus", + "uid": "P18F45E9DC7E75912" + }, + "fieldConfig": { + "defaults": { + "displayName": "UI Response Time (Mean)", + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "purple", + "value": null + }, + { + "color": "green", + "value": 0 + }, + { + "color": "yellow", + "value": 200 + }, + { + "color": "orange", + "value": 400 + }, + { + "color": "red", + "value": 600 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 4 + "h": 3, + "w": 4, + "x": 4, + "y": 1 }, - "id": 15, - "panels": [], - "title": "Data", - "type": "row" + "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": "", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "P18F45E9DC7E75912" + }, + "editorMode": "code", + "expr": "avg(page_total_time)", + "format": "table", + "intervalFactor": 3, + "legendFormat": "__auto", + "range": true, + "refId": "B", + "step": 15, + "target": "dev.grafana.cb-office.alerting.active_alerts" + } + ], + "type": "stat" }, { "datasource": { @@ -167,9 +239,9 @@ }, "gridPos": { "h": 3, - "w": 5, - "x": 0, - "y": 5 + "w": 4, + "x": 8, + "y": 1 }, "id": 4, "options": { @@ -189,7 +261,7 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "11.2.0", + "pluginVersion": "", "targets": [ { "datasource": { @@ -235,9 +307,9 @@ }, "gridPos": { "h": 3, - "w": 5, - "x": 5, - "y": 5 + "w": 4, + "x": 12, + "y": 1 }, "id": 5, "options": { @@ -257,7 +329,7 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "11.2.0", + "pluginVersion": "", "targets": [ { "datasource": { @@ -350,9 +422,9 @@ }, "gridPos": { "h": 3, - "w": 5, - "x": 10, - "y": 5 + "w": 4, + "x": 16, + "y": 1 }, "id": 8, "options": { @@ -372,7 +444,7 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "11.2.0", + "pluginVersion": "", "targets": [ { "datasource": { @@ -399,13 +471,101 @@ "h": 1, "w": 24, "x": 0, - "y": 8 + "y": 4 }, "id": 2, "panels": [], "title": "Services", "type": "row" }, + { + "datasource": { + "type": "prometheus", + "uid": "P18F45E9DC7E75912" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 200 + }, + { + "color": "orange", + "value": 400 + }, + { + "color": "red", + "value": 600 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 5 + }, + "id": 13, + "options": { + "displayMode": "gradient", + "maxVizHeight": 300, + "minVizHeight": 16, + "minVizWidth": 8, + "namePlacement": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "sizing": "auto", + "valueMode": "color" + }, + "pluginVersion": "", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "P18F45E9DC7E75912" + }, + "disableTextWrap": false, + "editorMode": "builder", + "exemplar": false, + "expr": "page_total_time{path!=\"empty: empty\"}", + "format": "time_series", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "intervalFactor": 3, + "legendFormat": "{{path}}", + "range": true, + "refId": "B", + "step": 15, + "target": "dev.grafana.cb-office.alerting.active_alerts", + "useBackend": false + } + ], + "title": "UI Response Time", + "type": "bargauge" + }, { "datasource": { "default": true, @@ -424,7 +584,6 @@ "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, - "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 25, "gradientMode": "none", @@ -607,7 +766,7 @@ "h": 6, "w": 24, "x": 0, - "y": 9 + "y": 14 }, "id": 1, "options": { @@ -663,7 +822,6 @@ "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, - "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 25, "gradientMode": "none", @@ -771,7 +929,7 @@ "h": 6, "w": 24, "x": 0, - "y": 15 + "y": 20 }, "id": 6, "options": { @@ -828,7 +986,6 @@ "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, - "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 25, "gradientMode": "none", @@ -933,7 +1090,7 @@ "h": 6, "w": 24, "x": 0, - "y": 21 + "y": 26 }, "id": 7, "options": { @@ -970,240 +1127,19 @@ ], "title": "JVM Memory Usage", "type": "timeseries" - }, - { - "datasource": { - "default": true, - "type": "prometheus", - "uid": "P18F45E9DC7E75912" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "smooth", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "400" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "orange", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "500" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#BF1B00", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "-1" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "purple", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "200" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "302" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-yellow", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "304" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "super-light-yellow", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "401" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-orange", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "499" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "red", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 24, - "x": 0, - "y": 27 - }, - "id": 13, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.1.0-pre", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "P18F45E9DC7E75912" - }, - "editorMode": "code", - "expr": "sum by (status_code) (irate(grafana_http_request_duration_seconds_count[5m]))", - "format": "time_series", - "intervalFactor": 3, - "legendFormat": "{{status_code}}", - "range": true, - "refId": "B", - "step": 15, - "target": "dev.grafana.cb-office.alerting.active_alerts" - } - ], - "title": "Dashboard Service HTTP Status Codes", - "type": "timeseries" } ], "refresh": "10s", "schemaVersion": 39, - "tags": ["provisioned", "dbrepo"], + "tags": [ + "provisioned", + "dbrepo" + ], "templating": { "list": [] }, "time": { - "from": "now-15m", + "from": "now-1h", "to": "now" }, "timepicker": {}, diff --git a/helm/dbrepo/templates/metadata-configmap.yaml b/helm/dbrepo/templates/metadata-configmap.yaml index 5e58101ed9fd99cdbbd7b4881a7f210234f96d6f..dd09e30a569d60843b3012344280c00ffad6600b 100644 --- a/helm/dbrepo/templates/metadata-configmap.yaml +++ b/helm/dbrepo/templates/metadata-configmap.yaml @@ -12,7 +12,7 @@ data: 02-setup-data.sql: | BEGIN; INSERT INTO `mdb_containers` (name, internal_name, image_id, host, port, sidecar_host, sidecar_port, privileged_username, privileged_password) - VALUES ('MariaDB 11.1.3', 'mariadb_11_1_3', 1, 'data-db', 3306, 'data-db', 8080, 'root', 'dbrepo'); + VALUES ('mariadb:11.1.3-debian-11-r6', 'mariadb_11_1_3', 1, 'data-db', 3306, 'data-db', 8080, 'root', 'dbrepo'); COMMIT; 01-setup-schema.sql: | BEGIN; @@ -193,8 +193,8 @@ data: std_dev Numeric NULL, created timestamp NOT NULL DEFAULT NOW(), last_modified timestamp, - PRIMARY KEY (ID), FOREIGN KEY (tID) REFERENCES mdb_tables (ID) ON DELETE CASCADE, + PRIMARY KEY (ID), UNIQUE (tID, internal_name) ) WITH SYSTEM VERSIONING; @@ -218,25 +218,25 @@ data: CREATE TABLE IF NOT EXISTS `mdb_columns_nom` ( - tID bigint, cID bigint, + tID bigint, maxlength INTEGER, last_modified timestamp, created timestamp NOT NULL DEFAULT NOW(), - FOREIGN KEY (tID, cID) REFERENCES mdb_columns (tID, ID), - PRIMARY KEY (tID, cID) + PRIMARY KEY (cID), + FOREIGN KEY (cID) REFERENCES mdb_columns (ID) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_columns_cat` ( - tID bigint, cID bigint, + tID bigint, num_cat INTEGER, -- cat_array TEXT[], last_modified timestamp, created timestamp NOT NULL DEFAULT NOW(), - FOREIGN KEY (tID, cID) REFERENCES mdb_columns (tID, ID), - PRIMARY KEY (tID, cID) + PRIMARY KEY (cID), + FOREIGN KEY (cID) REFERENCES mdb_columns (ID) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_constraints_foreign_key` diff --git a/make/rel.mk b/make/rel.mk index 1f8b5a1cc56c5d6fe7164ebfa4c9007363a4ddbc..042b93d5680b93115202bd207538821c952d8f28 100644 --- a/make/rel.mk +++ b/make/rel.mk @@ -4,6 +4,7 @@ tag-images: build-images ## Tag the docker images. docker tag dbrepo-analyse-service:latest "${REPOSITORY_URL}/analyse-service:${APP_VERSION}" docker tag dbrepo-auth-service:latest "${REPOSITORY_URL}/auth-service:${APP_VERSION}" + docker tag dbrepo-dashboard-service:latest "${REPOSITORY_URL}/dashboard-service:${APP_VERSION}" docker tag dbrepo-ui:latest "${REPOSITORY_URL}/ui:${APP_VERSION}" docker tag dbrepo-data-service:latest "${REPOSITORY_URL}/data-service:${APP_VERSION}" docker tag dbrepo-metadata-service:latest "${REPOSITORY_URL}/metadata-service:${APP_VERSION}" @@ -17,6 +18,7 @@ tag-images: build-images ## Tag the docker images. release-images: tag-images ## Release the docker images. docker push "${REPOSITORY_URL}/analyse-service:${APP_VERSION}" docker push "${REPOSITORY_URL}/auth-service:${APP_VERSION}" + docker push "${REPOSITORY_URL}/dashboard-service:${APP_VERSION}" docker push "${REPOSITORY_URL}/ui:${APP_VERSION}" docker push "${REPOSITORY_URL}/data-service:${APP_VERSION}" docker push "${REPOSITORY_URL}/search-db:${APP_VERSION}"