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

Using Metric Dimension values for Tagging Values (Key : Value)

pvr
Participant

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

5 REPLIES 5

mark_bley
Dynatrace Champion
Dynatrace Champion

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

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

mark_bley
Dynatrace Champion
Dynatrace Champion

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

patrik_steuer
Contributor

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}`

patrik_steuer_1-1696863774061.png

Therefore Dynatrace will allow you to create a tagging rule with the related value like this:

patrik_steuer_0-1696863692389.png
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. 

 

By the way, the reserved field for IP adresses is `dt.ip_addresses` and can be used the same.

Featured Posts