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?
Here you go:
fetch dt.entity.host
| fieldsAdd tags, hostGroupName
| filter matchesValue(tags,“TagName”)
Slightly improved
fetch dt.entity.host
| fieldsAdd tags, hostGroupName
| expand tags
| filter contains(tags,"Datacentre")
| fields entity.name, hostGroupName, tags
Working. Thanks!
I found a great use case for this today!!! love this