<?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 Filtering events by Management Zone, Gen3 Dynatrace Dashboard. in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Filtering-events-by-Management-Zone-Gen3-Dynatrace-Dashboard/m-p/260900#M1374</link>
    <description>&lt;P&gt;Hello, Dynatrace Community!&lt;/P&gt;
&lt;P&gt;I’m working with Gen3 DQL and trying to filter events based on a specific management zone, specifically for the “xxxx” management zone. I attempted the query in Gen3, and I’m attaching a screenshot of my code for reference.&lt;/P&gt;
&lt;P&gt;However, I’ve noticed a discrepancy: when I apply the management zone filter in the older DQL version, the results differ from what I’m getting in Gen3 DQL. This leads to the following questions:&lt;/P&gt;
&lt;P&gt;1. What is the correct DQL syntax for Gen3 dashboards to properly filter by management zone?&lt;BR /&gt;2. How should I modify my query to ensure that only events associated with the “xxx” management zone are displayed?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;fetch events
| filter event.kind == "DAVIS_PROBLEM"
| sort timestamp desc
| lookup [ 
      fetch dt.entity.host
      | expand managementZones
    ], sourceField:effected_entity_ids, lookupField:id, prefix:"mzone."
| summarize {status = takeFirst(event.status),
            event.name = takeFirst(event.name),
            severityLevel = takeFirst(event.category),
            managmentzone = takeFirst(affected_entities.management_zones.names
          ),
            affected = takeFirst(affected_entity_ids)},
            by:{display_id}
| fieldsAdd Status = if((status == "ACTIVE")," OPEN",
                  else:if((status == "CLOSED"),"🟢 CLOSED"))

| fields Status, display_id, event.name,affected, severityLevel, managmentzone&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your help!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ahmed alrahbi &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Oct 2024 07:25:22 GMT</pubDate>
    <dc:creator>Ahmedrahbi</dc:creator>
    <dc:date>2024-10-29T07:25:22Z</dc:date>
    <item>
      <title>Filtering events by Management Zone, Gen3 Dynatrace Dashboard.</title>
      <link>https://community.dynatrace.com/t5/DQL/Filtering-events-by-Management-Zone-Gen3-Dynatrace-Dashboard/m-p/260900#M1374</link>
      <description>&lt;P&gt;Hello, Dynatrace Community!&lt;/P&gt;
&lt;P&gt;I’m working with Gen3 DQL and trying to filter events based on a specific management zone, specifically for the “xxxx” management zone. I attempted the query in Gen3, and I’m attaching a screenshot of my code for reference.&lt;/P&gt;
&lt;P&gt;However, I’ve noticed a discrepancy: when I apply the management zone filter in the older DQL version, the results differ from what I’m getting in Gen3 DQL. This leads to the following questions:&lt;/P&gt;
&lt;P&gt;1. What is the correct DQL syntax for Gen3 dashboards to properly filter by management zone?&lt;BR /&gt;2. How should I modify my query to ensure that only events associated with the “xxx” management zone are displayed?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;fetch events
| filter event.kind == "DAVIS_PROBLEM"
| sort timestamp desc
| lookup [ 
      fetch dt.entity.host
      | expand managementZones
    ], sourceField:effected_entity_ids, lookupField:id, prefix:"mzone."
| summarize {status = takeFirst(event.status),
            event.name = takeFirst(event.name),
            severityLevel = takeFirst(event.category),
            managmentzone = takeFirst(affected_entities.management_zones.names
          ),
            affected = takeFirst(affected_entity_ids)},
            by:{display_id}
| fieldsAdd Status = if((status == "ACTIVE")," OPEN",
                  else:if((status == "CLOSED"),"🟢 CLOSED"))

| fields Status, display_id, event.name,affected, severityLevel, managmentzone&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your help!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ahmed alrahbi &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 07:25:22 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Filtering-events-by-Management-Zone-Gen3-Dynatrace-Dashboard/m-p/260900#M1374</guid>
      <dc:creator>Ahmedrahbi</dc:creator>
      <dc:date>2024-10-29T07:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering events by Management Zone, Gen3 Dynatrace Dashboard.</title>
      <link>https://community.dynatrace.com/t5/DQL/Filtering-events-by-Management-Zone-Gen3-Dynatrace-Dashboard/m-p/267390#M1607</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/77760"&gt;@Ahmedrahbi&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Could you check out this reply in another thread from&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/38283"&gt;@sinisa_zubic&lt;/a&gt;?&lt;BR /&gt;&lt;A href="https://community.dynatrace.com/t5/DQL/Fetch-active-problems/m-p/236288#M614" target="_self"&gt;Fetch active problems&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;You'll find the answer there on how to fetch and filter out events in the query, which may help with your use case&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2025 13:09:29 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Filtering-events-by-Management-Zone-Gen3-Dynatrace-Dashboard/m-p/267390#M1607</guid>
      <dc:creator>MaciejNeumann</dc:creator>
      <dc:date>2025-01-14T13:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering events by Management Zone, Gen3 Dynatrace Dashboard.</title>
      <link>https://community.dynatrace.com/t5/DQL/Filtering-events-by-Management-Zone-Gen3-Dynatrace-Dashboard/m-p/267401#M1609</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/77760"&gt;@Ahmedrahbi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To filter data in Dashboards you should use &lt;A href="https://docs.dynatrace.com/docs/manage/segments" target="_self"&gt;segments&lt;/A&gt;&amp;nbsp;. Please not that the feature is currently "In Preview" and there might be still changes happening to the feature.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;BR /&gt;Sini&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2025 14:00:30 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Filtering-events-by-Management-Zone-Gen3-Dynatrace-Dashboard/m-p/267401#M1609</guid>
      <dc:creator>sinisa_zubic</dc:creator>
      <dc:date>2025-01-14T14:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering events by Management Zone, Gen3 Dynatrace Dashboard.</title>
      <link>https://community.dynatrace.com/t5/DQL/Filtering-events-by-Management-Zone-Gen3-Dynatrace-Dashboard/m-p/269809#M1696</link>
      <description>&lt;P&gt;But how do you filter events by management zone? I can't find that documented anywhere and I see a lot of folks with the question.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2025 23:12:47 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Filtering-events-by-Management-Zone-Gen3-Dynatrace-Dashboard/m-p/269809#M1696</guid>
      <dc:creator>nathan_tennant</dc:creator>
      <dc:date>2025-02-11T23:12:47Z</dc:date>
    </item>
  </channel>
</rss>

