Recommend ways to create an inventory of nodes?

19 views
Skip to first unread message

Heinonen, Antti

unread,
Jun 26, 2015, 1:27:45 AM6/26/15
to jenkins...@googlegroups.com
Hi,

Can anybody recommend ways to ask Jenkins master for accurate details about it’s nodes. Mainly hostname/IP Address and display name.
Currently I am querying the Scriptler with 

for (aSlave in hudson.model.Hudson.instance.slaves) {
  println('Name: ' + aSlave.name);
  println('Hostname: ' + aSlave.getComputer().getHostName());
}

But this method does not work for nodes that are started with the JNLP method. Is there any better way?

Thanks,
Antti

Khai Do

unread,
Jul 15, 2015, 12:53:04 AM7/15/15
to jenkins...@googlegroups.com, antti.k....@here.com
We use the python-jenkins (https://pypi.python.org/pypi/python-jenkins) library to get node and job info.  Take a look at the get_nodes(), get_node_config() and get_node_info() methods.  
Reply all
Reply to author
Forward
0 new messages