16 Nov 2022 04:00 PM - last edited on 24 Nov 2022 09:13 PM by Karolina_Linda
Hello,
Is it possible to use metric dimensions as tag values?
Eg. If we use extension 2.0 custom metrics, say Palo Alto devices, I want to be able to tag the custom devices i.e. entities of type (palo-alto:device) with their IP address. For normal devices / std. custom devices this has a placeholder like {CustomDevice:IpAddress}, which is not possible for Palo Alto.
However, this extn 2. for palo alto stores the Device IP address in this metric dimension :
"com.dynatrace.extension.palo-alto.generic.if.entity ": "device.address".
Is it possible to use this dimension as tag value? if so what syntax/way is to be used?
thanks in advance.
-Venkat
Solved! Go to Solution.
24 Nov 2022 06:27 PM
Hi @pvr ,
atm it is not possible to attach the value of a dimension to a generic type directly from the ingested log line. However you can extract the dimension value and add it as a metadata to the generic type like displayed in this example here
The attribute section is what you would be looking at
attributes:
- pattern: '{network.name}'
key: wmi_network_name
displayName: Name
- pattern: '{network.type}'
key: wmi_network_type
displayName: Type
25 Nov 2022 03:12 PM
Hi @mark_bley ,
I issue is the IP address is already being stored as property/metadata on the custom device as the above dimension and is being displayed. However, we want to tag using that value as it (tags) would be the visible thing in our alerts on these devices.
My question is specific to how we can use an existing property/dimension as a tag value .
thanks
Venkat
30 Nov 2022 04:25 PM
Hi @pvr ,
atm you can only achieve that via the entitySelector in the auto tagging rules and using static values which is not super scalable or dynamic.
What I can recommend is for now to automate the tagging of these properties to entities with e.g. a script, you can fetch from the entities API the necessary properties, and attach them to the entities through the custom tags api
09 Oct 2023 04:07 PM
Hi,
it seems that there is one possibility to overcome the experienced limitation. You can make use of the fact that each generic entity is a custom device. Custom devices have a list of properties which can be used as tag values, e.g. `{CustomDevice:DnsName}`
Therefore Dynatrace will allow you to create a tagging rule with the related value like this:
Dynatrace has a reserved key which can be used to provide the DNS Name property to your custom device. This reserved property is called `dt.dns_names`.
I hope this will help people facing the same problem ... I know that this will not solve all use cases where a tag based on a value is needed.
09 Oct 2023 04:09 PM
By the way, the reserved field for IP adresses is `dt.ip_addresses` and can be used the same.