sudo apt-get install jq
curl -u admin:PASSWORD -G "https://CLUSTERNAME.azurehdinsight.net/api/v1/clusters/CLUSTERNAME/hosts" | jq '.items[].Hosts.host_name'
OUTPUT:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2090 100 2090 0 0 2557 0 --:--:-- --:--:-- --:--:-- 2555
"hn0-linuxh.bpa0iysj5klejpk0fzlmcicoke.ix.internal.cloudapp.net"
"hn1-linuxh.bpa0iysj5klejpk0fzlmcicoke.ix.internal.cloudapp.net"
"wn1-linuxh.bpa0iysj5klejpk0fzlmcicoke.ix.internal.cloudapp.net"
"zk0-linuxh.bpa0iysj5klejpk0fzlmcicoke.ix.internal.cloudapp.net"
"zk1-linuxh.bpa0iysj5klejpk0fzlmcicoke.ix.internal.cloudapp.net"
"zk6-linuxh.bpa0iysj5klejpk0fzlmcicoke.ix.internal.cloudapp.net"
Parse the output and dump the list to a text file.
No comments:
Post a Comment