Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Fetching JVM Alias Name


#1

https://api.newrelic.com/v2/applications/523587142/instances.json

by using the above API call we are getting response which contains (JVM Name) host, port and other information,
however we require name associated with host for example host:port contains a name we are not able to
get the name.

Please provide the way in which we can get the name associated with jvm


#2

Hey @SNeti - I’m not sure it’s possible to get the JVM alias name via the API, though, I’m happy to dig in and see if I can find a way. Could you send a link to where you see the JVM Alias Name within New Relic & I’ll check to see if there’s a way to pull that out via API.


#3

Hi @RyanVeitch please find the below link and provide us a fesable solution:

https://rpm.newrelic.com/accounts/2249219/applications/523587142


#4

Hi @SNeti

It doesn’t look like you can get that data from the REST API, but, you can get it via NRQL Query, see this link for that:

https://insights.newrelic.com/accounts/2249219/query?query=SELECT%20appName,%20host.displayName,%20host%20FROM%20Transaction%20WHERE%20appId%20%3D%20523587142%20SINCE%201%20WEEK%20AGO%20LIMIT%20MAX

You can obtain this data programmatically via the query API:
https://docs.newrelic.com/docs/insights/insights-api/get-data/query-insights-event-data-api


#5

@RyanVeitch

Thank you However we are getting lot of unnecessary data we need only distinct ‘host.displayName’ this may not be feasible for our requirement


#6

If you only need the host.displayName you can adjust the query to:

SELECT uniques(host.displayName) FROM Transaction WHERE appId = {yourAppID}

#7

@RyanVeitch Thank you this works for our requirement