Single host and multiple JVM instances

Hello

I’ve a single host with 5 JVMs each running a java application configured with the new relic java agent. All JVMs use the same application name. Is it possible in the new relic web UI to see the stats per JVM instance on the host? In my particular use case the 5 JVMs are each performing a different function within the application.

Apologies if this is a silly question, I’m new to new relic and am slowly finding my way around.

Thanks

Alex

When you log into RPM, you will see the name of the application. Once you click into that name you will be presented with your global scope data, by default. In order to see the scoped data for a particular JVM instance, you want to choose the JVM from the Server list at the top of the page (if you have any difficulty in locating the drop down list, find the application name. To the right of that is your Time Picker and to the right of that is the Server drop down.)

Thank you for your reply. I’ve checked and I don’t have a Servers drop down to the right of the Time Picker (I have managed to find the Server drop down in a different application I have configured).

Looking through the UI I have one server with only 1 instance reported. I’ve checked and there are 5 JVMs running on the server but for whatever reason they are only being seen as a single instance in the UI. I have simply shared the same New Relic jar/config for each instance - could this be the reason why they are reporting as a single instance?

If I hover over the application name on the APM application list page the application is described in the tool tip as being a “Java application running on 1 host (4 instances)”. If I click into the application Overview it correctly lists 1 server with 4 instances (in the main body of the page).

If you’d like to PM me the permalink of the RPM overview page for the application you’re looking at, I would be happy to take a closer look. At this point I suspect something with your configuration files.

Hello,

A question on the similar lines. I’ve multiple instances of an application reporting to a single new relic application. How can I be alerted about the individual instances? Say one out of two instances is down: the APM dashboard will still show the application in green. Is the coloring scheme configurable based on the number of expected instances? Is there any reporting mechanism for one or more application instance being down?

Thanks,
Deepak

PS: Please let me know if I’m supposed to move this to a new post all together.

Hi Deepak

I’m not sure if this helps but I ended up configuring each instance of the application with two application names. The first describes the instance of the application and then the second was used for the aggregated data collected across all instances. Something like:

newrelic.config.app_name: app-instance-1;all-app-instances
newrelic.config.app_name: app-instance-2;all-app-instances

The first name in the list must be the unique name (something I missed originally).

This link describes it in detail: https://docs.newrelic.com/docs/apm/new-relic-apm/installation-configuration/using-multiple-names-app

Alex

1 Like

Hey @atanner - thanks for stepping in with some thoughts and help! Awesome! :full_moon_with_face:

Hi,

We are also facing this issue, we have one server with 5 JVM’s running.

Each instance of the JVM runs in it’s own “Java” service. However viewing the server breakdown in NewRelic shows 1 singular Java instance and a combination of the memory being used summarized into one service.

I am able to see there are 5 instances running, but I cannot get a break down of them.

Any ideas on how to changes this?

Thank You.

Kind Regards
Matt Orchard

Hi Matt

New Relic uses host/port for uniqueness, so you can distinguish the JVMs by putting a switch like this into the startup arguments for each JVM:

-Dnewrelic.config.appserver_port=8081

Once you have used appserver_port to name the JVMs and restart them, you should be able to see them individually in the dropdown and in the profiling interface.

I’ve used this approach for a series of worker JVMs all running on the same virtual machine.

Hope that helps

Alex

1 Like

This is great - thank you for sharing your experience and expertise, @atanner!