Commit e38d0779 authored by k.elaammari's avatar k.elaammari
Browse files

on win. cr lf -> lf

parent 0e6936df
......@@ -34,19 +34,15 @@ apitoken="${temp#\"}"
# Datasource
# copy the key and remove \r if unix
#key="$(awk '$1=$1' ORS='\n' $cacertpath)"
key="$(sed -e 's/.$/\r/' $cacertpath)"
# copy the key and remove \r (CR)
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)"
echo "$json"
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
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
......
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