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

Create JVM metric using REST API


#1

Hello, I am trying to create multiple alerts for JVM metrics using REST API.

These are the metrics I want to create.
Heap memory usage: Each chart shows the used and committed heap space in MB for a given heap.

  • Garbage collection: The garbage collection CPU time.
  • Thread count: The current number of active threads in the JVM.

I found this link explaining how to create alert with REST API
https://rpm.newrelic.com/api/explore/alerts_conditions/create

I am not sure what to put in Metric field for the metrics I want to create alerts for.
Can anyone help me for this?
Again, since I am trying to create those alert automatically, creating it via UI won’t solve my problem…

Thank you for your time in advance!


Create JVM alerts using REST API
Create JVM alerts using REST API
#2
Duplicate Post

Sorry there was an error message when I created my first post, so I created new one.
both are posted at the same time :frowning: this post is duplicated one. sorry !

Hello, I am trying to create multiple alerts for JVM metrics

Thread count: The current number of active threads in the JVM.

Heap memory usage: Each chart shows the used and committed heap space in MB for a given heap.

Garbage collection: The garbage collection CPU time.

These are the metrics I am trying to create alerts for.

I found the document describe how to create alerts using REST API

(https://rpm.newrelic.com/api/explore/alerts_conditions/create)

But I am not sure what to put on Metric field.

Again, since I am trying to create those using REST API, create it via UI won’t solve my problem…

Can anyone help me for this ?

Thanks for your time in advance


#3

Hi @Changik.Choi, you can usually find all metric information in the Insights Data Explorer, along with the JVM Metrics Page. If you are stuck, a good way to find the specific names of metrics is to go to the JVMs tab in APM, find the chart for the metric you need and add it to a dashboard. Then, in the dashboard if you edit a chart you will see the precise metric name, similar to the following:

  • Thread Count - JmxBuiltIn/Threads/Thread Count
  • Garbage Collection - GC/PS MarkSweep, GC/PS Scavenge
  • Heap memory usage - Memory/Heap/Used

Hope this helps :slight_smile:


#4

Oh wow, I didn’t know they have ‘most popular metric’ .I have been checking only other pages…not insights (don’t know why haha) I will check this page! thank you


#5

Great no problem at all let me know if you need anything else :slight_smile: