mirror of
https://github.com/gravitational/teleport
synced 2024-10-21 09:44:51 +00:00
8d7a217089
Shellcheck is a linter for shell scripts. Since we have quite a few of those for release packaging and examples, we'll benefit from an extra set of (robot) eyes. Note: I disabled https://github.com/koalaman/shellcheck/wiki/Sc2086 to make this PR smaller. That specific check is for the most frequent mistake in our scripts - not quoting env var expansions. I'll do a separate PR cleaning those up. `build.assets/pkg` is no longer used and was removed.
25 lines
632 B
Bash
Executable file
25 lines
632 B
Bash
Executable file
#!/bin/bash
|
|
|
|
until curl --output /dev/null --silent --head --fail http://grafana:3000; do
|
|
echo 'waiting for grafana to respond'
|
|
sleep 5
|
|
done
|
|
|
|
echo "grafana is up setting up dashboards and data sources"
|
|
|
|
curl -s -H "Content-Type: application/json" \
|
|
-XPOST http://admin:admin@grafana:3000/api/datasources \
|
|
-d @- <<EOF
|
|
{
|
|
"name": "InfluxDB",
|
|
"type": "influxdb",
|
|
"access": "proxy",
|
|
"url": "http://influxdb:8086",
|
|
"database": "telegraf"
|
|
}
|
|
EOF
|
|
|
|
curl -X POST -d @/mnt/health-dashboard.json 'http://admin:admin@grafana:3000/api/dashboards/db' --header 'Content-Type: application/json'
|
|
|
|
echo "all done!"
|