Grafana Panel Generator
Build Grafana panel or importable dashboard JSON, with datasource references and thresholds.
Panel settings
24-column gridPanel JSON
58 lines · 1,006 charsExamples
Timeseries request rate
generateGrafanaPanelJSON({ title: "Request rate", type: "timeseries", unit: "reqps", gridPos: { w: 12, h: 8, x: 0, y: 0 }, targets: [{ expr: "rate(http_requests_total[5m])" }] })targets: [{ refId: "A" }], fieldConfig.defaults.unit: "reqps"The first target auto-labels A and the unit lands in field defaults for axis formatting.
Gauge with two queries
generateGrafanaPanelJSON({ title: "Saturation", type: "gauge", gridPos: { w: 6, h: 8, x: 0, y: 0 }, targets: [{ expr: "up" }, { expr: "down" }] })type: "gauge", refIds: ["A", "B"]Gauge rendering applies while both queries keep deterministic A/B references for overrides.
About this tool
Grafana Panel Generator builds import-ready dashboard panels with generateGrafanaPanelJSON(config): the output keys fix deterministically to type/title/datasource/fieldConfig/options/gridPos/targets, options default legend to list/bottom/showLegend with multi/desc tooltip and area graphMode, and targets auto-assign refIds A, B, C… unless overridden. fieldConfig.defaults carries unit, min/max, absolute threshold steps, and any field overrides.
Validation with validateGrafanaPanel enforces the 24-column grid (finite w/h/x/y, positive w/h, x + w within 0–24), strictly increasing threshold values, and a fixed recognized color set (green/red/yellow/orange/blue/purple/pink/grey/gray/transparent). Any violation flips valid to false with field-tagged issues — panels outside the grid or with flat thresholds never silently pass.
Panel types span timeseries, stat, gauge, barGauge, table, and logs, so the same config shape covers graphs, single-stats, gauges, and log views. Generation is deterministic — identical configs serialize byte-identically — and fully local, so queries and titles never leave the browser.
How to use this tool
Choose type and queries
Pick timeseries, stat, gauge, barGauge, table, or logs, then add one target per query — refIds assign A/B automatically.
Set units and thresholds
Enter the unit (e.g. ms, reqps), min/max, and threshold steps in strictly increasing value order with recognized colors.
Place on the 24-column grid
Size gridPos so x + w stays within 0–24, then import the JSON into a dashboard or provision it as code.
Use cases
Scaffolding timeseries dashboards
Generate legend/tooltip-complete panels for request-rate, latency, and error-ratio graphs.
Adding gauge and stat rows
Render saturation or availability snapshots with threshold-colored gauges from the same schema.
Provisioning panels as code
Check deterministic panel JSON into version control for repeatable dashboard provisioning.
Common mistakes
Mistake:Overflowing the 24-column grid.
Fix:x + w must stay within 0–24 (e.g. w 13 at x 12 fails) — shrink w or move x left instead of assuming w + h is the constraint.
Mistake:Repeating or decreasing threshold values.
Fix:Steps must be strictly increasing — equal or falling values report Threshold values must be in strictly increasing order.
Mistake:Using arbitrary threshold color names.
Fix:Only the built-in palette (green, red, yellow, orange, blue, purple, pink, grey/gray, transparent) validates — ultraviolet and similar names fail.
Frequently asked questions
What does this tool do?
It builds import-ready panel JSON with generateGrafanaPanelJSON (fixed key order, legend/tooltip defaults, unit/min/max/thresholds in field defaults, auto refIds A/B/…) and validates with validateGrafanaPanel (24-column grid, increasing thresholds, recognized colors and types).
What grid and threshold rules apply?
w/h must be positive and x + w must stay within 0–24 (w 13 at x 12 fails). Threshold values must be strictly increasing, and colors must come from the built-in palette — ultraviolet fails as Unrecognized.
Is my dashboard data uploaded or stored?
No. Generation and validation run entirely in your browser — queries, titles, and units never leave your device.
Are refIds and output deterministic?
Yes. Targets without explicit refIds assign A, B, C… in order, and identical configs serialize byte-identically, so the JSON is safe to snapshot and provision as code.
Related guides
References & standards
Related tools
.env Secret Safety Linter
Validate .env syntax and spot likely leaked credentials or placeholder secrets.
.gitattributes Generator
Build .gitattributes rules for line endings, Git LFS, GitHub linguist marks and merge drivers — with a one-line explanation for every rule.
.htaccess Generator
Build an Apache .htaccess — HTTPS redirects, rewrites, error pages, security headers, and basic auth
2D Fluid Dynamics & Particle Physics Sandbox
A physics playground with two engines sharing one canvas. The fluid mode runs a real Eulerian Navier-Stokes solver — semi-Lagrangian advection, explicit diffusion, Jacobi pressure projection and vorticity confinement — that you paint with dye and velocity using mouse or touch. The particle mode is a damped Verlet N-body engine with gravity wells, Coulomb attractors and repulsors, spring links, wall restitution and elastic circle collisions. Particle counts adapt to the device (100k target on WebGL2 desktop, 2k-5k on CPU fallback), and every configuration exports as runnable code: a Matter.js world, a PixiJS ticker setup, or a standalone vanilla Canvas engine.
A/B Test Sample Size Calculator
Compute required sample size per variant and test duration from baseline conversion rate, minimum detectable effect, alpha and power.
ABA Routing Number Validator
Validate 9-digit US ABA routing numbers with 3-7-1 Mod-10 breakdown.