I am now deciding whether to use metrics API or DQL to query metrics. But now, I am facing a problem that I can't find some metrics using DQL. (e.g. builtin:host.cpu.load15m)
Is that all metrics that can be queried by metrics selector can also be use DQL to query?
Solved! Go to Solution.
Hi Stephen -
DQL is only used for querying logs and events with Grail: DQL Documentation.
For the metric selector, metric queries are handled differently, and do not use DQL. I'd recommend checking out the Data Explorer Advanced Mode to get a better idea of how metric queries are handled.
As of the late May / early June 2023 Dynatrace rollout, this is now possible via DQL. Please view MaciejNeumann reply for a link to the metrics covered with Grail.
With the rollout of the latest Dynatrace, the DQL can also query metrics. Here you can find the documentation article with the list of all metrics supported by Grail:
Built-in metrics on Grail
Do you know when this will be available? We are looking to do a workflow that has logic like:
If calc:service_metric1 + calc:service_metric2 > 20
Then Enable Alerting Profile via api x
If not Disable Alerting Profile via api x
Is this possible since these are Calc:service metrics? If not when is this functionality expected?
So is there a way to use DQL in API queries? So far in all the docs, I don't see any mention of using DQL commands and queries in the API, only in the new web console. Is this coming down the pipe?
I ask because I find the Dynatrace API extremely complex and very limiting compared to many other API's I've used for similar tools. However, if we could use DQL queries in our API calls that would pretty much solve all of the issues I have with the Dynatrace API and make it extremely powerful.