16 Oct 2023 11:45 AM - last edited on 16 Oct 2023 02:56 PM by Ana_Kuzmenchuk
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
Solved! Go to Solution.
16 Oct 2023 11:55 AM
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.
16 Oct 2023 02:23 PM
Hi @JAR1,
On the GUI it is not possible to create auto tag for disks:
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
Then I checked the specific disk as I did at the fisrt step. Here is the result.
If you want test it in the problem integration.
I hope it helps.
Best regards,
Mizső
16 Oct 2023 02:27 PM
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).