# hcloud — server status dashboard from hcloud server list
# hcloud server list | arb -p hcloud
bars .status
source .status { in; reject /^ID/; field 3; tally }
gauge .servers -max 100
source .servers { in; reject /^ID/; count }
tail .names
source .names { in; reject /^ID/; field 2 }
test "status tally" { given "ID NAME STATUS" "1 foo running" "2 bar running" "3 baz off"; run { in; reject /^ID/; field 3; tally }; want "running\t2" "off\t1" }
test "server count" { given "ID NAME STATUS" "1 foo running" "2 bar running" "3 baz off"; run { in; reject /^ID/; count }; want "3" }