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

Get value from key value pair

OustiDiousti
Dynatrace Enthusiast
Dynatrace Enthusiast

Hi team, want to have the result CS-MONITORING, how
fetch dt.entity.host
| expand tags
| filter contains(tags, "invoiced_team")
| summarize str_tags = collectDistinct(tags)

OustiDiousti_0-1695998820075.png

 

1 REPLY 1

sinisa_zubic
Dynatrace Champion
Dynatrace Champion

Hi @OustiDiousti 

Please check out our documentation about how to query entities in Grail: https://www.dynatrace.com/support/help/platform/grail/querying-monitored-entities#entity-tags

Basically you need to expand the array of tags and parse it

 

fetch dt.entity.host
| expand tag_string=tags
| filter contains(tag_string,"invoiced_team")
| parse tag_string, """(('['LD:tag_context ']' LD:tag_key (!<<'\\' ':') LD:tag_value)| (LD:tag_key (!<<'\\' ':') LD:tag_value)|LD:tag_key)"""

Best,
Sini

Featured Posts