From c0f5247ed2917b77b83c01a0c2f92fa5b6a4cf77 Mon Sep 17 00:00:00 2001 From: Slimane AMAR Date: Thu, 19 Dec 2024 14:33:34 +0100 Subject: [PATCH 1/2] Rename some panels Signed-off-by: Slimane AMAR --- .../grafana/dashboards/computations_metrics.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docker-compose/technical/grafana/dashboards/computations_metrics.json b/docker-compose/technical/grafana/dashboards/computations_metrics.json index 68511925..90189873 100644 --- a/docker-compose/technical/grafana/dashboards/computations_metrics.json +++ b/docker-compose/technical/grafana/dashboards/computations_metrics.json @@ -72,7 +72,7 @@ "refId": "A" } ], - "title": "Computation reports", + "title": "Computation stats", "type": "row" }, { @@ -464,7 +464,7 @@ "disableTextWrap": false, "editorMode": "builder", "exemplar": true, - "expr": "sum(app_computation_run_seconds_count{type='$COMPUTATION', error!=\"none\"}) by (provider)", + "expr": "sum(rate(app_computation_run_seconds_count{type='$COMPUTATION', error!=\"none\"}[$__rate_interval])) by (provider) * 60", "fullMetaSearch": false, "includeNullMetadata": true, "instant": false, @@ -475,7 +475,7 @@ "useBackend": false } ], - "title": "Computation with exception count", + "title": "Computation rate with exception (count/min)", "type": "timeseries" }, { @@ -896,7 +896,7 @@ }, "id": 15, "panels": [], - "title": "Computation queues", + "title": "Computation count", "type": "row" }, { @@ -996,7 +996,7 @@ "useBackend": false } ], - "title": "Computation run ready queue", + "title": "Queued computation", "type": "timeseries" } ], From b88acd15e4e2c36b5b8dcca44102e8cd6dea2a14 Mon Sep 17 00:00:00 2001 From: Slimane AMAR Date: Thu, 26 Dec 2024 14:49:29 +0100 Subject: [PATCH 2/2] Add panel fot current computation count Signed-off-by: Slimane AMAR --- .../dashboards/computations_metrics.json | 100 ++++++++++++++++++ .../grafana/dashboards/users_metrics.json | 2 +- 2 files changed, 101 insertions(+), 1 deletion(-) diff --git a/docker-compose/technical/grafana/dashboards/computations_metrics.json b/docker-compose/technical/grafana/dashboards/computations_metrics.json index 90189873..651d485d 100644 --- a/docker-compose/technical/grafana/dashboards/computations_metrics.json +++ b/docker-compose/technical/grafana/dashboards/computations_metrics.json @@ -998,6 +998,106 @@ ], "title": "Queued computation", "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Messages with ready state count in rabbitmq queue.\nDisplay how many calculation are waiting to be ran.\nCalculation currently running are not counted here", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 33 + }, + "id": 16, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "sum(app_computation_current_count{type='$COMPUTATION'}) by (provider)", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "{{provider}}", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "Current computation", + "type": "timeseries" } ], "refresh": "5s", diff --git a/docker-compose/technical/grafana/dashboards/users_metrics.json b/docker-compose/technical/grafana/dashboards/users_metrics.json index a0df72ec..ea6ebf06 100644 --- a/docker-compose/technical/grafana/dashboards/users_metrics.json +++ b/docker-compose/technical/grafana/dashboards/users_metrics.json @@ -160,7 +160,7 @@ }, "editorMode": "code", "exemplar": true, - "expr": "count(count by (user) (app_users))", + "expr": "count(app_users)", "interval": "", "legendFormat": "", "range": true,