grafana / grafonnet

Jsonnet library for generating Grafana dashboards.
https://grafana.github.io/grafonnet/
Apache License 2.0
367 stars 20 forks source link

Validate dashboards #121

Open Duologic opened 1 year ago

Duologic commented 1 year ago

The idea is to provide an endpoint or perhaps a separate library to validate dashboards against their schema.

For jsonnet this library could be used: https://github.com/crdsonnet/validate-libsonnet

Additionally we could look into https://github.com/grafana/dashboard-linter for linting on top of validation.

consideRatio commented 7 months ago

For reference, as a maintainer of dashboards for an application, we have setup automation via a github workflow to run jsonnet-lint from go-jsonnet on our dashboards in their .jsonnet form, and then dashboard-linter from grafana on them after being rendered.

Recently introduced and we don't have much experience with it yet, except that we pass jsonnet-lint and have massive amounts of warnings from the dashboard-linter (but the dashboards work in grafana).