cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Assigning tag to disks

JAR1
Guide

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:
if disk is /opt then tag1=value1
if disk is /opt/wl then tag1=value2

 

any idea? has anyone encountered a similar situation?

Thanks 

BR

JAR

6 REPLIES 6

radek_jasinski
DynaMight Guru
DynaMight Guru

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

https://www.dynatrace.com/support/help/dynatrace-api/environment-api/entity-v2/entity-selector

Download the list of entities via the API and see what drives you have available:
https://www.dynatrace.com/support/help/dynatrace-api/environment-api/entity-v2/get-all-entity-types

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.

Have a nice day!

Mizső
DynaMight Guru
DynaMight Guru

Hi @JAR1,

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

Mizs_0-1697461697849.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.

https://www.dynatrace.com/support/help/dynatrace-api/environment-api/entity-v2/entity-selector

Then I used the Cutom tags API  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 tag1=value1

Mizs_1-1697462244922.png

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

Mizs_2-1697462517518.png

If you want test it in the problem integration.

I hope it helps.

Best regards,

Mizső

Dynatrace Community RockStar 2024, Certified Dynatrace Professional

AntonioSousa
DynaMight Guru
DynaMight Guru

@JAR1,

As @Mizső said, through the API, it is quite easy. I have done this in a client, for differentiated disk alerting. Ans as @radek_jasinski has said, thorugh an entity selector, you should also be able to do it (have not tried myself).

Antonio Sousa

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

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

@AntonPineiro,

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...

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

Antonio Sousa

Thank you! :take_my_money:

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

Featured Posts