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

Field with only a certain key:value tag using DQL

Himavanth_Reddy
Visitor

I want to get a field with only a certain key:value tag using DQL.
example: Host Name |  Host group name  | Datacentre:xyz
this Datacentre tag is already defined in my environment.
How to achieve it?

4 REPLIES 4

Kenny_Gillette
DynaMight Leader
DynaMight Leader

Here you go:

fetch dt.entity.host
| fieldsAdd tags, hostGroupName
| filter matchesValue(tags,"TagName")

Dynatrace Certified Professional

Slightly improved

fetch dt.entity.host
| fieldsAdd tags, hostGroupName
| expand tags
| filter contains(tags,"Datacentre")
| fields entity.name, hostGroupName, tags

 

Working. Thanks!

Kenny_Gillette
DynaMight Leader
DynaMight Leader

I found a great use case for this today!!!  love this

Dynatrace Certified Professional

Featured Posts