Speaker
Description
Grafana dashboards are easy to make but hard to maintain. Since changes can be made easily, the questions that remain are how to avoid changes that overwrite other work? How to keep track of changes? And how to communicate these to the user? Another question that pops up frequently is how to apply certain changes consistently to multiple visualizations and dashboards. One partial solution is to export Grafana dashboards to their JSON representation and store those in a git repository. However, even simple dashboards can quickly run into the thousands of lines of JSON and version-controlling these is problematic in its own right: the diffs are large and changes do not easily carry over to JSON representations of other dashboards. Instead, we propose to use the Jsonnet configuration language, together with its library Grafonnet, to create so called 'dashboard definitions' that compile into JSON representations of dashboards. We have adopted this solution to manage multiple different dashboards with around 20 visualizations each. This leads to a clear improvement in the maintainability and deployment of these dashboards. In this contribution, we will show how we created complex dashboards with multiple types of visualizations and data sources using functional code and Jsonnet. Additionally, we will show how dashboards-as-code can be integrated in git repositories and their CI/CD pipelines to ensure consistency between the dashboard definitions and the dashboards in a Grafana instance.
Desired slot length | 20 |
---|---|
Speaker release | Yes |