We are using Heroku with multiple dynos. New Relic’s memory metrics does not reflect exact numbers. So I want to get average memory usage by host and then sum all this numbers to get exact usage with the following query.
select sum(mem) from( SELECT average(newrelic.timeslice.value) as mem FROM Metric where appName = 'Server Name' and host like 'web%' and metricTimesliceName = 'Memory/Physical' FACET host )
But this query does not work. As far as I see, subselect is working with events but not with Metric data type.
The question is how can I achieve my goal with NRQL?