Dashboard details

I want to extract the followed details for my account using nerdgraph, but I am unable to do so :

  1. How many dashboards are there
  2. Number of dashboards created by different users
  3. Dashboard last activity
  4. Number of widgets/tabs in the dashaboard
  5. Number of queries running in a dashboard

this is all so that I am able to manage the data which is being queried in a specific interval and keep control over it.

I would really appreciate all the help and suggestion around this topic.

Hello @RishavSharma.

I would take a look at all of our fantastic documents regarding this: Introduction to New Relic NerdGraph, our GraphQL API | New Relic Documentation. For your first question you can use: NerdGraph tutorial: List and revoke live chart URLs | New Relic Documentation. Please look over this documentation and let us know if you have further questions!

thanks for this I have gone through this documentation many times before but doesn’t look like I have answers on that page.

Hey @RishavSharma -

We would love to help you more. Can you tell me more about what’s not working for you? Anything more specific you can tell us would be great.

Hi, @RishavSharma: I don’t think the information you want is available via NerdGraph (or NRQL). You may use NerdGraph to get a list of your dashboards and count how many are returned, but I don’t think you can get a count with a simple request.

Similarly, you may loop through the list of dashboards and count how many were created by each user, but I don’t think NerdGraph can aggregate that information for you.

You may request a JSON definition of each dashboard and use that to calculate number of tabs, widgets, and queries. I don’t think last activity is available by any means.

In short, NerdGraph (or NRQL) do not provide an easy way to get the data you want. As far as I know, you will have to request details about all your dashboards and calculate the data yourself.

This query may give you “dashboard last activity”, depending on how you define that:

SELECT count(*) 
FROM NrAuditEvent 
WHERE actionIdentifier LIKE 'dashboard%' 
FACET actorEmail, actionIdentifier, targetId 
SINCE 1 week ago

The problem statement I am trying to address is to moderate the dashboard created since for our account we are running out of queries we can run, but since we have a big user pool it’s kinda difficult to moderate it with simple communications, therefore, being able to query that would be a great help.

do you think this can be a good feature option to expose this information through some table or directly through nerdgraph?

@RishavSharma - If you are looking to get all this information in one table then this would be a feature request to possibly add some additional attributes to the NRAuditEvent. The solutions @philweber provided is the extent of which we have information in regards to dashboards activity and auditing. Note that you can also run NRQL queries via Nerdgraph as well.

1 Like