<?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: Get host entity filter by monitoring mode in Dynatrace API</title>
    <link>https://community.dynatrace.com/t5/Dynatrace-API/Get-host-entity-filter-by-monitoring-mode/m-p/170901#M1384</link>
    <description>&lt;P&gt;Hi Ryan,&lt;/P&gt;&lt;P&gt;Thanks for your reponse. Entity Attribute can't achieve this need ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=&amp;gt; The attribute name—attribute value pair that the requested entity should have.&lt;/P&gt;&lt;P&gt;To specify several attribute values, separate them with commas (,).&lt;/P&gt;&lt;P&gt;To fetch the list of available attributes, execute the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="View the details of a monitored entity type via Dynatrace API." href="https://www.dynatrace.com/support/help/dynatrace-api/environment-api/entity-v2/get-entity-type/" target="_blank" rel="noopener"&gt;GET entity type&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;call and check the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;properties&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;field. You can use attributes with values that can be represented by a string.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have monitoringMode in the properties list on the host so i thought it was possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again Ryan&lt;/P&gt;</description>
    <pubDate>Wed, 18 Aug 2021 07:23:59 GMT</pubDate>
    <dc:creator>Ousti</dc:creator>
    <dc:date>2021-08-18T07:23:59Z</dc:date>
    <item>
      <title>Get host entity filter by monitoring mode</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Get-host-entity-filter-by-monitoring-mode/m-p/170890#M1382</link>
      <description>&lt;P&gt;I'm calling v2 entities api for selectig hosts machines with infrastructure mode. I met a problem with the query syntax for attribute params in entitySelectorField.&lt;/P&gt;
&lt;P&gt;my Syntax is : &lt;STRONG&gt;entitySelector=type("HOST"),&amp;lt;monitoringMode&amp;gt;("INFRASTRUCTURE")&lt;/STRONG&gt; according to the documentation but it return a 400 response.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;
  &lt;SPAN&gt;"error"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;{&lt;/SPAN&gt;
    &lt;SPAN&gt;"code"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;400&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;
    &lt;SPAN&gt;"message"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"Constraints violated."&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;
    &lt;SPAN&gt;"constraintViolations"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;[&lt;/SPAN&gt;
      &lt;SPAN&gt;{&lt;/SPAN&gt;
        &lt;SPAN&gt;"path"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"entitySelector"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;
        &lt;SPAN&gt;"message"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"Unknown predicate name &amp;lt;monitoringMode&amp;gt;"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;
        &lt;SPAN&gt;"parameterLocation"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"QUERY"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;
        &lt;SPAN&gt;"location"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;null&lt;/SPAN&gt;
      &lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;
      &lt;SPAN&gt;{&lt;/SPAN&gt;
        &lt;SPAN&gt;"path"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"entitySelector"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;
        &lt;SPAN&gt;"message"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"Unknown predicate name &amp;lt;monitoringMode&amp;gt;"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;
        &lt;SPAN&gt;"parameterLocation"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"QUERY"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;
        &lt;SPAN&gt;"location"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;null&lt;/SPAN&gt;
      &lt;SPAN&gt;}&lt;/SPAN&gt;
    &lt;SPAN&gt;]&lt;/SPAN&gt;
  &lt;SPAN&gt;}&lt;/SPAN&gt;
&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 12:21:35 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Get-host-entity-filter-by-monitoring-mode/m-p/170890#M1382</guid>
      <dc:creator>Ousti</dc:creator>
      <dc:date>2021-11-19T12:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: Get host entity filter by monitoring mode</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Get-host-entity-filter-by-monitoring-mode/m-p/170896#M1383</link>
      <description>&lt;P&gt;&lt;STRONG&gt;EDIT:&amp;nbsp;&lt;/STRONG&gt;Deleted the first half of this response as I was incorrect. You are able to achieve this using monitoringMode("CLOUD_INFRA"). Leaving the second half of this response as it may still serve the purpose using a different API endpoint.&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;For what you are trying to achieve, might I suggest using the OneAgent on a Host API. You can create an API query such as this to pull a list of all hosts that are in Infrastructure monitoring mode:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; https://{environmentURL}/api/v1/oneagents?includeDetails=true&amp;amp;monitoringType=CLOUD_INFRASTRUCTURE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;More information on this API endpoint can be found here:&amp;nbsp;&lt;A href="https://www.dynatrace.com/support/help/shortlink/api-oneagent-on-host" target="_blank" rel="noopener"&gt;https://www.dynatrace.com/support/help/shortlink/api-oneagent-on-host&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Ryan&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 12:19:38 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Get-host-entity-filter-by-monitoring-mode/m-p/170896#M1383</guid>
      <dc:creator>ryan_ott</dc:creator>
      <dc:date>2021-08-18T12:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: Get host entity filter by monitoring mode</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Get-host-entity-filter-by-monitoring-mode/m-p/170901#M1384</link>
      <description>&lt;P&gt;Hi Ryan,&lt;/P&gt;&lt;P&gt;Thanks for your reponse. Entity Attribute can't achieve this need ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=&amp;gt; The attribute name—attribute value pair that the requested entity should have.&lt;/P&gt;&lt;P&gt;To specify several attribute values, separate them with commas (,).&lt;/P&gt;&lt;P&gt;To fetch the list of available attributes, execute the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="View the details of a monitored entity type via Dynatrace API." href="https://www.dynatrace.com/support/help/dynatrace-api/environment-api/entity-v2/get-entity-type/" target="_blank" rel="noopener"&gt;GET entity type&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;call and check the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;properties&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;field. You can use attributes with values that can be represented by a string.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have monitoringMode in the properties list on the host so i thought it was possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again Ryan&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 07:23:59 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Get-host-entity-filter-by-monitoring-mode/m-p/170901#M1384</guid>
      <dc:creator>Ousti</dc:creator>
      <dc:date>2021-08-18T07:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: Get host entity filter by monitoring mode</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Get-host-entity-filter-by-monitoring-mode/m-p/170904#M1385</link>
      <description>&lt;P&gt;Ryan,&lt;/P&gt;&lt;P&gt;type("HOST"),monitoringMode("CLOUD_INFRA") is OK.&lt;/P&gt;&lt;P&gt;The value of monitoringMode can't be CLOUD_INFRASTRUCTURE or INFRASTRUCTURE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 08:35:02 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Get-host-entity-filter-by-monitoring-mode/m-p/170904#M1385</guid>
      <dc:creator>Ousti</dc:creator>
      <dc:date>2021-08-18T08:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: Get host entity filter by monitoring mode</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Get-host-entity-filter-by-monitoring-mode/m-p/170911#M1387</link>
      <description>&lt;P&gt;You are correct - my apologies for the confusion. You learn something new every day&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp; I have edited my reply.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 12:20:47 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Get-host-entity-filter-by-monitoring-mode/m-p/170911#M1387</guid>
      <dc:creator>ryan_ott</dc:creator>
      <dc:date>2021-08-18T12:20:47Z</dc:date>
    </item>
  </channel>
</rss>

