Get average throughput for an app (v2)

You can use the New Relic REST API (v2) to obtain the average throughput for your app, including web application and non-web application throughput. These values appear in the Throughput chart on your app's Overview page: Select the Transaction time chart title, and then select your choice.

Web app throughput

To obtain the average web application throughput value for a time period, use a single command to obtain the metric HttpDispatcher:requests_per_minute. This example shows the time range for a specific 24 hour period.

curl -X GET "https://api.newrelic.com/v2/applications/${APPID}/metrics/data.json" \
      -H "X-Api-Key:${APIKEY}" -i \
      -d 'names[]=HttpDispatcher&values[]=requests_per_minute&from=2014-02-21T23:59:00+00:00&to=2014-02-22T23:59:00+00:00&summarize=true'
  • Be sure to replace ${APPID} and ${APIKEY} with your application ID and API key for the account.
  • To change the time range, include from and to values.
  • To keep the default time period of the last 30 minutes, omit the from and to values.
  • To return a series of throughput values instead of an average, omit summarize.

Here is an example of the Throughput chart on the Applications Overview page.

Web application throughput chart

APM > (selected app) > Monitoring > Overview: You can use the New Relic REST API (v2) to return the average Throughput value that appears on your app's Overview page.

Web app throughput (single host)

To obtain the average throughput from a single host, for a given time period, use a single command to obtain the metric HttpDispatcher:requests_per_minute and specify the numeric ${HOST}. To identify the host, use the UI or the REST API.

This example shows the time range for a specific 24 hour period.

curl -X GET "https://api.newrelic.com/v2/applications/${APPID}/hosts/${HOST}/metrics/data.json" \
      -H "X-Api-Key:${APIKEY}" -i \
      -d 'names[]=HttpDispatcher&:values[]=requests_per_minute&from=2014-02-21T23:59:00+00:00&to=2014-02-22T23:59:00+00:00&:summarize=true'

Non-web app throughput

To obtain the average non-web application throughput value for a given time period, use a single command to obtain the metric OtherTransaction:requests_per_minute.

This example shows the time range for a specific 24 hour period.

curl -X GET "https://api.newrelic.com/v2/applications/${APPID}/metrics/data.json" \
      -H "X-Api-Key:${APIKEY}" -i \
      -d 'names[]=OtherTransaction&values[]=requests_per_minute&;from=2014-02-21T23:59:00+00:00&to=2014-02-22T23:59:00+00:00&summarize=true'
  • Be sure to replace ${APPID} and ${APIKEY} with your application ID and API key for the account.
  • To change the time range (as shown in this example), include from and to values.
  • To keep the default time period (last 30 minutes), omit the from and to values.
  • To return a series of throughput values instead of an average, omit summarize.

Here is an example of the Throughput chart for a non-web app on the Overview page.

Non-web app through put value

APM > (selected app) > Monitoring > Overview: You can use the New Relic REST API (v2) to return the average Throughput value that appears on your non-web app's Overview page.

Non-web app throughput (single host)

To obtain the average throughput for a non-web app from a single host, for a given time period, use a single command to obtain the metric OtherTransaction:requests_per_minute and specify the numeric ${HOST}. To identify the host, use the UI or the REST API.

This example shows the time range for a specific 24 hour period.

curl -X GET "https://api.newrelic.com/v2/applications/${APPID}/hosts/${HOST}/metrics/data.json" \
      -H "X-Api-Key:${APIKEY}" -i \
      -d 'names[]=OtherTransaction&:values[]=requests_per_minute&from=2014-02-21T23:59:00+00:00&to=2014-02-22T23:59:00+00:00&:summarize=true'

For more help

Additional documentation resources include:

Recommendations for learning more: