Add support for local metric collection/viewing (#4170)

This commit is contained in:
Jack May
2019-05-06 16:44:06 -07:00
committed by GitHub
parent 3f6a79b078
commit 453fdb9e28
12 changed files with 8482 additions and 1 deletions

27
metrics/scripts/status.sh Executable file
View File

@ -0,0 +1,27 @@
#!/bin/bash -e
#
# Checks the status of lcoal metrics
#
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
echo Local metrics up and running
echo - Enable local metric collection per shell by running \'source ./enable.sh\'
echo - View dashboard at http://localhost:3000/d/local/local-monitor
exit 0