Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[BUG] Dashboard does not work with Grafana 11 #873

@aslafy-z

Description

@aslafy-z

Describe the bug
The dashboard at https://grafana.com/grafana/dashboards/19544-s3gw/ does not work with Grafana 11. It fails because of a change in the Variable syntax.

image

To Reproduce

  1. Deploy grafana 11
  2. Import dashboard
  3. Open dashboard
  4. See error

Expected behavior
Dashboard is well imported and shows metrics.

Additional context

I fixed the issue with

@@ -410,7 +410,7 @@
                 "uid": "${DS_PROMETHEUS}"
               },
               "editorMode": "code",
-              "expr": "histogram_quantile(0.95, rgw_op_svc_time_bucket{op=~\"$operation\"})",
+              "expr": "histogram_quantile(0.95, rgw_op_svc_time_bucket{op=~\"$operation\",instance=\"${instance}\"})",
               "hide": false,
               "legendFormat": "p95",
               "range": true,
@@ -422,7 +422,7 @@
                 "uid": "${DS_PROMETHEUS}"
               },
               "editorMode": "code",
-              "expr": "histogram_quantile(0.99, rgw_op_svc_time_bucket{op=~\"$operation\"})",
+              "expr": "histogram_quantile(0.99, rgw_op_svc_time_bucket{op=~\"$operation\",instance=\"${instance}\"})",
               "hide": false,
               "legendFormat": "p99",
               "range": true,
@@ -1781,34 +1781,28 @@
   "templating": {
     "list": [
       {
-        "current": {},
         "datasource": {
           "type": "prometheus",
-          "uid": "${DS_PROMETHEUS}"
+          "uid": "${datasource}"
         },
-        "definition": "rgw_op_svc_time_bucket",
+        "definition": "label_values(op)",
         "hide": 0,
-        "includeAll": false,
+        "includeAll": true,
         "label": "Focused S3 Operation:",
         "multi": false,
         "name": "operation",
         "options": [],
         "query": {
-          "query": "rgw_op_svc_time_bucket",
-          "refId": "StandardVariableQuery"
+          "qryType": 1,
+          "query": "label_values(op)"
         },
         "refresh": 1,
-        "regex": "/op=\"(.*)\"/",
+        "regex": "",
         "skipUrlSync": false,
         "sort": 0,
         "type": "query"
       },
       {
-        "current": {
-          "selected": false,
-          "text": "Prometheus",
-          "value": "Prometheus"
-        },
         "hide": 0,
         "includeAll": false,
         "multi": false,
@@ -1822,21 +1816,20 @@
         "type": "datasource"
       },
       {
-        "current": {},
         "datasource": {
           "type": "prometheus",
-          "uid": "${DS_PROMETHEUS}"
+          "uid": "${datasource}"
         },
-        "definition": "label_values(rgw_req_total{job=\"s3gw-status\"}, instance)",
+        "definition": "label_values(rgw_req_total{job=\"s3gw-status\"},instance)",
         "hide": 0,
         "includeAll": false,
-        "label": "S3GW Instance:",
+        "label": "Instance",
         "multi": false,
         "name": "instance",
         "options": [],
         "query": {
-          "query": "label_values(rgw_req_total{job=\"s3gw-status\"}, instance)",
-          "refId": "StandardVariableQuery"
+          "qryType": 1,
+          "query": "label_values(rgw_req_total{job=\"s3gw-status\"},instance)"
         },
         "refresh": 1,
         "regex": "",
@@ -1853,8 +1846,8 @@
   "timepicker": {},
   "timezone": "",
   "title": "S3GW",
-  "uid": "jXhqIPD4z",
-  "version": 34,
+  "uid": "s3gw",
+  "version": 35,
   "weekStart": "",
   "gnetId": 19544
 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions