Commit 38475d6c authored by k.elaammari's avatar k.elaammari
Browse files

grafana setup idempotent

parent 521fc242
......@@ -5,7 +5,7 @@
},
"id": null,
"uid": null,
"uid": "default_dashboard_production",
"title": "Production",
"description": "UP/DOWN, CPU, Memory, Disk",
"tags": [ "node_exporter", "production" ],
......
......@@ -43,7 +43,9 @@ curl -X POST https://localhost:3000/api/datasources -H "Accept: application/json
echo "Grafana datasources influx. "
# Dashboard
# TODO DELETE old dashboards
curl -X DELETE https://localhost:3000/api/dashboards/uid/default_dashboard_production -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer $apitoken" --cacert $cacertpath 2> /dev/null
curl -X POST https://localhost:3000/api/dashboards/db -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer $apitoken" --data-binary "@$provision/config/dashboards/dash_production.json" --cacert $cacertpath 2> /dev/null
curl -X DELETE https://localhost:3000/api/dashboards/uid/default_dashboard_monitoring -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer $apitoken" --cacert $cacertpath 2> /dev/null
curl -X POST https://localhost:3000/api/dashboards/db -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer $apitoken" --data-binary "@$provision/config/dashboards/dash_monitoring.json" --cacert $cacertpath 2> /dev/null
echo "Grafana dashboard. "
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment