# Correlating multiple disk entities within host entity using Metrics API

**URL:** <https://community.dynatrace.com/t/correlating-multiple-disk-entities-within-host-entity-using-metrics-api/22041>\
**Category:** Dynatrace API\
**Tags:** dynatrace-managed, hosts-classic, dynatrace-api\
**Created:** [September 24, 2019, 4:59am UTC](https://community.dynatrace.com/t/correlating-multiple-disk-entities-within-host-entity-using-metrics-api/22041 "2019-09-24T04:59:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![snikolic](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/snikolic/32/25006_2.png) [@snikolic](https://community.dynatrace.com/u/snikolic)\
**Post date:** [September 24, 2019, 4:59am UTC](https://community.dynatrace.com/t/correlating-multiple-disk-entities-within-host-entity-using-metrics-api/22041/1 "2019-09-24T04:59:31Z")

</div>

Hi,

I have a set of python scripts used for extract of timeseries metrics using Metrics API v2. Reason is to repetitively extract detailed statistics for long term capacity planning - to avoid the issue that eventually, when the data is needed for planning - dynatrace would have long summarised it in hourly or daily averages. Yep - capacity planners do like to have access to piles of data (different discussion).

Staying on topic… I am unable to figure out how to correlate multiple attached entities to host entity. For example in human readable form host is usually a hostName not entitiyId that looks like ‘HOST-XXXXXXXXX’. That host usually has multiple disks attached, each with its own metrics:

so:

```auto
HOST-1234567 (myhost.com): DISK-12345 (C:\), DISK-12346 (F:\)

```

I am unable to create the relationship that allows me to extract disk utilisation data for:

```auto
myhost.com/disk-c:
myhost.com/disk-f:

```

My process is to - find a host from the list of all host entities by matching hostName from the resulting list of hosts entities.

I can then use this entity to extract CPU/MEMORY time series data - that is fine

BUT, I can’t find the way of extracting DISK utilisation for a particular disk. Interestingly, the Metrics v2 API returns this:

```auto
"metrics": {
        "builtin:host.disk.used": {
            "series": [
                {
                    "dimensions": [
                        <strong>"HOST-9483C7D89472AF43"</strong>,
                        <strong>"DISK-51D7D5BE9D2A1FE2"</strong>
                    ],
                    "values": [
                        {
                            "timestamp": 1568095200000,
                            "value": 5.170616996598518E10
                        },
ETC...

```

I can’t, for the life of me, find what the “ **DISK-51D7D5BE9D2A1FE2** ” actually is - is it a C:\ or F:\ drive? There seem to be no way of correlating these or even finding out the ‘human readable’ description/name of the entity/device. The devices are not listed in the host entity detailed information.

Anyone can point me in the direction of how the configuration (host:disk[X] or host:cpu[x] or host:netinterface[X]) works? Docs? Tutorials? Any API architects? Any E-R diagrams of how the structure is supposed to look like? Any Dynatrace API libraries usable by python that allow something like ‘getDiskByHostName(host)’ lol ?

Thanks for reading this…

---

<div class="post-metadata">

**Author:** ![skrystosik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/skrystosik/32/21133_2.png) [@skrystosik](https://community.dynatrace.com/u/skrystosik)\
**Post date:** [September 24, 2019, 6:33am UTC](https://community.dynatrace.com/t/correlating-multiple-disk-entities-within-host-entity-using-metrics-api/22041/2 "2019-09-24T06:33:36Z")

</div>

For now the only way I’ve found is checking dynatrace page source on disk dashboard:

 ![21984-1569306778241.png](https://global.discourse-cdn.com/dynatrace/original/3X/a/7/a7ee62d5fcd6f1aa0e0689a2e1ffd001f643a55a.png)

debugid is what you need… You’re right I don’t see and API endpoint that is able to resolve it.

Sebastian

---

<div class="post-metadata">

**Author:** ![snikolic](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/snikolic/32/25006_2.png) [@snikolic](https://community.dynatrace.com/u/snikolic)\
**Post date:** [September 24, 2019, 11:04pm UTC](https://community.dynatrace.com/t/correlating-multiple-disk-entities-within-host-entity-using-metrics-api/22041/3 "2019-09-24T23:04:02Z")

</div>

Thanks [@sebastian k.](https://answers.dynatrace.com/users/15061/view.html), good point. It is a bit of a workaround, as I need to fish out the disk entity Id’s manually and add them to my configuration list, but solution is good enough for now, until the API matures.

---

<div class="post-metadata">

**Author:** ![skrystosik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/skrystosik/32/21133_2.png) [@skrystosik](https://community.dynatrace.com/u/skrystosik)\
**Post date:** [September 25, 2019, 7:56am UTC](https://community.dynatrace.com/t/correlating-multiple-disk-entities-within-host-entity-using-metrics-api/22041/4 "2019-09-25T07:56:33Z")

</div>

Happy to hear that I’ve helped 🙂

---

<div class="post-metadata">

**Author:** ![AlexandreFranca](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@AlexandreFranca](https://community.dynatrace.com/u/AlexandreFranca)\
**Post date:** [July 1, 2021, 8:37pm UTC](https://community.dynatrace.com/t/correlating-multiple-disk-entities-within-host-entity-using-metrics-api/22041/5 "2021-07-01T20:37:15Z")

</div>

Hey guys, any update on this since then? Nowadays are we able to retrieve the disk name using any API?
