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

DQL/DPL question/puzzle

henk_stobbe
DynaMight Leader
DynaMight Leader

Hello,

Last day of the year question/puzzle....

When showing tags from a host, an array is retuned.  

I want to extract the contents of a specific tag.

So my thought was to convert the array to a string, and use DPL to extract the value.

Am I on the correct track, or maybe there are better ways to achieve this?

For later, happy new year! 

2 REPLIES 2

Julius_Loman
DynaMight Legend
DynaMight Legend

@henk_stobbe yes, this is one of the solutions. you can also use a combination of expand / parse / filter - for example how get the dt.owner tag value:

fetch dt.entity.host
| fieldsAdd tags
| expand tags
| parse tags, """((LD:tag (!<<'\\' ':') LD:value)|LD:tag)"""
| fieldsAdd dt.owner = if(isNotNull(value), value)
| filter tag=="dt.owner"
| fieldsRemove value, tags, tag

 

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Hi Julius,

Best wishes! And thanks for your great answer,

KR Henk

Featured Posts