From 3837da70078f7f16f94cd1b8d624e223b8242937 Mon Sep 17 00:00:00 2001 From: Denis Fateyev Date: Thu, 9 Dec 2021 01:28:07 +0600 Subject: [PATCH] K8S-672 fix Grafana dashboard login --- manifest.jps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.jps b/manifest.jps index 6c7700bb..8e425935 100644 --- a/manifest.jps +++ b/manifest.jps @@ -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