<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Defining Segments based on Tags in Open Q&amp;A</title>
    <link>https://community.dynatrace.com/t5/Open-Q-A/Defining-Segments-based-on-Tags/m-p/297741#M38902</link>
    <description>&lt;P&gt;Hi Makrem,&lt;/P&gt;&lt;P&gt;1. &lt;STRONG&gt;For Classic Entities&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;For classic entities, you can use the following approach to extract and filter tags:&lt;/P&gt;&lt;P&gt;Variable:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch dt.entity.host
| expand tags
| fields tags
| dedup tags &lt;/LI-CODE&gt;&lt;P&gt;Filter:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;tags = "$tags" &lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="firmanprasetyo_0-1776246139340.png" style="width: 453px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/32733i5609762DA89AA2F7/image-dimensions/453x143?v=v2" width="453" height="143" role="button" title="firmanprasetyo_0-1776246139340.png" alt="firmanprasetyo_0-1776246139340.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;&lt;STRONG&gt;For Grail-based Data (Logs, Metrics, and Events)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;When tags are applied directly to a server (e.g., using oneagentctl), they appear on the entity in the format [Environment]Owner:&amp;lt;Value&amp;gt;.&lt;/P&gt;&lt;P&gt;In Grail-based data, this tag is automatically ingested as a dedicated attribute named &lt;STRONG&gt;"Owner"&lt;/STRONG&gt;. This allows you to apply a direct filter within your segment as follows:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Owner = "$owner"&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="firmanprasetyo_2-1776249376420.png" style="width: 505px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/32736iBCE7DC64E90AF62E/image-dimensions/505x148?v=v2" width="505" height="148" role="button" title="firmanprasetyo_2-1776249376420.png" alt="firmanprasetyo_2-1776249376420.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note:&lt;/P&gt;&lt;P&gt;Please note that the two methods above do not work properly for &lt;STRONG&gt;Grail-based entities&lt;/STRONG&gt;. This is because Grail-based entities have a different data structure for tag values compared to classic entities and record-level data (logs/metrics).&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm still figuring out how to apply the segment using tags to grail-based entities.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Firman&lt;/P&gt;</description>
    <pubDate>Wed, 15 Apr 2026 10:38:24 GMT</pubDate>
    <dc:creator>firmanprasetyo</dc:creator>
    <dc:date>2026-04-15T10:38:24Z</dc:date>
    <item>
      <title>Defining Segments based on Tags</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Defining-Segments-based-on-Tags/m-p/295492#M38711</link>
      <description>&lt;P&gt;Hello Team&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im trying to define a segment in order to group all entities based on the tagName called app&lt;/P&gt;&lt;P&gt;the app tagname includes the application name,  please see screenshot below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2026-03-02 at 15.18.41.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/32175iA09E8197379D3A1B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2026-03-02 at 15.18.41.png" alt="Screenshot 2026-03-02 at 15.18.41.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;as you can see when I click on preview the result is always 0,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is there anyway we can achieve that ? or this should be done in different way ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;bestregards,&lt;/P&gt;&lt;P&gt;Makrem&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2026 14:20:51 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Defining-Segments-based-on-Tags/m-p/295492#M38711</guid>
      <dc:creator>makrem_bargaoui</dc:creator>
      <dc:date>2026-03-02T14:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: Defining Segments based on Tags</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Defining-Segments-based-on-Tags/m-p/297741#M38902</link>
      <description>&lt;P&gt;Hi Makrem,&lt;/P&gt;&lt;P&gt;1. &lt;STRONG&gt;For Classic Entities&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;For classic entities, you can use the following approach to extract and filter tags:&lt;/P&gt;&lt;P&gt;Variable:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch dt.entity.host
| expand tags
| fields tags
| dedup tags &lt;/LI-CODE&gt;&lt;P&gt;Filter:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;tags = "$tags" &lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="firmanprasetyo_0-1776246139340.png" style="width: 453px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/32733i5609762DA89AA2F7/image-dimensions/453x143?v=v2" width="453" height="143" role="button" title="firmanprasetyo_0-1776246139340.png" alt="firmanprasetyo_0-1776246139340.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;&lt;STRONG&gt;For Grail-based Data (Logs, Metrics, and Events)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;When tags are applied directly to a server (e.g., using oneagentctl), they appear on the entity in the format [Environment]Owner:&amp;lt;Value&amp;gt;.&lt;/P&gt;&lt;P&gt;In Grail-based data, this tag is automatically ingested as a dedicated attribute named &lt;STRONG&gt;"Owner"&lt;/STRONG&gt;. This allows you to apply a direct filter within your segment as follows:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Owner = "$owner"&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="firmanprasetyo_2-1776249376420.png" style="width: 505px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/32736iBCE7DC64E90AF62E/image-dimensions/505x148?v=v2" width="505" height="148" role="button" title="firmanprasetyo_2-1776249376420.png" alt="firmanprasetyo_2-1776249376420.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note:&lt;/P&gt;&lt;P&gt;Please note that the two methods above do not work properly for &lt;STRONG&gt;Grail-based entities&lt;/STRONG&gt;. This is because Grail-based entities have a different data structure for tag values compared to classic entities and record-level data (logs/metrics).&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm still figuring out how to apply the segment using tags to grail-based entities.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Firman&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2026 10:38:24 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Defining-Segments-based-on-Tags/m-p/297741#M38902</guid>
      <dc:creator>firmanprasetyo</dc:creator>
      <dc:date>2026-04-15T10:38:24Z</dc:date>
    </item>
  </channel>
</rss>

