Update to Grafana 9 broke dashboards

  • What Grafana version and what operating system are you using?

Grafana 9 in Docker on Linux

  • What are you trying to achieve?

I had dashboards running under Grafana 8. Upgrading to Grafana 9 made the time series panel to sometimes display the wrong data.

  • How are you trying to achieve it?

Prometheus, Thanos, Grafana 9

  • What happened?

Pressing refresh gives the expected dashboard

  • What did you expect to happen?

Dashboards to display the correct data

  • Can you copy/paste the configuration(s) that you are having problems with?
{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "datasource",
          "uid": "grafana"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": 18,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": {
        "type": "prometheus",
        "uid": "P5DCFC7561CCDE821"
      },
      "fieldConfig": {
        "defaults": {
          "unit": "bps"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Transmit vmx0"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Transmit LAN"
              },
              {
                "id": "links"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Transmit vio0"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Transmit LAN"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Receive vmx0"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Receive LAN"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Receive vio0"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Receive LAN"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Transmit vmx1"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Transmit DMZ"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Transmit vio4"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Transmit DMZ"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Receive vmx1"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Receive DMZ"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Receive vio4"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Receive DMZ"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Transmit vmx2"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Transmit WAN"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Transmit vio1"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Transmit WAN"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Receive vmx2"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Receive WAN"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Receive vio1"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Receive WAN"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Transmit vmx3"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Transmit Guest"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Transmit vio2"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Transmit Guest"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Receive vmx3"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Receive Guest"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Receive vio2"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Receive Guest"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Transmit vmx4"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Transmit DMZ2"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Transmit vio5"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Transmit DMZ2"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Receive vmx4"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Receive DMZ2"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Receive vio5"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Receive DMZ2"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Transmit vmx5"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Transmit IoT"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Transmit vio3"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Transmit IoT"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Receive vmx5"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Receive IoT"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Receive vio3"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Receive IoT"
              }
            ]
          }
        ]
      },
      "fill": 2,
      "fillGradient": 0,
      "gridPos": {
        "h": 10,
        "w": 19,
        "x": 0,
        "y": 0
      },
      "hiddenSeries": false,
      "id": 2,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": false,
        "max": false,
        "min": false,
        "rightSide": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "9.1.0",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "$$hashKey": "object:102",
          "alias": "/LAN/",
          "color": "#73BF69"
        },
        {
          "$$hashKey": "object:103",
          "alias": "/DMZ$/",
          "color": "#B877D9"
        },
        {
          "$$hashKey": "object:104",
          "alias": "/WAN/",
          "color": "#FADE2A"
        },
        {
          "$$hashKey": "object:105",
          "alias": "/IoT/",
          "color": "#5794F2"
        },
        {
          "$$hashKey": "object:106",
          "alias": "/Guest/",
          "color": "#F2495C"
        },
        {
          "$$hashKey": "object:151",
          "alias": "/Transmit/",
          "transform": "negative-Y"
        },
        {
          "$$hashKey": "object:383",
          "alias": "/DMZ2/",
          "color": "#8F3BB8"
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "P5DCFC7561CCDE821"
          },
          "expr": "irate(node_network_receive_bytes_total{instance=\"fw.hemma:9100\",job=\"node\",device=~\"vmx.*|vio.*\"}[$__rate_interval])*8",
          "interval": "",
          "legendFormat": "Receive {{ device }}",
          "refId": "B"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "P5DCFC7561CCDE821"
          },
          "expr": "irate(node_network_transmit_bytes_total{instance=\"fw.hemma:9100\",job=\"node\",device=~\"vmx.*|vio.*\"}[$__rate_interval])*8",
          "interval": "",
          "legendFormat": "Transmit {{ device }}",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeRegions": [],
      "title": "Firewall network",
      "tooltip": {
        "shared": true,
        "sort": 2,
        "value_type": "individual"
      },
      "transformations": [],
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:137",
          "format": "bps",
          "label": "Network usage, out (-) / in (+)",
          "logBase": 1,
          "show": true
        },
        {
          "$$hashKey": "object:138",
          "format": "short",
          "logBase": 1,
          "show": false
        }
      ],
      "yaxis": {
        "align": false
      }
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "P5DCFC7561CCDE821"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "max": 500000000,
          "min": 0,
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "red",
                "value": null
              },
              {
                "color": "green",
                "value": 80
              }
            ]
          },
          "unit": "decbits"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 5,
        "x": 19,
        "y": 0
      },
      "id": 14,
      "maxDataPoints": 1,
      "options": {
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "fields": "",
          "values": true
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true,
        "text": {}
      },
      "pluginVersion": "9.1.0",
      "targets": [
        {
          "expr": "avg_over_time(download_speed_bps[$__interval])",
          "format": "time_series",
          "instant": true,
          "interval": "",
          "legendFormat": "Download",
          "refId": "B"
        },
        {
          "expr": "avg_over_time(upload_speed_bps[$__interval])",
          "instant": true,
          "interval": "",
          "legendFormat": "Upload",
          "refId": "A"
        }
      ],
      "title": "Internet speedtest",
      "transformations": [],
      "type": "gauge"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "P5DCFC7561CCDE821"
      },
      "fieldConfig": {
        "defaults": {
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 15
              }
            ]
          },
          "unit": "ms"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 5,
        "x": 19,
        "y": 7
      },
      "id": 13,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "9.1.0",
      "targets": [
        {
          "expr": "avg_over_time(ping_ms[$__interval])",
          "instant": false,
          "interval": "",
          "legendFormat": "Ping",
          "refId": "A"
        }
      ],
      "title": "Ping",
      "type": "stat"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": {
        "type": "prometheus",
        "uid": "P5DCFC7561CCDE821"
      },
      "fill": 2,
      "fillGradient": 0,
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 10
      },
      "hiddenSeries": false,
      "id": 4,
      "legend": {
        "alignAsTable": false,
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "9.1.0",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "$$hashKey": "object:280",
          "alias": "/Hall uppe/",
          "color": "#73BF69"
        },
        {
          "$$hashKey": "object:281",
          "alias": "/Kontor/",
          "color": "#FADE2A"
        },
        {
          "$$hashKey": "object:282",
          "alias": "/Tvättstuga/",
          "color": "#B877D9"
        },
        {
          "$$hashKey": "object:283",
          "alias": "/Vardagsrummet/",
          "color": "#5794F2"
        },
        {
          "$$hashKey": "object:322",
          "alias": "/Transmit/",
          "transform": "negative-Y"
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "unifipoller_device_radio_channel_utilization_receive_ratio{radio=\"ng\"}",
          "interval": "",
          "legendFormat": "Receive {{name}}",
          "refId": "B"
        },
        {
          "expr": "unifipoller_device_radio_channel_utilization_transmit_ratio{radio=\"ng\"}",
          "interval": "",
          "legendFormat": "Transmit {{name}}",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeRegions": [],
      "title": "WiFi usage 2G",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:308",
          "format": "percentunit",
          "label": "WiFi 2g usage, from AP (-) / to AP (+)",
          "logBase": 1,
          "show": true
        },
        {
          "$$hashKey": "object:309",
          "format": "short",
          "logBase": 1,
          "show": false
        }
      ],
      "yaxis": {
        "align": false
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": {
        "type": "prometheus",
        "uid": "P5DCFC7561CCDE821"
      },
      "fill": 2,
      "fillGradient": 0,
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 10
      },
      "hiddenSeries": false,
      "id": 5,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "9.1.0",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "$$hashKey": "object:445",
          "alias": "/Hall uppe/",
          "color": "#73BF69"
        },
        {
          "$$hashKey": "object:446",
          "alias": "/Kontor/",
          "color": "#FADE2A"
        },
        {
          "$$hashKey": "object:447",
          "alias": "/Tvättstuga/",
          "color": "#B877D9"
        },
        {
          "$$hashKey": "object:448",
          "alias": "/Vardagsrummet/",
          "color": "#5794F2"
        },
        {
          "$$hashKey": "object:487",
          "alias": "/Transmit/",
          "transform": "negative-Y"
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "unifipoller_device_radio_channel_utilization_receive_ratio{radio=\"na\"}",
          "interval": "",
          "legendFormat": "Receive {{name}}",
          "refId": "B"
        },
        {
          "expr": "unifipoller_device_radio_channel_utilization_transmit_ratio{radio=\"na\"}",
          "interval": "",
          "legendFormat": "Transmit {{name}}",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeRegions": [],
      "title": "WiFi usage 5G",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:473",
          "format": "percentunit",
          "label": "WiFi 5g usage, from AP (-) / to AP (+)",
          "logBase": 1,
          "show": true
        },
        {
          "$$hashKey": "object:474",
          "format": "short",
          "logBase": 1,
          "show": false
        }
      ],
      "yaxis": {
        "align": false
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": {
        "type": "prometheus",
        "uid": "P5DCFC7561CCDE821"
      },
      "fill": 2,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 12,
        "x": 0,
        "y": 18
      },
      "hiddenSeries": false,
      "id": 8,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "9.1.0",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "expr": "count without (mac) (group by(mac, network) (rate(unifipoller_client_satisfaction_ratio[$__rate_interval])))",
          "interval": "",
          "intervalFactor": 10,
          "legendFormat": "{{network}}",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeRegions": [],
      "title": "# clients",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "transformations": [
        {
          "id": "filterFieldsByName",
          "options": {
            "include": {
              "names": [
                "Time",
                "GUEST",
                "IoT",
                "LAN"
              ]
            }
          }
        }
      ],
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:610",
          "format": "short",
          "logBase": 1,
          "show": true
        },
        {
          "$$hashKey": "object:611",
          "format": "short",
          "logBase": 1,
          "show": false
        }
      ],
      "yaxis": {
        "align": false
      }
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "P5DCFC7561CCDE821"
      },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "filterable": false,
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "bps"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "sw_port"
            },
            "properties": [
              {
                "id": "unit",
                "value": "string"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 6,
        "w": 6,
        "x": 12,
        "y": 18
      },
      "id": 9,
      "maxDataPoints": 1,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true
      },
      "pluginVersion": "9.1.0",
      "targets": [
        {
          "expr": "topk(4, sort_desc(sum by (name) (rate(unifipoller_client_receive_bytes_total[$__range] )))) * 8",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "Top 4 transmitting clients",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true,
              "ap_name": true,
              "cluster": true,
              "instance": true,
              "ip": true,
              "job": true,
              "mac": true,
              "network": true,
              "oui": true,
              "site_name": true,
              "source": true,
              "sw_name": true,
              "sw_port": true,
              "vlan": true,
              "wired": true
            },
            "indexByName": {},
            "renameByName": {}
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "P5DCFC7561CCDE821"
      },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "filterable": false,
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "bps"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "sw_port"
            },
            "properties": [
              {
                "id": "unit",
                "value": "string"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 6,
        "w": 6,
        "x": 18,
        "y": 18
      },
      "id": 10,
      "maxDataPoints": 1,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true
      },
      "pluginVersion": "9.1.0",
      "targets": [
        {
          "expr": "topk(4, sort_desc(sum by (name) (rate(unifipoller_client_transmit_bytes_total[$__range] )))) * 8",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "Top 4 receiving clients",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true,
              "ap_name": true,
              "cluster": true,
              "instance": true,
              "ip": true,
              "job": true,
              "mac": true,
              "network": true,
              "oui": true,
              "site_name": true,
              "source": true,
              "sw_name": true,
              "sw_port": true,
              "vlan": true,
              "wired": true
            },
            "indexByName": {},
            "renameByName": {}
          }
        }
      ],
      "type": "table"
    }
  ],
  "refresh": "",
  "schemaVersion": 37,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-6h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "Network",
  "uid": "bZN9AvJMk",
  "version": 33,
  "weekStart": ""
}

Update: Viewing a single panel never gives this error. It’s only for several panels on the same dashboard.

Pressing View to bring up the panel by it self, will still display the wrong data (since it is cached in the browser?), but after the next refresh the error never manifest.

The problem is in Thanos. Accessing Prometheus directly does not give these problems.