# Assigning tag to disks

**URL:** <https://community.dynatrace.com/t/assigning-tag-to-disks/42093>\
**Category:** Alerting\
**Tags:** tagging, problems-classic\
**Created:** [October 16, 2023, 10:45am UTC](https://community.dynatrace.com/t/assigning-tag-to-disks/42093 "2023-10-16T10:45:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![JAR1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@JAR1](https://community.dynatrace.com/u/JAR1)\
**Post date:** [October 16, 2023, 10:45am UTC](https://community.dynatrace.com/t/assigning-tag-to-disks/42093/1 "2023-10-16T10:45:04Z")

</div>

Hello all,  
is there any way to tag the disks of a hosts (linux). My client needs to send a tag=\<value\> to an alert integration (serviceNow).  
The situation is:  
i_f disk is **/opt** then **tag1=value1** _  
_if disk is **/opt/wl** then **tag1=value2** _

any idea?&nbsp;has anyone encountered a similar situation?

Thanks

BR

JAR

---

<div class="post-metadata">

**Author:** ![radek\_jasinski](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radek_jasinski/32/10432_2.png) [@radek\_jasinski](https://community.dynatrace.com/u/radek_jasinski)\
**Post date:** [October 16, 2023, 10:55am UTC](https://community.dynatrace.com/t/assigning-tag-to-disks/42093/2 "2023-10-16T10:55:43Z")

</div>

You could try assigning a TAG using automatic tags and an Entity selector type rule.

> **[Environment API v2 - Entity selector](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/entity-v2/entity-selector)**
>
> Learn the Environment API v2 entity selector syntax for filtering monitored entities by type, name, tag, management zone, and health state.

Download the list of entities via the API and see what drives you have available:

> **[Monitored entities API - GET all entity types](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/entity-v2/get-all-entity-types)**
>
> View all types of monitored entities in your environment via Dynatrace API.

I’m not sure if you can assign a tag to a specific partition on a given host, but you have to try in the direction I described above.

---

<div class="post-metadata">

**Author:** ![mizso74](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mizso74/32/41729_2.png) [@mizso74](https://community.dynatrace.com/u/mizso74)\
**Post date:** [October 16, 2023, 1:23pm UTC](https://community.dynatrace.com/t/assigning-tag-to-disks/42093/3 "2023-10-16T13:23:22Z")

</div>

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

On the GUI it is not possible to create auto tag for disks:

 ![Mizs_0-1697461697849.png](https://global.discourse-cdn.com/dynatrace/original/2X/e/ea7f5dcda77b5db5f0b5bd1c87517586ec61f656.png)

I quikly tried the API possibilities.

As Radek suggested I used the first API entity selector for a specific disk (/tmp mount from a hsot). I could see that there was a tag [] section.

> **[Environment API v2 - Entity selector](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/entity-v2/entity-selector)**
>
> Learn the Environment API v2 entity selector syntax for filtering monitored entities by type, name, tag, management zone, and health state.

Then I used the Cutom tags API&nbsp;&nbsp;[Custom tags API - POST tags — Dynatrace Docs](https://www.dynatrace.com/support/help/dynatrace-api/environment-api/custom-tags/post-tags)

With this settings. All /tmp mounts (79 were found) were tagged with&nbsp;_ **tag1=value1** _

 ![Mizs_1-1697462244922.png](https://global.discourse-cdn.com/dynatrace/original/2X/d/d6a183d2e28022e002c9901f602f68733fd8c4cc.png)

Then I checked the specific disk as I did at the fisrt step. Here is the result.

 ![Mizs_2-1697462517518.png](https://global.discourse-cdn.com/dynatrace/original/3X/7/5/75f88c6fb29962342713a262574f55b0948fd746.png)

If you want test it in the problem integration.

I hope it helps.

Best regards,

Mizső

---

<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:** [October 16, 2023, 1:27pm UTC](https://community.dynatrace.com/t/assigning-tag-to-disks/42093/4 "2023-10-16T13:27:15Z")

</div>

[@JAR1](https://community.dynatrace.com/user/57153),

As [@Mizső](https://community.dynatrace.com/user/47783) said, through the API, it is quite easy. I have done this in a client, for differentiated disk alerting. Ans as [@radek\_jasinski](https://community.dynatrace.com/user/16832) has said, thorugh an entity selector, you should also be able to do it (have not tried myself).

---

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [February 11, 2025, 10:01am UTC](https://community.dynatrace.com/t/assigning-tag-to-disks/42093/5 "2025-02-11T10:01:01Z")

</div>

Hi,

Is Davis adding that custom tag to disk problem? I have just made a test but I cannot see disk tags in problem’s tags, only host tags.

Thank you!

Best regards

---

<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:** [February 11, 2025, 12:17pm UTC](https://community.dynatrace.com/t/assigning-tag-to-disks/42093/6 "2025-02-11T12:17:13Z")

</div>

[@AntonPineiro](https://community.dynatrace.com/user/58682),

Davis problems involving disks do not send info regarding disk tags, both v1 & v2.

There is an old Product Idea that unfortunately Dynatrace has said is not planned:

[https://community.dynatrace.com/t5/Product-ideas/Include-disk-entity-tags-in-resource-problem-alerts/idi-p/181749](https://community.dynatrace.com/post/181749)

In ITSM integrations that we do, we have to get the tags through the entities API.

---

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [February 11, 2025, 2:46pm UTC](https://community.dynatrace.com/t/assigning-tag-to-disks/42093/7 "2025-02-11T14:46:04Z")

</div>

Thank you!&nbsp;:money\_mouth\_face:
