Closest NRQL query to obtain summary graph?

We need to create a graph on many dashboards that look just like the summary graph. This graph does not show the NRQL query used to generate it, because there probably isn’t one.

My question is, what is the closest NRQL query one can write to obtain the summary graph (on the APM page - topmost graph).

We need this because we are going to automate creation of dashboards in MANY environments - and regularly update dashboards as we streamline them for our uses.

Thanks,
Mike

1 Like

@mgagnon1 Welcome to the community and congrats on posting your first topic!

I’m going to followup with our support team to see if they can provide you a response soon. Thank you for your patience. :slight_smile:

Joi

Good Q and I’m on a similar path to you as well; trying to bulk-manage dashboards via the REST API.

Looking forward to a response from Support as while there is the workaround of switching to the old view on the APM summary page and clicking on “Add to a dashboard” button; that is not applicable in this case since it cannot be managed via the API.

Out of interest, how to do you intend on managing the automation/scripting side of things?

@pweber, @6MM, @stefan_garnham - I consider you the NRQL kings. :crown: Any ideas here?

Did the support team come up empty on this?

Support Engineers do not write NRQL queries for customers. I’m asking the team what you would want to query to see if we can provide some direction here though. I just figured that in the meantime, it might be obvious to those of you that do so much NRQL work day in and day out.

No problem. I just saw that Joi was asking the support team. Typically when that happens I’d just let the pros take over since there are only so may hours in the day.

This has come up several times over the years. For whatever reason this chart isn’t easy to recreate. I personally don’t find it all that useful, but I think others do.

2 Likes

Hi, @hross and @mgagnon1: I don’t know if it is possible to recreate APM’s Web transactions time chart in NRQL. If it is, I don’t know how to do so; for example, I don’t know if or where New Relic records the amount of time is spent executing application code.

You might start with something like this:

SELECT 
  average(apm.service.transaction.duration), 
  average(apm.service.datastore.operation.duration), 
  average(apm.service.transaction.web.external.duration) 
FROM Metric 
WHERE appName = 'Your Application' 
TIMESERIES
2 Likes

Thank you kindly Phil,
Unfortunately we don’t see anything for datastore or web.external with this query - only transaction.

Some people question the value of this graph- I can attest that it’s extremely useful for us - it gives us an immediate understanding of where the time is being spent- especially when the database goes a bit sideways or some external service has too much contention. It’s the first graph we would look at in almost any situation to see where to look next.

Adding this graph with a rest call for a given application seems like a nice gap to fill in the dashboard rest API as “transactionSummaryGraph” or something like that.

Regards,
Mike

Are you comfortable posting an image of what you have in your chart? If you do that we might be able to suggest some way to find the underlying metrics. They are different and dynamic for the apps in my experience.

There would be value if they were correct. In my experience they aren’t always showing reality and an average across all transaction is often going to incorrectly show the core experience. For example if you have a lot of health checks. These can skew the charts. Without the ability to tune the chart to surface just the transactions you feel you want to aggregate the charts can actually be hurting you and masking very real problems. For some apps and customers this isn’t an issue. It’s highly dependent on the app.

1 Like

@mgagnon1 Just following up to see if you still need assistance with this query?