Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Insights - plot 2 graphs in one dashboard using NRQL

nrql

#1

Is it possible to plot 2 graphs with 1 query, e.g. to show total no. of transactions and transactions that errored, e.g. these 2 queries in one dashboard:

SELECT count(*) FROM Transaction TIMESERIES 60 minutes SINCE 1 week ago

SELECT count(*) FROM Transaction WHERE `response.status` NOT LIKE '2%' AND `response.status` NOT LIKE '3%'  TIMESERIES 60 minutes SINCE 1 week ago

#2

Hi, @ruslan: Yes, you may certainly have two (or more!) charts on a single dashboard; displaying multiple charts is what dashboards are designed to do:

If, as I suspect, you want to display the results of two queries in a single chart, unfortunately that is not possible.


Most widely used new relic metrics for performance/load test on front-end and backend
#3

Hi,

Yes, it is possible.

You can do:
SELECT filter(count(*), WHERE `response.status` NOT LIKE '2%' AND `response.status` NOT LIKE '3%') as 'no 2xx or 3xx', filter(count(*), where true) as 'All' FROM Transaction TIMESERIES 60 minutes SINCE 1 week ago

Also, if they are far away in terms of vertical axis you can do some simple math on one of them. Like divide All by 10 in order to have them fit into one view.
SELECT filter(count(*), WHERE `response.status` NOT LIKE '2%' AND `response.status` NOT LIKE '3%') as 'no 2xx or 3xx', filter(count(*), where true) / 10 as 'All / 10' FROM Transaction TIMESERIES 60 minutes SINCE 1 week ago


#4

awesome, @eyedean. thanks!


#5

I stand corrected. Thanks, @eyedean!


#6

Is there a way to control colours of graphs?