Automate my grafana dashboards


I would like to automate my grafana dashboards using grafonnet / jsonnet library thru a Jenkins pipelines.

I manually created a useful dashboard in grafana, and exported to json.

How can I proceed further? Could some one please instruct me step by step? I am a new learner in this area.

Is there any easy way to convert my exported json to jsonnet format?

Hi @manalilrafeeq,
The whole point using Graphonnet / jsonnet is to have developers help create the dashboards in Json which is less programmatical way of editing the format.
So Jsonnet allows you to optimize lots of lines of code while creating dashboard.
I belive you cannot use readymade json to create jsonnet. you will need to create jsonnet from scratch but there are some fine turorials which can guide you here -
Once you have these jsonnet files ready, you have to use them in Graphonnet which will recreate the Json for dashabords and eventually Dashboards in grafana.
Hope it helps you.