Grafana dashboard JSON => Jsonnet? #32
Replies: 3 comments 6 replies
-
I've build an extremely naive first version for the internal hackathon, but the result is something that will be hard to maintain. The main problem is that the JSON model that Grafana exposes today is very verbose, it includes a lot of default values. So rendering a Jsonnet version of this model will also be too verbose to be useful at this point as it doesn't know the difference between default values and values set by the user. |
Beta Was this translation helpful? Give feedback.
-
Secondary answer: Simply converting from JSON to Jsonnet has little benefit, the power is in the ability to make abstractions and reusable components that eventually compose one or more dashboards. For example, you'd define a Timeseries panel with a sensible configuration (but without queries) and use it in multiple dashboards. |
Beta Was this translation helpful? Give feedback.
-
Just want to follow up to see if this idea is possible now or manually constructing the dashboards from scratch is the recommendation? @Duologic |
Beta Was this translation helpful? Give feedback.
-
I remember there was some discussion of a utility that would enable one to take the JSON model and translate into Jsonnet? @Duologic Is this still being developed or perhaps I could test a WIP? We are attempting to convert these JSON blobs into Jsonnet where there is a clearer structure and the ability to make use of Jsonnet's functionality.
Beta Was this translation helpful? Give feedback.
All reactions