solana/metrics/scripts/status.sh

33 lines
661 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
2019-06-13 09:31:11 -07:00
* Enable local metric collection per shell by running:
export SOLANA_METRICS_CONFIG="host=http://localhost:8086,db=testnet,u=write,p=write"
2019-06-13 08:28:31 -07:00
EOF