solana/metrics/scripts/status.sh

33 lines
610 B
Bash
Raw Normal View History

2019-06-13 08:28:31 -07:00
#!/usr/bin/env bash
#
2019-06-13 08:28:31 -07:00
# Checks the status of local metrics
#
2019-06-13 08:28:31 -07:00
set -e
cd "$(dirname "$0")"
(
set -x
docker ps --no-trunc --size
)
if ! timeout 10s curl -v --head http://localhost:8086/ping; then
echo Error: InfluxDB not running
exit 1
fi
if ! timeout 10s curl -v --head http://localhost:3000; then
echo Error: Grafana not running
exit 1
fi
2019-06-13 08:28:31 -07:00
cat <<EOF
2019-06-13 08:28:31 -07:00
=========================================================================
* Grafana dashboards are available at http://localhost:3000/dashboards
* Enable local metric collection per shell by running the command:
source $PWD/enable.sh
EOF