Collect server and pods

39 views
Skip to first unread message

wtp...@gmail.com

unread,
Feb 21, 2025, 11:49:36 AMFeb 21
to javamelody
We used a collect server to gather the Javamelody statistics for pods in a k8s environment.

We adopt the program to auto register the pods to the collect server when the pod starts.

The problem is the application name, like service name-854b94ccb6-hhccv, is consisted of two random strings which changes when the pod is restarted.

We have more than one pods to acheive high availability so that we cannot set the application name to a fixed value in the pod.

Any ideas to handle this ? Thank you.

evernat

unread,
Feb 21, 2025, 12:07:18 PMFeb 21
to javamelody
Hello,

I suggest that you set the application name to a fixed value in the pods, when auto-registering each pod to the collect server. That is when you call registerApplicationNodeInCollectServer(applicationName, collectorServerUrl, applicationNodeUrl) on the MonitoringFilter class.

So the statistics will be aggregated for all those pods under a single application in the collector server composed of 2 instances. Given those pods all have the same requests and are used for a single application, I suppose it make sense to aggregate the statistics for those pods.
Or in the case that you have pods for 2 applications doing 2 different things, then you may use 2 fixed application names in the pods. One application name for each application.

bye,
Emeric
Reply all
Reply to author
Forward
0 new messages