[master] Fix grafana script (#8817)

* Fix grafana script

Fixes https://github.com/istio/istio/issues/30173

* Update index.md

Co-authored-by: John Howard <howardjohn@google.com>
This commit is contained in:
Istio Automation 2021-01-21 07:56:15 -08:00 committed by GitHub
parent 0e98207a6f
commit a4121fd3c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -45,10 +45,10 @@ $ GRAFANA_CRED="USER:PASSWORD"
$ # The name of the Prometheus data source to use
$ GRAFANA_DATASOURCE="Prometheus"
$ # The version of Istio to deploy
$ VERSION={{< istio_version >}}
$ VERSION={{< istio_full_version >}}
$ # Import all Istio dashboards
$ for DASHBOARD in 7639 11829 7636 7630 7642 7645; 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")"
$ 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 \