From 7b7c765d78b082c2d77d7dcbc74b1d91369e8c17 Mon Sep 17 00:00:00 2001 From: Julien Pivotto Date: Wed, 8 Feb 2017 23:12:19 +0100 Subject: [PATCH] prometheus: Add a new test, with --prometheus-listen Also: rename t9 to prometheus-1 Signed-off-by: Julien Pivotto --- test/shell/{t9.sh => prometheus-1.sh} | 0 test/shell/prometheus-2.sh | 16 ++++++++++++++++ 2 files changed, 16 insertions(+) rename test/shell/{t9.sh => prometheus-1.sh} (100%) create mode 100755 test/shell/prometheus-2.sh diff --git a/test/shell/t9.sh b/test/shell/prometheus-1.sh similarity index 100% rename from test/shell/t9.sh rename to test/shell/prometheus-1.sh diff --git a/test/shell/prometheus-2.sh b/test/shell/prometheus-2.sh new file mode 100755 index 00000000..1dfa1aec --- /dev/null +++ b/test/shell/prometheus-2.sh @@ -0,0 +1,16 @@ +#!/bin/bash -e + +# run empty graph, with prometheus support +timeout --kill-after=20s 15s ./mgmt run --tmp-prefix --prometheus --prometheus-listen :52637 & +pid=$! +sleep 5s # let it converge + +# Check that etcd metrics are loaded +curl 127.0.0.1:52637/metrics | grep "^etcd_server_has_leader 1" + +# Check that go metrics are loaded +curl 127.0.0.1:52637/metrics | grep "^go_goroutines [0-9]\+" + +killall -SIGINT mgmt # send ^C to exit mgmt +wait $pid # get exit status +exit $?