Download raw data from metrics

Hello,

As I was browsing the documentation, it was written that a “download csv” button would appear on the metrics tab.

I’ve searched throughout all the app and I can’t find the button, only a preview of the table, a preview that I can’t even copy paste without ruining the format.

Can anyone help on this?

Thanks

Hi, @alexandre.portugal: In the query builder, if you execute a query that returns a table of results, you may use the ellipsis menu in the upper-right corner above the chart to export the result as a CSV file:

Thank you for the fast response!

So, as you can see in the image below, When I query the response time from metrics only the timestamps appear … And even when I extend the time frame, the number of rows keeps the same.

I’ve got something like this when the query is for a whole day

Try this:

SELECT newrelic.goldenmetrics.apm.application.responseTimeMs 
FROM Metric 
WHERE appName = 'Your Application Name' 
  AND newrelic.goldenmetrics.apm.application.responseTimeMs IS NOT NULL 
SINCE 1 day ago 
LIMIT MAX

May I dare to say: THANK YOU!

Can we switch it to a standard SQL notation or should I use always NRQL?

I was trying to find the equivalent of group by to group results by the hour.

You may only use NRQL. The NRQL equivalent of GROUP BY is FACET. In order to FACET, you must use an aggregator function on the metric value, such as min, max, or average:

SELECT average(newrelic.goldenmetrics.apm.application.responseTimeMs) 
FROM Metric 
WHERE appName = 'Your Application Name' 
  AND newrelic.goldenmetrics.apm.application.responseTimeMs IS NOT NULL 
FACET hourOf(timestamp) 
SINCE 1 day ago 
LIMIT MAX

I recommend that you install the free NRQL Lessons app in your account and go through the lessons, to practice writing NRQL queries against your own data.

1 Like

Hello @philweber ,

Do you know if New relic already allows to facet by date and hour?

I showed how to group by hour in my previous reply. Please see NRQL: Group results across time | New Relic Documentation for a list of other available time-based functions.