#!/usr/bin/env bash # # Checks the status of local metrics # set -e cd "$(dirname "$0")" if [[ ! -f lib/config.sh ]]; then echo "Run start.sh first" exit 1 fi # shellcheck source=/dev/null source lib/config.sh : "${INFLUXDB_ADMIN_USER:?}" : "${INFLUXDB_ADMIN_PASSWORD:?}" : "${INFLUXDB_WRITE_USER:?}" : "${INFLUXDB_WRITE_PASSWORD:?}" ( set -x docker ps --no-trunc --size ) curl_head() { curl --retry 5 --retry-delay 2 --retry-connrefused -v --head "$1" } if ! curl_head http://localhost:10016/ping; then echo Error: InfluxDB not running exit 1 fi if ! curl_head http://localhost:3000; then echo Error: Grafana not running exit 1 fi cat <