Finding IP of a Jenkins node

jenkins

Solution

Through the Script Console (Manage Jenkins -> Nodes -> Select a node -> Script Console) of the node we can execute groovy script. Run the following command to get the IP address.

println InetAddress.localHost.canonicalHostName

Problem

A windows slave node connected to Jenkins server through "Java web start". The system information of the node doesn't have it's IP address. I had to run through all the slaves node we had, and find which machine (ip address) corresponds to the slave node in Jenkins. Is there a way to find the IP address of a slave node from Jenkins itself?

Original source