Files
mgmt/test/shell/prometheus-1.sh
2019-02-24 12:28:59 -05:00

19 lines
458 B
Bash
Executable File

#!/bin/bash -e
. "$(dirname "$0")/../util.sh"
# run empty graph, with prometheus support
$TIMEOUT "$MGMT" run --tmp-prefix --prometheus empty &
pid=$!
sleep 5s # let it converge
# Check that etcd metrics are loaded
curl 127.0.0.1:9233/metrics | grep "^etcd_server_has_leader 1"
# Check that go metrics are loaded
curl 127.0.0.1:9233/metrics | grep "^go_goroutines [0-9]\+"
killall -SIGINT mgmt # send ^C to exit mgmt
wait $pid # get exit status
exit $?