Question

I have this API call to return aggregate day for my entire site, but the begin data and end date for wha the call uses do no seem to be configurable. Is there any way to configur a begin date and end date for this API call? Are there any custom attributes or parameters I can use?

https://api.newrelic.com/api/v1/accounts/:account_id/applications/:app_id/threshold_values.xml

Was it helpful?

Solution

The threshold_values API call returns information similar the information you see in your application list including the health status color for each listed application.

There is a small difference in that the API call reflects data aggregated over three minutes whereas the application list values are aggregated over five minutes. The time frame for this API call is not configurable.

The possible values of the health status are as follows:

1 = green
2 = yellow
3 = red poor performance
4 = red application down (ping failures)

Most other New Relic API calls can include a begin and end time.

Here's an example from the New Relic docs:

curl -gH "x-api-key:REPLACE_WITH_YOUR_API_KEY" 'https://api.newrelic.com/api/v1/accounts/REPLACE_WITH_YOUR_ACCOUNT_ID/applications/REPLACE_WITH_YOUR_APP_ID/data.xml?metrics[]=EndUser/Apdex&field=score&summary=1&begin=2011-12-15T00:00:00Z&end=2011-12-16T00:00:00Z'

Here begin=2011-12-15T00:00:00Z&end=2011-12-16T00:00:00Z represent the beginning and ending times in XML timestamp format with timezone.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top