Export/import Grafana dashboards (Grafana 5+).
Use dashboard API to restore dashboard. For example:
cat <exported-dashboard.json> | jq '. + {overwrite: true}' | curl -X POST \
-H "Content-Type: application/json" -H "Authorization: Bearer <api-key-with-write-permissions>" \
<grafana-uri>/api/dashboards/db -d @-
When importing dashboards for the first time reset the id
:
cat <exported-dashboard.json> | jq '. * {overwrite: true, dashboard: {id: null}}' | curl -X POST \
-H "Content-Type: application/json" -H "Authorization: Bearer <api-key-with-write-permissions>" \
<grafana-uri>/api/dashboards/db -d @-
The text panel does no longer by default allow unsantizied HTML, which is required to run custom Javascript code in the dashboard.
To enable unsafe Javascript execution in text panels enable the settings disable_sanitize_html
under the section [panels]
in your Grafana ini file, or set env variable GF_PANELS_DISABLE_SANITIZE_HTML=true
.
Devops Monitoring Expert, who loves monitoring systems and cutting/bleeding edge technologies: Docker, Kubernetes, ECS, AWS, Google GCP, Terraform, Lambda, Zabbix, Grafana, Elasticsearch, Kibana, Prometheus, Sysdig,...
Summary:
- 3000+ GitHub stars
- 20 000+ Grafana dashboard downloads
- 1 000 000+ Docker image pulls
Professional devops / monitoring / consulting services: