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

Creating alert for python-application


#1

Hello, I am trying to set up an alert for python-base application (both web, api) with some Basic, Default metrics.
I am going to use NewRelic API for creating this (https://rpm.newrelic.com/api/explore/alerts_conditions/create)
I was able to pull List of Metric of existing python application which was huge, and I believe this is not the name I can use for API request.

‘Instance/connects’,
‘CPU/User Time’,
‘HttpDispatcher’,
‘Apdex’,
‘WebTransaction’,
‘CPU/User/Utilization’,
‘WebTransaction’,
‘Errors/allWeb’,

These are some of metrics from top of the list.
Q1. Can I know each one’s metric name that I can use to create API request.

Q2. Other metric that could be beneficial to monitor commonly?

Q3. Any link that I can find the list of metric and description of it?

Thank you so much!


#2

Hi @Changik.Choi, those should be the correct metric names to use, are you receiving an error when you try to create an Alert condition with the API?

Using the Data Explorer in Insights will show you popular metrics reported by your application, so that’s a great place to start :slight_smile:


#3

Hello, Rdouglas.
I would like to see ALL metrics for python application.
I was able to look up popular metric on insight, and pull up the list of metric using NR api
(I have 1 python application on pre-prod that I can use)
I am just wondering if this is full-list (generic metrics for all python application)

I am looking for metric that check
http-5xx-errors
http-4xx-errors
HealthCheck(service up/down)
Responsetime (I foun Python/WSGI/Response for this)

P.S Can is there way I can have list of available metric without having the application?
I need metrics for Tomcat, Nginx as well.
Thank you for your time in advance


#4

The HTTP Errors would actually be part of the HTTP Response Code attribute in Transactions:

SELECT count(httpResponseCode) FROM Transaction FACET httpResponseCode SINCE 30 MINUTES AGO TIMESERIES

So we do have some information in our documentation for common metrics, or metrics that we collect from different environments and frameworks, for example here is the JVM including Tomcat page.

Currently in Insights, you can only look at metrics that have actually been reporting to your from your application to new relic, but will not give you a general list. There are so many different environments and frameworks that a list like this may not be useful anyway, but it may be worth adding as a Feature Idea here on the Hub :slight_smile:


#5

Thank you for the reply !
Quick question, where can I put the Query you provided?


#6

Hey @Changik.Choi

That query can be run in Insights:

https://insights.newrelic.com/accounts/{your_account_id}/query

Be sure to enter in your account id into that URL.