Grafana tutorial: tested fixes
Grafana is the open-source dashboard tool most people point at Prometheus and other data sources. Each guide below was reproduced on a local Grafana instance with real queries before it was written up.
-
Grafana Variable Regex Broke My Query? 6 Traps I Tested
Tested on Grafana 13.2.2 with Prometheus: stripping the port with a variable regex breaks instance= queries. Named groups, exclude patterns, JS vs RE2 regex.
Fix -
Grafana Join by Field Drops a Query? 4 Traps I Tested
Tested on Grafana 13.2.2: Join by field silently drops a query whose key column has a different name, and Outer (time series) drops duplicate keys. Fixes.
Fix -
Grafana Shows the Mean, Not the Last Value? 3 Causes I Tested
Tested on Grafana 13.2.2: new Stat and Gauge panels already default to Last *. A mean usually comes from a migrated singlestat panel. 3 causes and fixes.
Fix -
How to Change a Grafana Legend Name: 4 Ways and the Traps
Tested on Grafana 13.2.3 with Prometheus: {{label}} in Legend, Display name, overrides and Rename by regex. What wins, and why a typo shows the full name.
Fix -
Grafana Value Mapping Not Working? 9 Rules I Tested
Tested on Grafana 13.2.3: mapping order, inclusive ranges, whole-string regex, missing colors, null vs Last *, and why ${var} and "1.0" never match.
Fix