Allow Jenkins nodes stats to be shared with centralized server

21 views
Skip to first unread message

Sean Feole

unread,
Dec 13, 2019, 12:18:20 PM12/13/19
to javamelody
I'm using the javamelody plugin on Jenkins 8 masters and have utilized the centralized server. ( https://github.com/javamelody/javamelody/wiki/UserGuideAdvanced#optional-centralization-server-setup ) 
This is really nice and allows me to view the metrics in one location and combine all of their data. However, I noticed that the attached slaves to each Jenkins Master is not included in the centralized server.  Is it possible to pass the statistics from each jenkins slave (node) to the central server? 

I've tried adding the following URL to the Central Server:   http://jenkinsmaster:8080/monitoring/nodes      
however it just yields an empty screen. 

I poked around the code, but was not sure were to look for this feature and/or is it even supported. 

evernat

unread,
Dec 15, 2019, 8:02:56 PM12/15/19
to javamelody
Hi Sean,

This question was not asked before. And yes, that feature for Jenkins slaves is supported, but it needs a trick.

If you run the optional collect server like the following, you can add one or several jenkins master(s) like you have already done:
    java -jar javamelody-collector-server.war
(It just needs parameters in the Jenkins master for security as said in the advanced user's guide.)

Then, if you run another collect server like the following, you can add Jenkins instances like before and it will collect the monitoring data of the Jenkins nodes (slaves in general) including builds, instead of the monitoring data of the Jenkins masters:
    java -Djavamelody.monitoring-path=/monitoring/nodes -jar javamelody-collector-server.war --httpPort=8081
I have used a different httpPort to be able to have both the default 8080 for the first one and 8081 for the second one, at the same time.
When adding the Jenkins slaves, do to not use the same application names as the ones for Jenkins masters, in order to avoid conflicts on storage.

Now, we need to find a simple way to have both masters and slaves in the same collect server. The code will need to be changed a bit for that.

bye,
Emeric

evernat

unread,
Dec 19, 2019, 6:16:02 PM12/19/19
to javamelody
Hi again Sean,

I said that, when using the optional collect server with Jenkins, it was needed to change some code in order to have the monitoring of Jenkins nodes in the same collect server than the monitoring of the Jenkins master.
And when adding a Jenkins master instance in a collect server, it will automatically add Jenkins nodes at the same time.

There is a snapshot build of the collect server available at:

Just restart with the new version as usual:
    java -jar javamelody-collector-server-1.81.0-SNAPSHOT.war

bye,
Emeric

Sean F.

unread,
Dec 20, 2019, 3:51:35 AM12/20/19
to javam...@googlegroups.com
Oh wow, this is great news!!! Thanks  Emeric, I'll update and give this a try and report back!
-Happy Holidays.


--

---
You received this message because you are subscribed to the Google Groups "javamelody" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javamelody+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/javamelody/306e2a0f-54ec-4322-86cb-c59b48cd7f57%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages