25 Sep 2025
02:18 PM
- last edited on
29 Sep 2025
07:41 AM
by
MaciejNeumann
Hi,
We are using a Dynatrace Managed environment and would like to automatically raise a problem when license consumption (for example, DDUs) is close to being exhausted.
I checked the available metrics but couldn’t find anything like ddu.used or hostunits.used. I did see some metrics such as billing.ddu.log.total, but for DDUs there are also metrics and traces that need to be considered in the calculation, not just logs.
Is there a way to monitor the overall license consumption across all DDU categories?
Can we set up alerting or problem generation for approaching license limits in Dynatrace Managed?
If there are no direct metrics, what would be the recommended approach to achieve this?
Any advice or best practices would be greatly appreciated.
Regards, Deni
Solved! Go to Solution.
25 Sep 2025 05:48 PM
Hi,
Managed is more limited about that.
For DDU categories, you can try this dashboard.
I do not know any way to alert automatically in Managed about that. I would say review before dashboard to checking trend, and compare to limit your license has.-
Best regards
25 Sep 2025 10:22 PM
For these purposes we developed an Extension 2.0 which creates metrics per Dynatrace environment and you can then alert using Metric events. It scrapes the Cluster API and writes metrics.
26 Sep 2025 10:16 AM - edited 26 Sep 2025 11:06 AM
@Julius_LomanThanks for the reply!
If I understand correct you suggest to create a custom extension which calls API to collect the license information and the sent a custom event via v2/events/ingest?
I searched in the swagger but can't find API to get licenses - I see only v1/config/clusterid and v1/clusterversion nothing more in v1, v2 and config APIs connected to cluster or license.
26 Sep 2025 03:08 PM
@deni - https://docs.dynatrace.com/managed/shortlink/api-cluster-environments-list-existing
This includes consumption data (Classic licensing per environment).
Mark's answer is also valid if you need it for a single environment. We had a requirement to alert on DDU consumption for two environments together, which is not possible with metrics just from a single environment.
26 Sep 2025 11:42 AM
In managed you should know from your license the amount of DDUs you have (i.e. a fixed number)
What you can do is have a metric event to alert on this, but keep in mind this will be per environment.
((builtin:billing.ddu.metrics.total:splitBy():sum:default(0):fold(sum))
+
(builtin:billing.ddu.log.total:splitBy():sum:default(0):fold(sum))
+
(builtin:billing.ddu.serverless.total:splitBy():sum:default(0):fold(sum))
+
(builtin:billing.ddu.events.total:splitBy():sum:default(0):fold(sum))
+
(builtin:billing.ddu.traces.total:splitBy():sum:default(0):fold(sum)))
That will give you the total amount used.
Let's say your total available is 1M, so put as a static threshold in the metric event with something like 800k.
With an extension, script or synthetic-test you could extract this information for the whole cluster from this API https://docs.dynatrace.com/managed/shortlink/api-cluster-get-license-consumption
Also maybe something to have a look at are DDU pools, where you can assign a specific env a limit of DDUs allowed to be consumed. https://docs.dynatrace.com/docs/shortlink/davis-data-units#ddu-pools