DQL
Questions about Dynatrace Query Language
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to fetch name of the dashboard using id with DQL?

chandu
Frequent Guest

I am attempting to obtain the amount of data scanned by DQLs at dashboard level. Could someone assist me in obtaining the dashboard name as a dimension, in addition to the dashboard ID? I have attached the DQL.

Basically, how to get dashboard name using id? Appreciate your help, thanks!

 

 

fetch dt.system.events
| filter event.kind == "BILLING_USAGE_EVENT"
| filter event.type == "Log Management & Analytics - Query"
| filter client.application_context == "dynatrace.dashboards"
| parse client.source, "DATA 'ui/dashboard/' STRING:dashboard.id"
| dedup event.id
| summarize {
   data_read_bytes = toDouble(sum(billed_bytes)),
   Query_count = count()
  }, by: {
    dashboard.id
    // , name?
  }
| sort data_read_bytes desc
4 REPLIES 4

p_devulapalli
Leader

@chandu I think your best option here would be to use a lookup table that has the dashaboard.id and dashboard name mapping and use it as part of the query. Not sure dashboard name is actually available as a field via DQL

https://docs.dynatrace.com/docs/shortlink/grail-lookup-data

https://www.youtube.com/watch?v=2QsrWOhFDsc

Phani Devulapalli
Discover how storing lookup data in Dynatrace Grail helps you enrich your observability pipeline with custom business context. In this Tips & Tricks session, Daniel Adams from FreedomPay shares a real-world use case showing how developers can transform raw trace data filled with cryptic IDs into ...

chandu
Frequent Guest

@p_devulapalli Thank you. Yes, lookup is the choice if we want to join data from source query with a subquery. But the question is does Dynatrace expose mapping between dashboard name and id via any of the system tables.

@chandu I am bit doubtful if dashboard name is stored in any of the system tables, will leave this open for anyone to comment on further 

Phani Devulapalli

Agreed. But you can use Code tile instead - run the DQL and accessing a Dynatrace Platform Document API to fetch the name. Dashboards are not stored in DQL afaik.

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Featured Posts