# How to change default CUSTOM\_DEVICE chart legend from ID to NAME?

**URL:** <https://community.dynatrace.com/t/how-to-change-default-custom-device-chart-legend-from-id-to-name/36267>\
**Category:** Extensions\
**Tags:** dynatrace-managed, extensions\
**Created:** [August 18, 2022, 1:57am UTC](https://community.dynatrace.com/t/how-to-change-default-custom-device-chart-legend-from-id-to-name/36267 "2022-08-18T01:57:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ardhi](https://avatars.discourse-cdn.com/v4/letter/a/e99b99/32.png) [@Ardhi](https://community.dynatrace.com/u/Ardhi)\
**Post date:** [August 18, 2022, 1:57am UTC](https://community.dynatrace.com/t/how-to-change-default-custom-device-chart-legend-from-id-to-name/36267/1 "2022-08-18T01:57:23Z")

</div>

Hi,

We created a custom extension plugin to retrieve stats from Nutanix, but when it’s SPLIT by CUSTOM\_DEVICE it’s still showing UUID instead of a more meaningful name like HOST\_NAME (they can be grabbed from the Nutanix API).

 ![Screen Shot 2022-08-17 at 13.59.png](https://global.discourse-cdn.com/dynatrace/original/3X/2/1/217ef92abff689818d5ba6b8f4de30ae8fa0f949.png)

relevant code: (plugin.json)

 ![Screen Shot 2022-08-18 at 08.50.31.png](https://global.discourse-cdn.com/dynatrace/original/2X/5/5de5fc8d9c58573a12096885b17ea8d41c2e5622.png)

Is there configuration to grab the host\_name from the metrics in the plugin.json, or maybe from the metric’s metadata as below?

 ![Screen Shot 2022-08-17 at 23.44.03.png](https://global.discourse-cdn.com/dynatrace/original/2X/f/f11f51d545f3107a5edefd7abeeca558c9cee549.png)

---

<div class="post-metadata">

**Author:** ![mark\_bley](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mark_bley/32/20954_2.png) [@mark\_bley](https://community.dynatrace.com/u/mark_bley)\
**Post date:** [September 9, 2022, 2:52pm UTC](https://community.dynatrace.com/t/how-to-change-default-custom-device-chart-legend-from-id-to-name/36267/2 "2022-09-09T14:52:53Z")

</div>

Hi&nbsp;[@Ardhi](https://community.dynatrace.com/user/51035)

if I understand this correctly, your ActiveGate extension is pulling the metrics from the Nutanix API and then feeding these into Dynatrace. This means you also handle how the data is sent to Dynatrace, so you will need to also specify the necessary dimension for which host(s) you are sending the data.

This means in your metrics list you will need to define something like this:

```markup
{
      "entity": "CUSTOM_DEVICE",
      "timeseries": {
        "key": "disk_size",
        "unit": "Count",
        "displayname": "Disk size",
        "dimensions": [
          "host_name"
        ]
      }
    },

```

and whenever pushing a metric point you will need to pass the necessary dimension with that metric e.g.:

```markup
device.absolute(key="disk_size", value=123, dimensions={"host_name":"my_host_name"})

```

Otherwise splitting by “Custom Device” will lead to split the metrics by Instance of said Extension (these are the ones created by your extension)

Hope this helps,

Best,

Mark
