The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/scripts/grafana-server/wait-for-grafana

25 lines
520 B

#!/usr/bin/env bash
set -eo pipefail
. scripts/grafana-server/variables
HOST=${HOST:-$DEFAULT_HOST}
PORT=${PORT:-$DEFAULT_PORT}
printf "Waiting for grafana-server to finish starting, host=%s, port=%s" "$HOST" "$PORT"
timeout=60
elapsed=0
while ! curl -s -f http://$HOST:$PORT/health > /dev/null 2>&1; do
if [ $elapsed -ge $timeout ]; then
printf "\nTimeout after %d seconds waiting for grafana-server to start\n" "$timeout"
exit 1
fi
printf "."
sleep 1
elapsed=$((elapsed + 1))
done
printf "\n"