# Create a chart for Host Unit consumption

**URL:** <https://community.dynatrace.com/t/create-a-chart-for-host-unit-consumption/18843>\
**Category:** Dashboarding\
**Tags:** hosts-classic, dashboards-classic, licensing\
**Created:** [March 23, 2020, 10:16am UTC](https://community.dynatrace.com/t/create-a-chart-for-host-unit-consumption/18843 "2020-03-23T10:16:46Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![service\_apms](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@service\_apms](https://community.dynatrace.com/u/service_apms)\
**Post date:** [March 23, 2020, 10:16am UTC](https://community.dynatrace.com/t/create-a-chart-for-host-unit-consumption/18843/1 "2020-03-23T10:16:46Z")

</div>

Hello

is there a way to create a chart for HU consumption like the one we have on DEM units with the Billing section ?

If not do you have any suggestions ? how do you deal with this subject ?

Thank you

---

<div class="post-metadata">

**Author:** ![ugo\_abbuehl](https://avatars.discourse-cdn.com/v4/letter/u/ccd318/32.png) [@ugo\_abbuehl](https://community.dynatrace.com/u/ugo_abbuehl)\
**Post date:** [March 23, 2020, 11:01am UTC](https://community.dynatrace.com/t/create-a-chart-for-host-unit-consumption/18843/2 "2020-03-23T11:01:25Z")

</div>

Same need here also…

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [March 23, 2020, 12:46pm UTC](https://community.dynatrace.com/t/create-a-chart-for-host-unit-consumption/18843/3 "2020-03-23T12:46:10Z")

</div>

Hello everyone. This use to be possible via the UI and was quite easy, but now you will need to resort to the Environment API for this data to be pulled.

 ![24300-consumed-hu.jpg](https://global.discourse-cdn.com/dynatrace/original/3X/5/e/5e7a99f45be67bd352ca56f6195f0a75e6cf569d.jpeg)

If you are a SAS customer you can also Navigate to the Cluster page, just like in Managed, and see the overall consumption as well as per the environment. This will show as host unit hours or host units - depending on you contract.

 ![24312-host-units.jpg](https://global.discourse-cdn.com/dynatrace/original/3X/2/d/2d07610647c018a7889bd1b3bd6ce54d0151fc57.jpeg)

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [July 13, 2020, 6:02pm UTC](https://community.dynatrace.com/t/create-a-chart-for-host-unit-consumption/18843/4 "2020-07-13T18:02:41Z")

</div>

You can also use the following: [BizOpsConfigurator](https://dynatrace.github.io/BizOpsConfigurator/#HUreport)

 ![25721-1594663353027.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/4/e420ec1d067f9fb2365a3f2458ff7ccea0b96259.png)

---

<div class="post-metadata">

**Author:** ![dubois\_david](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dubois_david/32/28500_2.png) [@dubois\_david](https://community.dynatrace.com/u/dubois_david)\
**Post date:** [May 12, 2021, 6:38pm UTC](https://community.dynatrace.com/t/create-a-chart-for-host-unit-consumption/18843/5 "2021-05-12T18:38:38Z")

</div>

Is there a way to create this report in an automated manner so the data can be extracted and loaded to a visualization tool or Dynatrace itself?

---

<div class="post-metadata">

**Author:** ![adam\_gardner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/adam_gardner/32/20087_2.png) [@adam\_gardner](https://community.dynatrace.com/u/adam_gardner)\
**Post date:** [May 13, 2021, 12:41am UTC](https://community.dynatrace.com/t/create-a-chart-for-host-unit-consumption/18843/6 "2021-05-13T00:41:10Z")

</div>

Hi, the tool is first doing an API call to

```markup
https:// *******.live.dynatrace.com/api/v1/entity/infrastructure/hosts?includeDetails=true

```

Which returns a JSON doc with lots of fields but the one you care about is **consumedHostUnits** :

```markup
[{
  ...
  "consumedHostUnits": 0.25
  ...
}]

```

From there, the tool is performing this logic to [calculate the different figures](https://github.com/Dynatrace/BizOpsConfigurator/blob/a1fe50d7d511d26304d2777d23bb1df6498d9068/js/inputChangeHandlers.js#L567).

If you’d like Dynatrace to build this automated report for you, I’d advise speaking to your local Dynatrace Services team lead who will be able to assist.

---

<div class="post-metadata">

**Author:** ![Theodore\_x86](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/theodore_x86/32/17620_2.png) [@Theodore\_x86](https://community.dynatrace.com/u/Theodore_x86)\
**Post date:** [December 8, 2022, 10:10am UTC](https://community.dynatrace.com/t/create-a-chart-for-host-unit-consumption/18843/7 "2022-12-08T10:10:41Z")

</div>

Hello. Is this dashboard still available?

Thanks.

---

<div class="post-metadata">

**Author:** ![r\_weber](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/r_weber/32/24884_2.png) [@r\_weber](https://community.dynatrace.com/u/r_weber)\
**Post date:** [December 8, 2022, 1:35pm UTC](https://community.dynatrace.com/t/create-a-chart-for-host-unit-consumption/18843/8 "2022-12-08T13:35:57Z")

</div>

I’m using a custom extension “missing metrics” that calculates the HU consumption per host/hostgroup/tag and reports this back to dynatrace as a metric so we can put it on a dashboard:

 ![r_weber_0-1670506492012.png](https://global.discourse-cdn.com/dynatrace/original/2X/e/eefcfbb5379eebdc034f5e5573320ea03b8ad101.png)

The AG extension is rather simple, uses the API to get entities and reports back the overall HU consumption per “licensebucket” tag. If you’re interested I can share it.

---

<div class="post-metadata">

**Author:** ![Theodore\_x86](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/theodore_x86/32/17620_2.png) [@Theodore\_x86](https://community.dynatrace.com/u/Theodore_x86)\
**Post date:** [December 8, 2022, 1:47pm UTC](https://community.dynatrace.com/t/create-a-chart-for-host-unit-consumption/18843/9 "2022-12-08T13:47:07Z")

</div>

My primary scope is to calculate HU consumption per MZ. Please share it if we can filter consumption per MZ!

Thank you!

Thodoros

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [December 8, 2022, 4:45pm UTC](https://community.dynatrace.com/t/create-a-chart-for-host-unit-consumption/18843/10 "2022-12-08T16:45:23Z")

</div>

[@Theodore\_x86](https://community.dynatrace.com/user/50066)&nbsp; I have something similar to&nbsp;[@r\_weber](https://community.dynatrace.com/user/35901)’s solution (not having that as AG extension), you can get the script from here:

> **[GitHub - Alanata-a-s/Dynatrace-License-Reporting-Scripts: Dynatrace License Reporting Scripts](https://github.com/Alanata-a-s/Dynatrace-License-Reporting-Scripts)**
>
> Dynatrace License Reporting Scripts

It pushes back metric bound to the hosts, so you can easily then query the sum per MZ in Data Explorer and have that on a dashboard.

Also besides calculating it also can send event in case a host get disabled due to license exhaustion. (One event per host at the moment)

---

<div class="post-metadata">

**Author:** ![Yosi\_Neuman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/yosi_neuman/32/9845_2.png) [@Yosi\_Neuman](https://community.dynatrace.com/u/Yosi_Neuman)\
**Post date:** [December 15, 2022, 12:29pm UTC](https://community.dynatrace.com/t/create-a-chart-for-host-unit-consumption/18843/11 "2022-12-15T12:29:00Z")

</div>

Hi&nbsp;[@Julius\_Loman](https://community.dynatrace.com/user/3364)

This is great implementation!.

Downloaded the code, set 2 environment variables and run it.

With no time got&nbsp;invaluable information from the dashboard&nbsp;and problems that were created!

Thanks for sharing!

Yos

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [December 15, 2022, 12:39pm UTC](https://community.dynatrace.com/t/create-a-chart-for-host-unit-consumption/18843/12 "2022-12-15T12:39:45Z")

</div>

Thanks for the positive feedback!

---

<div class="post-metadata">

**Author:** ![dbednar](https://avatars.discourse-cdn.com/v4/letter/d/e274bd/32.png) [@dbednar](https://community.dynatrace.com/u/dbednar)\
**Post date:** [February 10, 2023, 4:46pm UTC](https://community.dynatrace.com/t/create-a-chart-for-host-unit-consumption/18843/13 "2023-02-10T16:46:11Z")

</div>

I’d like to get that if possible.

---

<div class="post-metadata">

**Author:** ![dneimke](https://avatars.discourse-cdn.com/v4/letter/d/f17d59/32.png) [@dneimke](https://community.dynatrace.com/u/dneimke)\
**Post date:** [August 15, 2023, 3:51am UTC](https://community.dynatrace.com/t/create-a-chart-for-host-unit-consumption/18843/14 "2023-08-15T03:51:51Z")

</div>

There needs to be an out-of-the box solution for the v2 API.

---

<div class="post-metadata">

**Author:** ![dreeseLP](https://avatars.discourse-cdn.com/v4/letter/d/c37758/32.png) [@dreeseLP](https://community.dynatrace.com/u/dreeseLP)\
**Post date:** [March 11, 2024, 3:00pm UTC](https://community.dynatrace.com/t/create-a-chart-for-host-unit-consumption/18843/15 "2024-03-11T15:00:36Z")

</div>

I Like this data.  
Can you please share for me :).  
Trying to get HU data from our environment.  
It looks like we need more and I trying to see how much more.  
Thank you.

---

<div class="post-metadata">

**Author:** ![NicolasTr](https://avatars.discourse-cdn.com/v4/letter/n/73ab20/32.png) [@NicolasTr](https://community.dynatrace.com/u/NicolasTr)\
**Post date:** [March 25, 2024, 8:52am UTC](https://community.dynatrace.com/t/create-a-chart-for-host-unit-consumption/18843/16 "2024-03-25T08:52:27Z")

</div>

Of course !

It looks API v1 are deprecated.

dt.entity.host on v2 doesn’t seems to get the information.

For the moment, as far as I know, there is no way to do it using notebooks or new dashboards with Grail 😕

That’s a missing part !

---

<div class="post-metadata">

**Author:** ![kenyu216](https://avatars.discourse-cdn.com/v4/letter/k/97f17d/32.png) [@kenyu216](https://community.dynatrace.com/u/kenyu216)\
**Post date:** [May 30, 2024, 7:51pm UTC](https://community.dynatrace.com/t/create-a-chart-for-host-unit-consumption/18843/17 "2024-05-30T19:51:37Z")

</div>

Hi&nbsp;  
Can you share with me the AG extension that you are using?  
Pls Slack me at [ken.yu@dynatrace.com](mailto:ken.yu@dynatrace.com)  
Thank you!

---

<div class="post-metadata">

**Author:** ![lawrence\_cuneaz](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/lawrence_cuneaz/32/1053_2.png) [@lawrence\_cuneaz](https://community.dynatrace.com/u/lawrence_cuneaz)\
**Post date:** [May 30, 2024, 9:03pm UTC](https://community.dynatrace.com/t/create-a-chart-for-host-unit-consumption/18843/18 "2024-05-30T21:03:25Z")

</div>

Hello r\_weber,

An ActiveGate extension that pulls Host Units into Dynatrace as a metric broken down by Host Group, tags or Management zones is awesome!

Would you be able to share a link to the Activegate extension that you created?

I know we are shifting into DPS licensing but I have a need to chart classic host unit licensing on a dashboard.

Appreciate it,

Lawrence
