Skip to content

Instantly share code, notes, and snippets.

View aliaksei-karneyeu's full-sized avatar

Aliaksei Karneyeu aliaksei-karneyeu

  • OpenX
  • Krakow
  • 21:27 (UTC +01:00)
View GitHub Profile
@aliaksei-karneyeu
aliaksei-karneyeu / dashbord-to-jsonnet.py
Created December 16, 2020 09:11 — forked from tennix/dashbord-to-jsonnet.py
Convert Grafana dashboard json to jsonnet
#!/usr/bin/env python
import json
from jinja2 import Template
# git clone https://github.com/pingcap/tidb-docker-compose
# cd tidb-docker-compose
# git clone https://github.com/tennix/grafonnet-lib -b table
# python dashboard-to-jsonnet.py > pd.jsonnet
# jsonnet -J grafonnet-lib pd.jsonnet > config/dashboards/generated-pd.json
with open('config/dashboards/pd.json', 'r') as f:
data = json.load(f)