# Precise DDU consumption in Managed environment?

**URL:** <https://community.dynatrace.com/t/precise-ddu-consumption-in-managed-environment/43359>\
**Category:** Dynatrace Managed\
**Tags:** ddu, managed-cluster, licensing\
**Created:** [December 25, 2023, 10:12pm UTC](https://community.dynatrace.com/t/precise-ddu-consumption-in-managed-environment/43359 "2023-12-25T22:12:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [December 25, 2023, 10:12pm UTC](https://community.dynatrace.com/t/precise-ddu-consumption-in-managed-environment/43359/1 "2023-12-25T22:12:44Z")

</div>

I have a Managed environment where license is rotating in some days.

In CMC, I have a message that I have consumed 3.15 M DDUs out of 3.2mil DDUs. Now that gives me between 45000 and 55000 DDUs left. With the higher figure I would be OK, but not with the lower. And I believe that the values that are in CMC might not be the most recent, as it seems to not incorporate the last two hours.

Getting a more precise value hasn’t been easy. I tried the Cluster APIs, but they don’t seem to get that information. Given it’s only one environment, I went through the tenants Consumption menu, and then went to the corresponding Data Explorer for each one of the pools, did Single Value and Format none, summed them up in a calculator, and got what seams the real value. Summing them in Data Explorer would also seem to be an option…

Does someone have a way to get more precise values? And are the assumptions I made valid?

---

<div class="post-metadata">

**Author:** ![Mohamed\_Hamdy](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@Mohamed\_Hamdy](https://community.dynatrace.com/u/Mohamed_Hamdy)\
**Post date:** [December 26, 2023, 5:22am UTC](https://community.dynatrace.com/t/precise-ddu-consumption-in-managed-environment/43359/2 "2023-12-26T05:22:22Z")

</div>

Hi&nbsp;[@AntonioSousa](https://community.dynatrace.com/user/17213)&nbsp;,

you are right, I’m using the data explorer as well, and I’ve created a dashboard to get the DDUs consumption, also, there is a good DDU license consumption dashboard, you will find it in the demo environment “guu84124”

Best Regards,

Mohamed

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [December 26, 2023, 12:13pm UTC](https://community.dynatrace.com/t/precise-ddu-consumption-in-managed-environment/43359/3 "2023-12-26T12:13:05Z")

</div>

[@Mohamed\_Hamdy](https://community.dynatrace.com/user/4007),

Yes, that dashboard is great, and we have improved it ourselves.

I have just added a new tile for the sum of DDU usage. I used the following metric expression, with Single Value and Format:None, for the total amount of DDUs consumed in a certain period:

```markup
builtin:billing.ddu.metrics.byEntity:splitBy():sum:default(0) + builtin:billing.ddu.log.byEntity:splitBy():sum:default(0) + builtin:billing.ddu.events.byEntity:splitBy():sum:default(0) + builtin:billing.ddu.serverless.byEntity:splitBy():sum:default(0) + builtin:billing.ddu.traces.byEntity:splitBy():sum:default(0)

```

---

<div class="post-metadata">

**Author:** ![LukeHearth](https://avatars.discourse-cdn.com/v4/letter/l/41988e/32.png) [@LukeHearth](https://community.dynatrace.com/u/LukeHearth)\
**Post date:** [January 2, 2024, 5:00pm UTC](https://community.dynatrace.com/t/precise-ddu-consumption-in-managed-environment/43359/4 "2024-01-02T17:00:23Z")

</div>

Hi [@AntonioSousa](https://community.dynatrace.com/user/17213)&nbsp;,

In addition to all of this i made use of a licensing extension developed by one of the extension team, it handled splitting liceninsg by managmentzone , and i used it with a client to split by tag (due to how granular the data was DDU by tag were a rough estimation).

This project did end a year ago so it may have changed a bit since i last used it.

It may be worth reaching out to the Extension Team to show you what it can do if you are interested.

Yours,

Luke Hearth
