How to use NRQL to graph Nodejs/EventLoop/Usage

I can see graphs that show metrics for NodeJS under APM > Node VMs page.
I can also add graphs from that page to a dashboard, or a NewRelic ONE dashboard.

What I haven’t figured out, is how to start out with a blank Newrelic One dashboard, and write an NRQL query to show the same Nodejs/EventLoop/Usage data.

Please could someone post an example?

Also, how do I set up a dashboard so that all graphs can be filtered by ‘server’ like the APM overview

Many thanks

1 Like

Hi, @andrew.hawkins: NRQL can only query events, not metrics. The information on the Node VMs page is metric data, so it cannot be queried with NRQL.

Here are the instructions for adding filtering to an Insights dashboard: https://docs.newrelic.com/docs/insights/use-insights-ui/manage-dashboards/filter-insights-dashboards. I am not sure if New Relic One dashboards have this capability yet.

Hey all,

I’m updating this issue with some great news! We’ve added the ability to query metric data!

An example would be recreating the ‘Memory Usage’ chart from your applications’ Node VM tab. This can be done with the following query:

SELECT sum(newrelic.timeslice.value) * 100000 AS `Memory Usage` FROM Metric WHERE entity.guid = '[entity.guid goes here]' AND metricTimesliceName LIKE '%Heap%' OR metricTimesliceName LIKE '%Non-Heap%' OR metricTimesliceName LIKE '%Memory%' FACET metricTimesliceName TIMESERIES

For additional information on this, check out these docs and happy NRQL’ing!