From 458dca078dd7347b73b58721759f91b81a4c0429 Mon Sep 17 00:00:00 2001 From: Tung Leo Date: Tue, 16 Apr 2024 23:00:40 +0700 Subject: [PATCH] Grafana: Use latest dashboard revision in import reference script (#14778) --- content/en/docs/ops/integrations/grafana/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/ops/integrations/grafana/index.md b/content/en/docs/ops/integrations/grafana/index.md index 9a4325ea57..a4879eabc9 100644 --- a/content/en/docs/ops/integrations/grafana/index.md +++ b/content/en/docs/ops/integrations/grafana/index.md @@ -56,7 +56,7 @@ $ # The version of Istio to deploy $ VERSION={{< istio_full_version >}} $ # Import all Istio dashboards $ for DASHBOARD in 7639 11829 7636 7630 7645 13277; do -$ REVISION="$(curl -s https://grafana.com/api/dashboards/${DASHBOARD}/revisions -s | jq ".items[] | select(.description | contains(\"${VERSION}\")) | .revision")" +$ REVISION="$(curl -s https://grafana.com/api/dashboards/${DASHBOARD}/revisions -s | jq ".items[] | select(.description | contains(\"${VERSION}\")) | .revision" | tail -n 1)" $ curl -s https://grafana.com/api/dashboards/${DASHBOARD}/revisions/${REVISION}/download > /tmp/dashboard.json $ echo "Importing $(cat /tmp/dashboard.json | jq -r '.title') (revision ${REVISION}, id ${DASHBOARD})..." $ curl -s -k -u "$GRAFANA_CRED" -XPOST \