Commit 629c6869 authored by k.elaammari's avatar k.elaammari
Browse files

idempotenz datasource del & create, dashboard override

parent cc32c80e
{
"name":"promeheus",
"type":"prometheus",
"url":"http://10.0.0.100:9090",
"access":"proxy",
"basicAuth":false
}
\ No newline at end of file
......@@ -38,10 +38,9 @@ apitoken="${temp#\"}"
key="$(sed -e 's/\r//' $cacertpath)"
# set correct tlsCACert to verify signing
json="$(jq --arg value "$key" '.secureJsonData.tlsCACert = $value' $provision/config/datasources/ds_influx.json)"
curl -X DELETE https://localhost:3000/api/datasources/name/InfluxDB -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/datasources -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer $apitoken" --data "$json" --cacert $cacertpath 2> /dev/null
echo "Grafana datasources influx. "
#curl -X POST https://localhost:3000/api/datasources -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer $apitoken" --data-binary "$provision/config/datasources/ds_prom.json" --cacert $cacertpath 2> /dev/null
#echo "Grafana datasources prometheus. "
# Dashboard
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
......
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