Open Q&A
If there's no good subforum for your question - ask it here!
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Defining Segments based on Tags

makrem_bargaoui
Visitor

Hello Team 

Im trying to define a segment in order to group all entities based on the tagName called app

the app tagname includes the application name,  please see screenshot below

Screenshot 2026-03-02 at 15.18.41.png

 

as you can see when I click on preview the result is always 0, 

 

is there anyway we can achieve that ? or this should be done in different way ?

 

bestregards,

Makrem

1 REPLY 1

firmanprasetyo
Dynatrace Advocate
Dynatrace Advocate

Hi Makrem,

1. For Classic Entities

For classic entities, you can use the following approach to extract and filter tags:

Variable:

fetch dt.entity.host
| expand tags
| fields tags
| dedup tags 

Filter:

tags = "$tags" 

firmanprasetyo_0-1776246139340.png

 

2. For Grail-based Data (Logs, Metrics, and Events)

When tags are applied directly to a server (e.g., using oneagentctl), they appear on the entity in the format [Environment]Owner:<Value>.

In Grail-based data, this tag is automatically ingested as a dedicated attribute named "Owner". This allows you to apply a direct filter within your segment as follows:

Owner = "$owner"

firmanprasetyo_2-1776249376420.png

 

Note:

Please note that the two methods above do not work properly for Grail-based entities. This is because Grail-based entities have a different data structure for tag values compared to classic entities and record-level data (logs/metrics).

I'm still figuring out how to apply the segment using tags to grail-based entities.

 

Regards,

Firman

Featured Posts