Skip to content

Commit

Permalink
K8S-672 fix Grafana dashboard login
Browse files Browse the repository at this point in the history
  • Loading branch information
dfateyev committed Dec 8, 2021
1 parent fefa6cb commit 3837da7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion manifest.jps
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ actions:
for i in {1..10}; do
sleep 10
echo "Attempt ${i} of Grafana dashboard parameters setting"
curl -X POST -f -d "user=admin&password=${grafana_secret}" -c grafana/grafana-jar.txt "http://${env.domain}/grafana/login" || continue
curl -X POST -f -H 'Content-Type: application/json' -d "{\"user\":\"admin\",\"password\":\"${grafana_secret}\"}" -c grafana/grafana-jar.txt "http://${env.domain}/grafana/login" || continue
dash_id=$(curl -sb grafana/grafana-jar.txt 'http://${env.domain}/grafana/api/search?mode=tree&query=Jelastic' | grep -Po '"id":(\d+)' | awk -F ':' '{print $2}')
[ "${dash_id}" = "" ] && continue
curl -X POST -f -b grafana/grafana-jar.txt "http://${env.domain}/grafana/api/user/stars/dashboard/${dash_id}" || continue
Expand Down

0 comments on commit 3837da7

Please sign in to comment.