Skip to content

Commit 49fac4b

Browse files
Merge pull request #54 from doflamingo721/grafana-fix
[release/1.12] Add dashboard revision check
2 parents 05db351 + ed64c2d commit 49fac4b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/get_grafana_dashboards.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@
33
# https://istio.io/latest/docs/ops/integrations/grafana/#option-1-quick-start
44
for DASHBOARD in 7639 11829 7636 7630 7642 7645; do
55
REVISION="$(curl -s https://grafana.com/api/dashboards/${DASHBOARD}/revisions -s | jq ".items[] | select(.description | endswith(\"${ISTIO_VERSION}\")) | .revision")"
6-
curl -s https://grafana.com/api/dashboards/${DASHBOARD}/revisions/${REVISION}/download > /usr/local/app/dashboards/${DASHBOARD}.json
6+
if [[ $REVISION =~ ^[0-9]+$ ]]; then
7+
curl -s https://grafana.com/api/dashboards/${DASHBOARD}/revisions/${REVISION}/download > /usr/local/app/dashboards/${DASHBOARD}.json
8+
fi
79
done

0 commit comments

Comments
 (0)