diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ed94a2f..7f77ce5 100755 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,32 +4,39 @@ stages: - publish_latest - publish_docker -cache: - paths: - - build/libs/ - build: image: openjdk:8 stage: build script: + - export VERSION="$CI_COMMIT_REF_NAME" - ./gradlew build - "ls -lah build/libs" + cache: + key: "mangadex_at_home-build" + paths: + - /root/.gradle + artifacts: + name: "mangadex_at_home" + paths: + - "build/libs/mangadex_at_home-*-all.jar" publish: image: alpine stage: publish before_script: - apk update && apk add git zip - - export VERSION=`git describe --tags --dirty` + - export VERSION="$CI_COMMIT_REF_NAME" script: - cp build/libs/mangadex_at_home-${VERSION}-all.jar ./ - zip -r9 mangadex_at_home-${VERSION}.zip mangadex_at_home-${VERSION}-all.jar settings.sample.json + dependencies: + - build artifacts: name: "mangadex_at_home" paths: - - "*.jar" + - "mangadex_at_home-*-all.jar" - "mangadex_at_home-*.zip" - - settings.sample.yaml + - "settings.sample.yaml" publish_docker: image: docker:git @@ -40,9 +47,10 @@ publish_docker: - docker:dind before_script: - echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin ${CI_REGISTRY} - - export VERSION=`git describe --tags --dirty` + - export VERSION="$CI_COMMIT_REF_NAME" + dependencies: + - build script: - mv build/libs/mangadex_at_home-${VERSION}-all.jar build/libs/mangadex_at_home.jar - - docker build -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:latest . + - docker build . -t ${CI_REGISTRY_IMAGE}:${VERSION} - docker push ${CI_REGISTRY_IMAGE}:${VERSION} - - docker push ${CI_REGISTRY_IMAGE}:latest diff --git a/CHANGELOG.md b/CHANGELOG.md index e60ebe0..57c7645 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,12 +8,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added ### Changed +- [2020-02-10] Fix Prometheus to 2.24.1 and Grafana to 7.4.0 [@_tde9] +- [2020-02-10] Update and rearrange the embedded dashboard with the new Timeseries panel from Grafana 7.4 [@_tde9] +- [2020-02-10] Update sample dashboard screenshot thanks to DLMSweet :smile: [@_tde9] ### Deprecated ### Removed ### Fixed +- [2020-02-21] Fix pipeline [@_tde9] ### Security diff --git a/build.gradle b/build.gradle index bb2d8de..a83fc08 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ plugins { } group = "com.mangadex" -version = "git describe --tags --dirty".execute().text.trim() +version = System.getenv().getOrDefault("VERSION", 'git describe --tags --dirty'.execute().text.trim()) mainClassName = "mdnet.MainKt" repositories { diff --git a/docker/dashboard.png b/docker/dashboard.png index 350e85e..cd07380 100755 Binary files a/docker/dashboard.png and b/docker/dashboard.png differ diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index ae8fc3a..060178d 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -31,7 +31,7 @@ services: prometheus: container_name: prometheus - image: prom/prometheus + image: prom/prometheus:v2.24.1 user: "root" group_add: - 0 @@ -50,7 +50,7 @@ services: grafana: container_name: grafana - image: grafana/grafana + image: grafana/grafana:7.4.0 user: "root" group_add: - 0 diff --git a/docker/grafana/dashboards/mangadex_at_home.json b/docker/grafana/dashboards/mangadex_at_home.json index 0cf2fb3..2eb3f07 100644 --- a/docker/grafana/dashboards/mangadex_at_home.json +++ b/docker/grafana/dashboards/mangadex_at_home.json @@ -17,7 +17,7 @@ "editable": false, "gnetId": null, "graphTooltip": 1, - "iteration": 1612597868573, + "iteration": 1612974883967, "links": [], "panels": [ { @@ -35,76 +35,110 @@ "type": "row" }, { - "aliasColors": { - "CPU Used": "dark-green", - "CPU load (1m)": "dark-green", - "mangadex-at-home": "dark-green" - }, - "bars": false, "cacheTimeout": null, - "dashLength": 10, - "dashes": false, "datasource": "Prometheus", - "decimals": 2, "description": "*Warning:* CPU load can be a bit of a deceiving metric\n\nBest I can say is read the [wikipedia article](https://en.wikipedia.org/wiki/Load_(computing)#Interpretation)", "fieldConfig": { "defaults": { - "custom": { - "align": null, - "filterable": false + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 30, + "gradientMode": "hue", + "hideFrom": { + "graph": false, + "legend": false, + "tooltip": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true }, - "decimals": 2, "mappings": [], - "min": 0, "thresholds": { - "mode": "percentage", + "mode": "absolute", "steps": [ { - "color": "super-light-blue", + "color": "green", "value": null + }, + { + "color": "red", + "value": 80 } ] }, "unit": "short" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "mangadex-at-home" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "CPU load (1m)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 7, - "w": 9, + "h": 8, + "w": 8, "x": 0, "y": 1 }, - "hiddenSeries": false, "id": 18, "interval": null, - "legend": { - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "graph": {}, + "legend": { + "calcs": [ + "min", + "max", + "mean", + "last" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltipOptions": { + "mode": "multi" + } }, - "percentage": false, - "pluginVersion": "7.3.7", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "7.4.0", "targets": [ { "expr": "process_cpu_usage", @@ -113,124 +147,133 @@ "refId": "A" } ], - "thresholds": [], "timeFrom": null, - "timeRegions": [], "timeShift": null, "title": "CPU Load", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": { - "Committed": "dark-red", - "Used": "dark-green" - }, - "bars": false, "cacheTimeout": null, - "dashLength": 10, - "dashes": false, "datasource": "Prometheus", - "description": "Amount *used* by the JVM\n\nIt might have allocated more, but this is the amount it actually is using out of it", + "description": "Amount *used* by the JVM\n\nIt might have requested more from the system (*commited*), but this is the amount it actually is using out of it", "fieldConfig": { "defaults": { - "custom": { - "align": null, - "filterable": false + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 30, + "gradientMode": "hue", + "hideFrom": { + "graph": false, + "legend": false, + "tooltip": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true }, - "decimals": 2, "mappings": [], "min": 0, "thresholds": { - "mode": "percentage", + "mode": "absolute", "steps": [ { - "color": "super-light-blue", + "color": "green", "value": null + }, + { + "color": "red", + "value": 80 } ] }, "unit": "decbytes" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Committed" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Used" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Committed" + }, + "properties": [ + { + "id": "custom.fillOpacity", + "value": 0 + }, + { + "id": "custom.lineWidth", + "value": 2 + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 7, + "h": 8, "w": 8, - "x": 9, + "x": 8, "y": 1 }, - "hiddenSeries": false, "id": 19, "interval": null, - "legend": { - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.7", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Committed", - "color": "#C4162A", - "fill": 0, - "legend": false, - "linewidth": 2 + "graph": {}, + "legend": { + "calcs": [ + "min", + "max", + "mean", + "last" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltipOptions": { + "mode": "multi" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "7.4.0", "targets": [ { "aggregation": "Last", @@ -262,64 +305,47 @@ "valueHandler": "Number Threshold" } ], - "thresholds": [], "timeFrom": null, - "timeRegions": [], "timeShift": null, "title": "RAM", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "decbytes", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "format": "decbytes", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": true, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": { - "Actual": "dark-green", - "Actual use": "dark-green", - "Reported": "super-light-blue" - }, - "bars": false, "cacheTimeout": null, - "dashLength": 10, - "dashes": false, "datasource": "Prometheus", - "description": "", + "description": "This is the mean outgoing network speed reported, by blocks of [$itvl].", "fieldConfig": { "defaults": { + "color": { + "mode": "palette-classic" + }, "custom": { - "align": null, - "filterable": false + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 70, + "gradientMode": "hue", + "hideFrom": { + "graph": false, + "legend": false, + "tooltip": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "dash": [ + 0, + 10 + ], + "fill": "dot" + }, + "lineWidth": 1, + "pointSize": 2, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false }, "mappings": [], "min": 0, @@ -327,67 +353,85 @@ "mode": "absolute", "steps": [ { - "color": "super-light-blue", + "color": "green", "value": null }, { - "color": "#EAB839", - "value": 750000000 - }, - { - "color": "dark-red", - "value": 900000000 + "color": "red", + "value": 80 } ] }, "unit": "bps" }, - "overrides": [] + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "Actual" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "graph": true, + "legend": false, + "tooltip": false + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Actual" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "super-light-blue", + "mode": "fixed" + } + } + ] + } + ] }, - "fill": 2, - "fillGradient": 0, "gridPos": { - "h": 7, - "w": 7, - "x": 17, + "h": 8, + "w": 8, + "x": 16, "y": 1 }, - "hiddenSeries": false, "id": 20, "interval": "", - "legend": { - "alignAsTable": false, - "avg": true, - "current": true, - "max": true, - "min": false, - "rightSide": false, - "show": true, - "sideWidth": null, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.7", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Reported", - "fill": 0 + "graph": {}, + "legend": { + "calcs": [ + "min", + "max", + "mean", + "last" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltipOptions": { + "mode": "multi" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "7.4.0", "targets": [ { "aggregation": "Last", @@ -404,52 +448,19 @@ "valueHandler": "Number Threshold" } ], - "thresholds": [], "timeFrom": null, - "timeRegions": [], "timeShift": null, "title": "Outgoing bandwidth [$itvl]", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bps", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "format": "bps", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": 0 - } + "type": "timeseries" }, { "datasource": "Prometheus", "description": "Current uptime of client process", "fieldConfig": { "defaults": { + "color": { + "mode": "thresholds" + }, "custom": {}, "decimals": 2, "mappings": [], @@ -469,9 +480,9 @@ }, "gridPos": { "h": 3, - "w": 5, + "w": 4, "x": 0, - "y": 8 + "y": 9 }, "id": 51, "options": { @@ -486,9 +497,10 @@ "fields": "/.*/", "values": false }, + "text": {}, "textMode": "value_and_name" }, - "pluginVersion": "7.3.7", + "pluginVersion": "7.4.0", "targets": [ { "expr": "process_uptime_seconds", @@ -522,10 +534,10 @@ "description": "This is the number of threads the JVM is currently using\n\nShould generally be around `50 + `", "fieldConfig": { "defaults": { - "custom": { - "align": null, - "filterable": false + "color": { + "mode": "thresholds" }, + "custom": {}, "mappings": [], "min": 0, "thresholds": { @@ -544,8 +556,8 @@ "gridPos": { "h": 3, "w": 2, - "x": 5, - "y": 8 + "x": 4, + "y": 9 }, "id": 32, "interval": null, @@ -562,9 +574,10 @@ "fields": "", "values": false }, + "text": {}, "textMode": "auto" }, - "pluginVersion": "7.3.7", + "pluginVersion": "7.4.0", "targets": [ { "aggregation": "Last", @@ -582,7 +595,7 @@ ], "timeFrom": null, "timeShift": null, - "title": "JVM threads", + "title": "Threads", "transparent": true, "type": "stat" }, @@ -592,10 +605,10 @@ "description": "Files currently opened\n\nShould generally be around `100 + `", "fieldConfig": { "defaults": { - "custom": { - "align": null, - "filterable": false + "color": { + "mode": "thresholds" }, + "custom": {}, "mappings": [], "min": 0, "thresholds": { @@ -614,8 +627,8 @@ "gridPos": { "h": 3, "w": 2, - "x": 7, - "y": 8 + "x": 6, + "y": 9 }, "id": 34, "interval": null, @@ -632,9 +645,10 @@ "fields": "", "values": false }, + "text": {}, "textMode": "auto" }, - "pluginVersion": "7.3.7", + "pluginVersion": "7.4.0", "targets": [ { "aggregation": "Last", @@ -659,13 +673,13 @@ { "cacheTimeout": null, "datasource": "Prometheus", - "description": "", + "description": "This can be seen as the \"live\" memory of the JVM\n\nIn a healthy situation, it should fluctuate up and down regularly (as more data is used, then old one is released)", "fieldConfig": { "defaults": { - "custom": { - "align": null, - "filterable": false + "color": { + "mode": "thresholds" }, + "custom": {}, "mappings": [], "min": 0, "thresholds": { @@ -684,8 +698,8 @@ "gridPos": { "h": 3, "w": 2, - "x": 9, - "y": 8 + "x": 8, + "y": 9 }, "id": 30, "interval": null, @@ -702,9 +716,10 @@ "fields": "", "values": false }, + "text": {}, "textMode": "auto" }, - "pluginVersion": "7.3.7", + "pluginVersion": "7.4.0", "targets": [ { "aggregation": "Last", @@ -722,20 +737,20 @@ ], "timeFrom": null, "timeShift": null, - "title": "JVM heap", + "title": "Heap", "transparent": true, "type": "stat" }, { "cacheTimeout": null, "datasource": "Prometheus", - "description": "", + "description": "This can be seen as the memory used by the JVM for critical use\n\nIt should generally be mostly static and not vary much", "fieldConfig": { "defaults": { - "custom": { - "align": null, - "filterable": false + "color": { + "mode": "thresholds" }, + "custom": {}, "mappings": [], "min": 0, "thresholds": { @@ -754,8 +769,8 @@ "gridPos": { "h": 3, "w": 2, - "x": 11, - "y": 8 + "x": 10, + "y": 9 }, "id": 36, "interval": null, @@ -772,9 +787,10 @@ "fields": "", "values": false }, + "text": {}, "textMode": "auto" }, - "pluginVersion": "7.3.7", + "pluginVersion": "7.4.0", "targets": [ { "expr": "sum(jvm_memory_used_bytes{area=\"nonheap\"})", @@ -785,7 +801,7 @@ ], "timeFrom": null, "timeShift": null, - "title": "JVM direct", + "title": "Non-heap", "transparent": true, "type": "stat" }, @@ -795,10 +811,10 @@ "description": "This is the percentage of time that your client spends freeing up memory, specifically when this process requires your application to completely pause.\n\nIf this is at 50%, it would mean that out of every 1 second that passes, your application is paused for 500ms of it. It should never be higher than a percent or so.", "fieldConfig": { "defaults": { - "custom": { - "align": null, - "filterable": false + "color": { + "mode": "thresholds" }, + "custom": {}, "mappings": [], "min": 0, "thresholds": { @@ -825,8 +841,8 @@ "gridPos": { "h": 3, "w": 4, - "x": 13, - "y": 8 + "x": 12, + "y": 9 }, "id": 31, "interval": null, @@ -843,9 +859,10 @@ "fields": "", "values": false }, + "text": {}, "textMode": "auto" }, - "pluginVersion": "7.3.7", + "pluginVersion": "7.4.0", "targets": [ { "aggregation": "Last", @@ -873,10 +890,10 @@ "description": "Total number of requests successfully served over timerange selected", "fieldConfig": { "defaults": { - "custom": { - "align": null, - "filterable": false + "color": { + "mode": "thresholds" }, + "custom": {}, "mappings": [], "min": 0, "thresholds": { @@ -894,9 +911,9 @@ }, "gridPos": { "h": 3, - "w": 3, - "x": 17, - "y": 8 + "w": 4, + "x": 16, + "y": 9 }, "id": 37, "interval": null, @@ -913,9 +930,10 @@ "fields": "", "values": false }, + "text": {}, "textMode": "value_and_name" }, - "pluginVersion": "7.3.7", + "pluginVersion": "7.4.0", "targets": [ { "aggregation": "Last", @@ -958,10 +976,10 @@ "description": "Total bytes sent over timerange currently selected", "fieldConfig": { "defaults": { - "custom": { - "align": null, - "filterable": false + "color": { + "mode": "thresholds" }, + "custom": {}, "mappings": [], "min": 0, "thresholds": { @@ -981,7 +999,7 @@ "h": 3, "w": 4, "x": 20, - "y": 8 + "y": 9 }, "id": 35, "interval": null, @@ -998,9 +1016,10 @@ "fields": "", "values": false }, + "text": {}, "textMode": "value_and_name" }, - "pluginVersion": "7.3.7", + "pluginVersion": "7.4.0", "targets": [ { "aggregation": "Last", @@ -1044,7 +1063,7 @@ "h": 1, "w": 24, "x": 0, - "y": 11 + "y": 12 }, "id": 12, "panels": [], @@ -1083,10 +1102,10 @@ "fill": 10, "fillGradient": 0, "gridPos": { - "h": 15, - "w": 8, + "h": 14, + "w": 9, "x": 0, - "y": 12 + "y": 13 }, "hiddenSeries": false, "id": 2, @@ -1107,7 +1126,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.3.7", + "pluginVersion": "7.4.0", "pointradius": 2, "points": false, "renderer": "flot", @@ -1184,6 +1203,265 @@ "alignLevel": null } }, + { + "aliasColors": { + "ClientAbortException": "dark-red", + "HIT": "dark-blue", + "IllegalStateException": "yellow", + "MISS": "yellow", + "Success": "green" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 10, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 8, + "x": 9, + "y": 13 + }, + "hiddenSeries": false, + "id": 3, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 0, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": true, + "pluginVersion": "7.4.0", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(http_server_request_latency_seconds_count{path=~\"(.*)data/{chapterHash}/{fileName}\"}[$itvl])) by (cache)", + "interval": "", + "legendFormat": "{{ cache }}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Cache spread [$itvl]", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:314", + "format": "reqps", + "label": null, + "logBase": 1, + "max": "100", + "min": "0", + "show": true + }, + { + "$$hashKey": "object:315", + "format": "percentunit", + "label": "hitrate", + "logBase": 1, + "max": "100", + "min": "0", + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": {}, + "mappings": [ + { + "from": "1", + "id": 1, + "text": "Disconnected", + "to": "1000", + "type": 2, + "value": "" + }, + { + "from": "0", + "id": 2, + "text": "Connected", + "to": "1", + "type": 2, + "value": "" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + }, + { + "color": "dark-red", + "value": 1 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 17, + "y": 13 + }, + "id": 56, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "7.4.0", + "targets": [ + { + "expr": "sum(resilience4j_circuitbreaker_state{name=\"upstream\", state!=\"closed\"})", + "instant": true, + "interval": "", + "legendFormat": "{{ state }}", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Upstream status", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "Prometheus", + "description": "Average cache hitrate of the current timerange\n\nSplits timerange in blocks of [$itvl], and averages their averages", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": {}, + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "#EAB839", + "value": 0.75 + }, + { + "color": "dark-green", + "value": 0.9 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 20, + "y": 13 + }, + "id": 54, + "interval": null, + "links": [], + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "7.4.0", + "targets": [ + { + "expr": "sum(rate(http_server_request_latency_seconds_count{path=~\"(.*)data/{chapterHash}/{fileName}\", cache=\"HIT\"}[$itvl])) / sum(rate(http_server_request_latency_seconds_count{path=~\"(.*)data/{chapterHash}/{fileName}\"}[$itvl]))", + "interval": "", + "legendFormat": "", + "refId": "B" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Avg hitrate over timerange", + "type": "stat" + }, { "aliasColors": { "200 - SUCCESS": "dark-green", @@ -1215,10 +1493,10 @@ "fill": 8, "fillGradient": 0, "gridPos": { - "h": 9, - "w": 8, - "x": 8, - "y": 12 + "h": 10, + "w": 7, + "x": 17, + "y": 17 }, "hiddenSeries": false, "id": 13, @@ -1241,7 +1519,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.3.7", + "pluginVersion": "7.4.0", "pointradius": 2, "points": false, "renderer": "flot", @@ -1331,310 +1609,175 @@ "datasource": null, "fieldConfig": { "defaults": { - "custom": {}, - "mappings": [ - { - "from": "1", - "id": 1, - "text": "Disconnected", - "to": "1000", - "type": 2, - "value": "" - }, - { - "from": "0", - "id": 2, - "text": "Connected", - "to": "1", - "type": 2, - "value": "" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - }, - { - "color": "dark-red", - "value": 1 - } - ] + "color": { + "mode": "palette-classic" }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 16, - "y": 12 - }, - "id": 56, - "options": { - "colorMode": "background", - "graphMode": "area", - "justifyMode": "center", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "mean" - ], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.3.7", - "targets": [ - { - "expr": "sum(resilience4j_circuitbreaker_state{name=\"upstream\", state!=\"closed\"})", - "instant": true, - "interval": "", - "legendFormat": "{{ state }}", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Upstream status", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "Prometheus", - "description": "Average cache hitrate of the current timerange\n\nSplits timerange in blocks of [$itvl], and averages their averages", - "fieldConfig": { - "defaults": { "custom": { - "align": null, - "filterable": false + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "graph": false, + "legend": false, + "tooltip": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true }, "mappings": [], - "max": 1, - "min": 0, "thresholds": { "mode": "absolute", "steps": [ { - "color": "dark-red", + "color": "green", "value": null }, { - "color": "#EAB839", - "value": 0.75 - }, - { - "color": "dark-green", - "value": 0.9 + "color": "red", + "value": 80 } ] }, - "unit": "percentunit" + "unit": "s" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "0.5" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "0.75" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-yellow", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "0.9" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-orange", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "0.99" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "SUCCESS - 0.5" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "SUCCESS - 0.9" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "SUCCESS - 0.99" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + } + ] }, - "gridPos": { - "h": 4, - "w": 5, - "x": 19, - "y": 12 - }, - "id": 54, - "interval": null, - "links": [], - "options": { - "colorMode": "background", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "mean" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "7.3.7", - "targets": [ - { - "expr": "sum(rate(http_server_request_latency_seconds_count{path=~\"(.*)data/{chapterHash}/{fileName}\", cache=\"HIT\"}[$itvl])) / sum(rate(http_server_request_latency_seconds_count{path=~\"(.*)data/{chapterHash}/{fileName}\"}[$itvl]))", - "interval": "", - "legendFormat": "", - "refId": "B" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Avg hitrate over timerange", - "type": "stat" - }, - { - "aliasColors": { - "ClientAbortException": "dark-red", - "HIT": "dark-blue", - "IllegalStateException": "yellow", - "MISS": "yellow", - "Success": "green" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "fill": 10, - "fillGradient": 0, - "gridPos": { - "h": 11, - "w": 8, - "x": 16, - "y": 16 - }, - "hiddenSeries": false, - "id": 3, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 0, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": true, - "pluginVersion": "7.3.7", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(http_server_request_latency_seconds_count{path=~\"(.*)data/{chapterHash}/{fileName}\"}[$itvl])) by (cache)", - "interval": "", - "legendFormat": "{{ cache }}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Cache spread [$itvl]", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:314", - "format": "reqps", - "label": null, - "logBase": 1, - "max": "100", - "min": "0", - "show": true - }, - { - "$$hashKey": "object:315", - "format": "percentunit", - "label": "hitrate", - "logBase": 1, - "max": "100", - "min": "0", - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { - "0.5": "dark-green", - "0.75": "dark-yellow", - "0.9": "dark-orange", - "0.99": "dark-red", - "SUCCESS - 0.5": "dark-green", - "SUCCESS - 0.9": "yellow", - "SUCCESS - 0.99": "red" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 6, "w": 8, - "x": 8, + "x": 9, "y": 21 }, - "hiddenSeries": false, "id": 49, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 2, - "nullPointMode": "null", "options": { - "alertThreshold": true + "graph": {}, + "legend": { + "calcs": [ + "mean" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltipOptions": { + "mode": "multi" + } }, - "percentage": false, - "pluginVersion": "7.3.7", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "7.4.0", "targets": [ { "expr": "avg(avg_over_time(cache_lookup_seconds[$itvl])) by (quantile)", @@ -1643,47 +1786,10 @@ "refId": "A" } ], - "thresholds": [], "timeFrom": null, - "timeRegions": [], "timeShift": null, "title": "Cache latency [$itvl]", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "decimals": 0, - "format": "cps", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { "collapsed": true, @@ -1717,7 +1823,7 @@ "h": 15, "w": 11, "x": 0, - "y": 27 + "y": 28 }, "hideEmpty": true, "hideZero": true, @@ -1768,23 +1874,10 @@ "datasource": null, "fieldConfig": { "defaults": { - "custom": { - "align": null, - "filterable": false - }, - "mappings": [], + "custom": {}, "thresholds": { "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + "steps": [] } }, "overrides": [] @@ -1795,7 +1888,7 @@ "h": 15, "w": 13, "x": 11, - "y": 27 + "y": 28 }, "hiddenSeries": false, "id": 41, @@ -1821,7 +1914,7 @@ "alertThreshold": false }, "percentage": false, - "pluginVersion": "7.3.7", + "pluginVersion": "7.4.0", "pointradius": 0.5, "points": false, "renderer": "flot", @@ -1886,7 +1979,7 @@ } ], "refresh": "30s", - "schemaVersion": 26, + "schemaVersion": 27, "style": "dark", "tags": [], "templating": { @@ -1900,6 +1993,7 @@ "text": "auto", "value": "$__auto_interval_itvl" }, + "description": null, "error": null, "hide": 0, "label": "Resolution", @@ -1975,12 +2069,12 @@ ] }, "time": { - "from": "now-1h", + "from": "now-30m", "to": "now" }, "timepicker": {}, "timezone": "", "title": "MangaDex@Home - Personal client dashboard", "uid": "a7sZAw2Mk", - "version": 3 + "version": 4 }