grafana / grafonnet

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

Validate dashboards #121

Open Duologic opened 9 months ago

Duologic commented 9 months 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 2 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).