zk: Add ZooKeeper connection count
This commit is contained in:
parent
c7184beaeb
commit
68a34ef498
2 changed files with 22 additions and 3 deletions
|
@ -23,10 +23,9 @@ setup_suite() {
|
|||
# Run exporter
|
||||
cd ../../
|
||||
printf "Starting hbase-exporter\n"
|
||||
#./hbase-exporter --zookeeper-server ${ZK_SERVER:-"127.0.0.1"} 2>&1 > /dev/null &
|
||||
./hbase-exporter --zookeeper-server=${ZK_SERVER:-"127.0.0.1"} \
|
||||
--hbase-pseudo-distributed=True \
|
||||
--hbase-table="foo" &
|
||||
--hbase-pseudo-distributed=True \
|
||||
--hbase-table="foo" 2>&1 > /dev/null &
|
||||
PID=$!
|
||||
}
|
||||
|
||||
|
@ -53,6 +52,16 @@ test_hbase_exporter_export_zk_live() {
|
|||
assert_not_equals "0.0" "$r" "Zookeeper not live"
|
||||
}
|
||||
|
||||
test_hbase_exporter_export_hbase_up() {
|
||||
r=$(curl -s http://127.0.0.1:9010 | grep '^hbase_up' | cut -d " " -f2)
|
||||
assert_not_equals "0.0" "$r" "HBase down"
|
||||
}
|
||||
|
||||
test_hbase_exporter_export_zk_connection_count() {
|
||||
r=$(curl -s http://127.0.0.1:9010 | grep '^zookeeper_num_connections' | cut -d " " -f2)
|
||||
assert_not_equals "0.0" "$r" "Zookeeper has no connections"
|
||||
}
|
||||
|
||||
teardown_suite() {
|
||||
kill $PID
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue