How to display the status of given Jenkins nodes in a dashboard

1.2k Views Asked by At

We have some Jenkins build jobs and pipelines running for our project and a nice dashboard with the build status of the main jobs. Now while most jobs can run on a lot of possible nodes, there are two unique nodes for HIL tests. Now sometimes it happens that you start a job without noticing that one of them is stuck or offline, so you lose valuable hours before you notice the problem, so it would be valuable to see their status (idle, busy, offline). But I couldn't find a description how to do that.

1

There are 1 best solutions below

0
joedwardson On

Jenkins supports json API where it will display node data that can be fetched. You can see the json output by navigating to:

https://<link to jenkins>/computer/<your node>/api/json

I think what you should look for is the entries "idle" & "offline".

Then you have to process your json response to extract the status. It is also possible to use Python directly to get the desired data. Here is a link to some Documentation