Install plugin grafana
Install a Grafana plugin by name
grafana-cli plugins install grafana-piechart-panel
more grafana
all 11 commands →
Export dashboard via API
curl -s http://admin:admin@localhost:3000/api/dashboards/uid/MY_UID | jq .dashboard
Import dashboard via API
curl -X POST -H "Content-Type: application/json" -d @dashboard.json http://admin:admin@localhost:3000/api/dashboards/import
List datasources via API
curl -s http://admin:admin@localhost:3000/api/datasources | jq .[].name
Create datasource via API
curl -X POST -H "Content-Type: application/json" -d @ds.json http://admin:admin@localhost:3000/api/datasources
Provision dashboards folder
# Place YAML in /etc/grafana/provisioning/dashboards/