From ac4ecf695f8e6ba9d727d99fb36ee7c8882e5981 Mon Sep 17 00:00:00 2001 From: VirtualWolf Date: Mon, 26 Jan 2026 12:50:49 +0100 Subject: [PATCH] [bugfix] Updated the example Grafana dashboard for the new metric names in GoToSocial 0.20.0. (#4525) # Description With 0.20.0, it appears that the metric names have changed, for example `gotosocial_workers_client_api_count` is now `gotosocial.workers.client_api.count`, `http_server_requests_total` is now `http.server.requests_total`, and so on. The example Grafana dashboard in the repo still uses the old all-underscores metric names and so everything except the Go-specific metrics are blank. This PR updates the dashboards to match the new metric names. ## Checklist - [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md). - [x] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat. - [x] I/we have not leveraged AI to create the proposed changes. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4525 Co-authored-by: VirtualWolf Co-committed-by: VirtualWolf --- .../metrics/gotosocial_grafana_dashboard.json | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/example/metrics/gotosocial_grafana_dashboard.json b/example/metrics/gotosocial_grafana_dashboard.json index 1a1b720db..3b4ef8809 100644 --- a/example/metrics/gotosocial_grafana_dashboard.json +++ b/example/metrics/gotosocial_grafana_dashboard.json @@ -129,7 +129,7 @@ { "disableTextWrap": false, "editorMode": "builder", - "expr": "gotosocial_workers_client_api_count{job=\"$job\", instance=~\"$instance\"}", + "expr": "{\"gotosocial.workers.client_api.count\", job=\"$job\", instance=~\"$instance\"}", "fullMetaSearch": false, "includeNullMetadata": true, "legendFormat": "{{__name__}}", @@ -148,7 +148,7 @@ }, "disableTextWrap": false, "editorMode": "builder", - "expr": "gotosocial_workers_delivery_count{job=\"$job\", instance=~\"$instance\"}", + "expr": "{\"gotosocial.workers.delivery.count\", job=\"$job\", instance=~\"$instance\"}", "fullMetaSearch": false, "hide": false, "includeNullMetadata": true, @@ -164,7 +164,7 @@ }, "disableTextWrap": false, "editorMode": "builder", - "expr": "gotosocial_workers_dereference_count{job=\"$job\", instance=~\"$instance\"}", + "expr": "{\"gotosocial.workers.dereference.count\", job=\"$job\", instance=~\"$instance\"}", "fullMetaSearch": false, "hide": false, "includeNullMetadata": true, @@ -180,7 +180,7 @@ }, "disableTextWrap": false, "editorMode": "builder", - "expr": "gotosocial_workers_fedi_api_count{job=\"$job\", instance=~\"$instance\"}", + "expr": "{\"gotosocial.workers.fedi_api.count\", job=\"$job\", instance=~\"$instance\"}", "fullMetaSearch": false, "hide": false, "includeNullMetadata": true, @@ -196,7 +196,7 @@ }, "disableTextWrap": false, "editorMode": "builder", - "expr": "gotosocial_workers_processing_count{job=\"$job\", instance=~\"$instance\"}", + "expr": "{\"gotosocial.workers.processing.count\", job=\"$job\", instance=~\"$instance\"}", "fullMetaSearch": false, "hide": false, "includeNullMetadata": true, @@ -212,7 +212,7 @@ }, "disableTextWrap": false, "editorMode": "builder", - "expr": "gotosocial_workers_webpush_count{job=\"$job\", instance=~\"$instance\"}", + "expr": "{\"gotosocial.workers.webpush.count\", job=\"$job\", instance=~\"$instance\"}", "fullMetaSearch": false, "hide": false, "includeNullMetadata": true, @@ -227,7 +227,7 @@ { "id": "renameByRegex", "options": { - "regex": "gotosocial_workers_(.+)_count", + "regex": "gotosocial\\.workers\\.(.+)\\.count", "renamePattern": "$1" } } @@ -322,7 +322,7 @@ }, "disableTextWrap": false, "editorMode": "builder", - "expr": "gotosocial_workers_client_api_queue{job=\"$job\", instance=~\"$instance\"}", + "expr": "{\"gotosocial.workers.client_api.queue\", job=\"$job\", instance=~\"$instance\"}", "fullMetaSearch": false, "hide": false, "includeNullMetadata": true, @@ -339,7 +339,7 @@ }, "disableTextWrap": false, "editorMode": "builder", - "expr": "gotosocial_workers_delivery_queue{job=\"$job\", instance=~\"$instance\"}", + "expr": "{\"gotosocial.workers.delivery.queue\", job=\"$job\", instance=~\"$instance\"}", "fullMetaSearch": false, "hide": false, "includeNullMetadata": true, @@ -357,7 +357,7 @@ }, "disableTextWrap": false, "editorMode": "builder", - "expr": "gotosocial_workers_dereference_queue{job=\"$job\", instance=~\"$instance\"}", + "expr": "{\"gotosocial.workers.dereference.queue\", job=\"$job\", instance=~\"$instance\"}", "fullMetaSearch": false, "hide": false, "includeNullMetadata": true, @@ -374,7 +374,7 @@ }, "disableTextWrap": false, "editorMode": "builder", - "expr": "gotosocial_workers_fedi_api_queue{job=\"$job\", instance=~\"$instance\"}", + "expr": "{\"gotosocial.workers.fedi_api.queue\", job=\"$job\", instance=~\"$instance\"}", "fullMetaSearch": false, "hide": false, "includeNullMetadata": true, @@ -391,7 +391,7 @@ }, "disableTextWrap": false, "editorMode": "builder", - "expr": "gotosocial_workers_processing_queue{job=\"$job\", instance=~\"$instance\"}", + "expr": "{\"gotosocial.workers.processing.queue\", job=\"$job\", instance=~\"$instance\"}", "fullMetaSearch": false, "hide": false, "includeNullMetadata": true, @@ -408,7 +408,7 @@ }, "disableTextWrap": false, "editorMode": "builder", - "expr": "gotosocial_workers_webpush_queue{job=\"$job\", instance=~\"$instance\"}", + "expr": "{\"gotosocial.workers.webpush.queue\", job=\"$job\", instance=~\"$instance\"}", "fullMetaSearch": false, "hide": false, "includeNullMetadata": true, @@ -424,7 +424,7 @@ { "id": "renameByRegex", "options": { - "regex": "gotosocial_workers_(.+)_queue", + "regex": "gotosocial.workers.(.+).queue", "renamePattern": "$1" } } @@ -531,7 +531,7 @@ }, "disableTextWrap": false, "editorMode": "builder", - "expr": "sum by(instance) (rate(http_server_requests_total{job=\"$job\", instance=~\"$instance\"}[$__rate_interval]))", + "expr": "sum by(instance) (rate({\"http.server.requests_total\", job=\"$job\", instance=~\"$instance\"}[$__rate_interval]))", "fullMetaSearch": false, "hide": false, "includeNullMetadata": true, @@ -633,9 +633,9 @@ "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "sum by (http_route, http_status_code) (rate(http_server_requests_total{instance=~\"$instance\", job=\"$job\", http_route=~\"/api.+\"}[$__rate_interval]))", + "expr": "sum by (\"http.route\", \"http.status_code\") (rate({\"http.server.requests_total\", instance=~\"$instance\", job=\"$job\", 'http.route'=~\"/api.+\"}[$__rate_interval]))", "instant": false, - "legendFormat": "{{http_route}} {{http_status_code}}", + "legendFormat": "{{http.route}} {{http.status_code}}", "range": true, "refId": "A" } @@ -731,9 +731,9 @@ "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "sum by (http_route, http_status_code) (rate(http_server_requests_total{instance=~\"$instance\", job=\"$job\", http_route=~\"/(.well-known|users).+\"}[$__rate_interval]))", + "expr": "sum by (\"http.route\", \"http.status_code\") (rate({\"http.server.requests_total\", instance=~\"$instance\", job=\"$job\", 'http.route'=~\"/(.well-known|users).+\"}[$__rate_interval]))", "instant": false, - "legendFormat": "{{http_route}} {{http_status_code}}", + "legendFormat": "{{http.route}} {{http.status_code}}", "range": true, "refId": "A" } @@ -829,9 +829,9 @@ "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "sum by (http_route, http_status_code) (rate(http_server_requests_total{instance=~\"$instance\", job=\"$job\", http_route=~\"/fileserver.+\"}[$__rate_interval]))", + "expr": "sum by (\"http.route\", \"http.status_code\") (rate({\"http.server.requests_total\", instance=~\"$instance\", job=\"$job\", 'http.route'=~\"/fileserver.+\"}[$__rate_interval]))", "instant": false, - "legendFormat": "{{http_route}} {{http_status_code}}", + "legendFormat": "{{http.route}} {{http.status_code}}", "range": true, "refId": "A" } @@ -905,7 +905,7 @@ { "disableTextWrap": false, "editorMode": "builder", - "expr": "histogram_quantile(0.95, sum by(le) (rate(http_server_duration_milliseconds_bucket{job=\"$job\", instance=~\"$instance\"}[$__rate_interval])))", + "expr": "histogram_quantile(0.95, sum by(le) (rate({\"http.server.duration_milliseconds_bucket\", job=\"$job\", instance=~\"$instance\"}[$__rate_interval])))", "fullMetaSearch": false, "includeNullMetadata": false, "legendFormat": "__auto", @@ -987,7 +987,7 @@ { "disableTextWrap": false, "editorMode": "builder", - "expr": "histogram_quantile(0.99, sum by(le) (rate(http_server_duration_milliseconds_bucket{job=\"$job\", instance=~\"$instance\"}[$__rate_interval])))", + "expr": "histogram_quantile(0.99, sum by(le) (rate({\"http.server.duration_milliseconds_bucket\", job=\"$job\", instance=~\"$instance\"}[$__rate_interval])))", "fullMetaSearch": false, "includeNullMetadata": false, "legendFormat": "__auto", @@ -1977,4 +1977,4 @@ "uid": "CgCw8jKZz", "version": 9, "weekStart": "" -} \ No newline at end of file +}