Description Usage Arguments Details Value See Also Examples
This function is a facade on the New Relic public REST API for getting application metric data. You can use it to get any value of any metric over a given time range. The results are always returned as a time series of numeric values.
1 2 3 4 |
account_id |
your New Relic account ID |
api_key |
your New Relic APM REST API key |
app_id |
the application id. Use a value of -1 to generate a fake response for tests. |
duration |
length of time in seconds of the time window of the metric data |
end_time |
the end of the time window |
period |
duration of each timeslice as lubridate::Duration or scalar value in seconds, minimum of 60 |
metrics |
a character vector of metric names |
verbose |
show extra information about the calls |
values |
a character vector of metric values (calls_per_minute, average_response_time, etc) |
cache |
TRUE if the query results should be cached to local disk and reused when subsequent calls have matching parameters |
host |
use to proxy requests through an intermediate host you can override the default host
of |
progress_callback |
is a caller supplied function that takes two arguments: the iteration number and the total number of iterations. |
... |
arguments passed on to |
This executes HTTP queries using the underlying Metric Data REST API at api.newrelic.com. Depending on the duration and period the data may be fetched in successive batches due to the limitations on the amount of data that can be retrieved.
a data table with observations as timeslices and the timeslice start time, metric name, and values in the variables
New Relic REST API Documentation
1 2 3 | rpm_query(account_id=12345, api_key='your_api_license_key_here',
app_id=-1, duration=3600, period=300, end_time=as.POSIXct('2016-01-28 09:15:00'),
metrics='HttpDispatcher', values='calls_per_minute')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.