<?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: How to use entitySelector() to query by host in Data Explorer? in Open Q&amp;A</title>
    <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-use-entitySelector-to-query-by-host-in-Data-Explorer/m-p/226592#M29203</link>
    <description>&lt;P&gt;That is correct, the split of the dimension is done by process group instance, and not by host. Because of this, you can't split by host on this metric, but you can filter by a specific host or set of hosts by using relationships in the entity selector. For example, in your case, it might look something like:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;builtin:billing.ddu.log.byEntity:filter(in("dt.entity.monitored_entity", entitySelector(type(PROCESS_GROUP_INSTANCE),fromRelationships.isProcessOf(type(HOST),entityId(&amp;lt;HOST-ID&amp;gt;)))))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Instead of&amp;nbsp;&lt;STRONG&gt;entityId&lt;/STRONG&gt; you can then use whatever entity selector filter you want in there for your host, as per &lt;A href="https://www.dynatrace.com/support/help/dynatrace-api/environment-api/entity-v2/entity-selector" target="_blank" rel="noopener"&gt;the documentation&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Wed, 25 Oct 2023 13:59:12 GMT</pubDate>
    <dc:creator>victor_balbuena</dc:creator>
    <dc:date>2023-10-25T13:59:12Z</dc:date>
    <item>
      <title>How to use entitySelector() to query by host in Data Explorer?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-use-entitySelector-to-query-by-host-in-Data-Explorer/m-p/226589#M29201</link>
      <description>&lt;P&gt;when I query in Data explorer:&lt;/P&gt;&lt;P&gt;1. I used "&lt;STRONG&gt;builtin:billing.ddu.log.byEntity&lt;/STRONG&gt;" query and returned 91 records:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="EvaWang_0-1698240750585.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/14920i9550177507DBF71E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="EvaWang_0-1698240750585.png" alt="EvaWang_0-1698240750585.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;then add filter in this query "&lt;STRONG&gt;builtin:billing.ddu.log.byEntity:filter(in("dt.entity.monitored_entity", entitySelector("type(~"HOST~")")))&lt;/STRONG&gt;" returned "No data" and no hint of syntax error:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="EvaWang_1-1698240767739.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/14921iE77239681406B3D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="EvaWang_1-1698240767739.png" alt="EvaWang_1-1698240767739.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; and the details exported using API, all the malricids written are "PROCESS_GROUP_INSTANCE-???":&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="EvaWang_2-1698240785891.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/14922i35E3DF9E3F82E423/image-size/medium?v=v2&amp;amp;px=400" role="button" title="EvaWang_2-1698240785891.png" alt="EvaWang_2-1698240785891.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;&amp;nbsp;May I ask&lt;/STRONG&gt; : is it because ddu.log metric cannot express the data by host? or am i using the wrong query? &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;If I can use "entitySelector" in Metric query, I could query many different entities such as : gateway, cloud instances, services, etc. So please help me.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 13:41:11 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-use-entitySelector-to-query-by-host-in-Data-Explorer/m-p/226589#M29201</guid>
      <dc:creator>EvaWang</dc:creator>
      <dc:date>2023-10-25T13:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to use entitySelector() to query by host in Data Explorer?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-use-entitySelector-to-query-by-host-in-Data-Explorer/m-p/226592#M29203</link>
      <description>&lt;P&gt;That is correct, the split of the dimension is done by process group instance, and not by host. Because of this, you can't split by host on this metric, but you can filter by a specific host or set of hosts by using relationships in the entity selector. For example, in your case, it might look something like:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;builtin:billing.ddu.log.byEntity:filter(in("dt.entity.monitored_entity", entitySelector(type(PROCESS_GROUP_INSTANCE),fromRelationships.isProcessOf(type(HOST),entityId(&amp;lt;HOST-ID&amp;gt;)))))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Instead of&amp;nbsp;&lt;STRONG&gt;entityId&lt;/STRONG&gt; you can then use whatever entity selector filter you want in there for your host, as per &lt;A href="https://www.dynatrace.com/support/help/dynatrace-api/environment-api/entity-v2/entity-selector" target="_blank" rel="noopener"&gt;the documentation&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 13:59:12 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-use-entitySelector-to-query-by-host-in-Data-Explorer/m-p/226592#M29203</guid>
      <dc:creator>victor_balbuena</dc:creator>
      <dc:date>2023-10-25T13:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to use entitySelector() to query by host in Data Explorer?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-use-entitySelector-to-query-by-host-in-Data-Explorer/m-p/226613#M29211</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;What happens if you add ":parents", something as "builtin:billing.ddu.log.byEntity&lt;STRONG&gt;:parents&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 17:01:33 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-use-entitySelector-to-query-by-host-in-Data-Explorer/m-p/226613#M29211</guid>
      <dc:creator>AntonPineiro</dc:creator>
      <dc:date>2023-10-25T17:01:33Z</dc:date>
    </item>
  </channel>
</rss>

