2019-06-13 08:28:31 -07:00
|
|
|
#!/usr/bin/env bash
|
2019-05-06 16:44:06 -07:00
|
|
|
#
|
2019-06-13 08:28:31 -07:00
|
|
|
# Checks the status of local metrics
|
2019-05-06 16:44:06 -07:00
|
|
|
#
|
|
|
|
|
2019-06-13 08:28:31 -07:00
|
|
|
set -e
|
2019-05-06 16:44:06 -07:00
|
|
|
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-05-06 16:44:06 -07:00
|
|
|
|
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
|