List of Slaves connected to master - Hudson

Groovy script to get all computers:

def jenkins = Jenkins.instance
def computers = jenkins.computers

computers.each{ 
  println "${it.displayName} ${it.hostName}"
}

Look at http://hudson:8080/computer/


You don't need to parse the HTML - most of the Hudson pages can be turned into API calls by adding URL suffix, e.g. make GET calls to:

http://hudson:8080/computer/api/json

Switch the JSON for either XML or Python if you prefer these over JSON.

If you use just the API suffix, you'll get a short generic help page on the API.