<?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: Returns Entity Name | Events in Open Q&amp;A</title>
    <link>https://community.dynatrace.com/t5/Open-Q-A/Extract-the-name-of-the-entities-impacted-or-related-to-the/m-p/234278#M30498</link>
    <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/66060"&gt;@Pawel_Zalewski&lt;/a&gt;&amp;nbsp;Thanks for the answer. Should this DQL also work for CUSTOM_DEVICE? It's the only one that I can't extract the name from.&lt;/P&gt;</description>
    <pubDate>Sun, 14 Jan 2024 16:03:30 GMT</pubDate>
    <dc:creator>RPbiaggio</dc:creator>
    <dc:date>2024-01-14T16:03:30Z</dc:date>
    <item>
      <title>Extract the name of the entities impacted or related to the event</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Extract-the-name-of-the-entities-impacted-or-related-to-the/m-p/234272#M30494</link>
      <description>&lt;P&gt;Guys, is it possible to extract the name of the entities impacted or related to the event?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;fetch events, from:now()-6h 
  | filter dt.system.bucket == "default_davis_events" 
  | filter event.kind == "DAVIS_PROBLEM" 
  | summarize {problem = takeMax(record(timestamp, event.id, event.start, event.status, entity_tags,affected_entity_types,affected_entity.id,affected_entity.name) )},
    by:{{display_id,alias:Problem}, {event.start, alias:Inicio},{event.name, alias:Titulo},maintenance.is_under_maintenance, affected_entity.id, affected_entity.name} 
  | fieldsFlatten problem 
  | expand environment = problem.entity_tags 
  | fieldsAdd environment = (environment=="env:PRD")
  | expand entidade.afetada = problem.affected_entity_types 
  | fieldsAdd entidade.afetada = in(entidade.afetada,
      {
        "dt.entity.host", 
        "dt.entity.hypervisor", 
        "dt_entity.cloud_application", 
        "dt.entity.kubernetes_cluster",
        "dt.entity.kubernetes_node",
        "dt.entity.process_group_instance",
        "dt.entity.cloud_application_namespace",
        "dt.entity.custom_device"
        
      })
  | filter environment == true and maintenance.is_under_maintenance == false
  | filter problem.event.status == "ACTIVE" and entidade.afetada == true &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I pass the field, it returns null.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RPbiaggio_1-1705167790460.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/16812i88944E5EE8226457/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RPbiaggio_1-1705167790460.png" alt="RPbiaggio_1-1705167790460.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 15:33:58 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Extract-the-name-of-the-entities-impacted-or-related-to-the/m-p/234272#M30494</guid>
      <dc:creator>RPbiaggio</dc:creator>
      <dc:date>2024-03-06T15:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: Returns Entity Name | Events</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Extract-the-name-of-the-entities-impacted-or-related-to-the/m-p/234274#M30496</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;So I would change&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;affected_entity.id&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;affected_entity_ids&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;And about entityName please look on this thread&amp;nbsp;&lt;A href="https://community.dynatrace.com/t5/DQL/Get-Host-Name-in-Open-Events/m-p/230190" target="_blank" rel="noopener"&gt;https://community.dynatrace.com/t5/DQL/Get-Host-Name-in-Open-Events/m-p/230190&lt;/A&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;Mr.&amp;nbsp;&lt;SPAN class=""&gt;sinisa_zubic&amp;nbsp;explain there "&lt;SPAN&gt;Since affected_entity_ids are stored in an array, we have to expand&lt;/SPAN&gt;&lt;SPAN&gt; it and find to every affected entity ID the entity name.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;"&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jan 2024 10:00:30 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Extract-the-name-of-the-entities-impacted-or-related-to-the/m-p/234274#M30496</guid>
      <dc:creator>Pawel_Zalewski</dc:creator>
      <dc:date>2024-01-14T10:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Returns Entity Name | Events</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Extract-the-name-of-the-entities-impacted-or-related-to-the/m-p/234278#M30498</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/66060"&gt;@Pawel_Zalewski&lt;/a&gt;&amp;nbsp;Thanks for the answer. Should this DQL also work for CUSTOM_DEVICE? It's the only one that I can't extract the name from.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jan 2024 16:03:30 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Extract-the-name-of-the-entities-impacted-or-related-to-the/m-p/234278#M30498</guid>
      <dc:creator>RPbiaggio</dc:creator>
      <dc:date>2024-01-14T16:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: Returns Entity Name | Events</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Extract-the-name-of-the-entities-impacted-or-related-to-the/m-p/234286#M30503</link>
      <description>&lt;P&gt;I think its depends on what variables your script send to Dynatrace and you need to capture them somehow via DQL but overall it's shouldn't. But I'm not really sure about that.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jan 2024 20:36:33 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Extract-the-name-of-the-entities-impacted-or-related-to-the/m-p/234286#M30503</guid>
      <dc:creator>Pawel_Zalewski</dc:creator>
      <dc:date>2024-01-14T20:36:33Z</dc:date>
    </item>
  </channel>
</rss>

