<?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: DQL for dt.entity.id and dt.entity.name with dt.host.availability as a list in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Retrieve-Entity-IDs-Names-and-Hosts-Using-DQL-Queries/m-p/289781#M2789</link>
    <description>&lt;P&gt;Working with the Davis AI Notebook widget, we eventually got a result.&amp;nbsp; However it seems to be missing information, probably because data has been lost over time, all items collecting the information all have exactly the same values of 121 values of 1, which averages to 1.&amp;nbsp; &amp;nbsp;All other hosts seem to have null for those values, or its all 1s.&amp;nbsp; So, I doubt this data.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;fetch dt.entity.host
| fieldsAdd lifetime, id, entity.name
| lookup [timeseries by:{dt.entity.host}, avg_availability = avg(dt.host.availability)], sourceField:id, lookupField:dt.entity.host, fields:{avg_availability}
| filter NOT isNull(avg_availability)
| fieldsAdd arrayAvg(avg_availability)
| sort entity.name&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Nov 2025 19:57:19 GMT</pubDate>
    <dc:creator>dwclogic</dc:creator>
    <dc:date>2025-11-18T19:57:19Z</dc:date>
    <item>
      <title>Retrieve Entity IDs, Names, and Hosts Using DQL Queries</title>
      <link>https://community.dynatrace.com/t5/DQL/Retrieve-Entity-IDs-Names-and-Hosts-Using-DQL-Queries/m-p/289777#M2787</link>
      <description>&lt;P&gt;I really thought this would be a breeze, but it's proving to be a Very difficult list to generate.&amp;nbsp; I was hoping to use in a Notebook or Dashboard&lt;/P&gt;</description>
      <pubDate>Wed, 17 Dec 2025 12:22:40 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Retrieve-Entity-IDs-Names-and-Hosts-Using-DQL-Queries/m-p/289777#M2787</guid>
      <dc:creator>dwclogic</dc:creator>
      <dc:date>2025-12-17T12:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: DQL for dt.entity.id and dt.entity.name with dt.host.availability as a list</title>
      <link>https://community.dynatrace.com/t5/DQL/Retrieve-Entity-IDs-Names-and-Hosts-Using-DQL-Queries/m-p/289781#M2789</link>
      <description>&lt;P&gt;Working with the Davis AI Notebook widget, we eventually got a result.&amp;nbsp; However it seems to be missing information, probably because data has been lost over time, all items collecting the information all have exactly the same values of 121 values of 1, which averages to 1.&amp;nbsp; &amp;nbsp;All other hosts seem to have null for those values, or its all 1s.&amp;nbsp; So, I doubt this data.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;fetch dt.entity.host
| fieldsAdd lifetime, id, entity.name
| lookup [timeseries by:{dt.entity.host}, avg_availability = avg(dt.host.availability)], sourceField:id, lookupField:dt.entity.host, fields:{avg_availability}
| filter NOT isNull(avg_availability)
| fieldsAdd arrayAvg(avg_availability)
| sort entity.name&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Nov 2025 19:57:19 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Retrieve-Entity-IDs-Names-and-Hosts-Using-DQL-Queries/m-p/289781#M2789</guid>
      <dc:creator>dwclogic</dc:creator>
      <dc:date>2025-11-18T19:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: DQL for dt.entity.id and dt.entity.name with dt.host.availability as a list</title>
      <link>https://community.dynatrace.com/t5/DQL/Retrieve-Entity-IDs-Names-and-Hosts-Using-DQL-Queries/m-p/289791#M2791</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/69275"&gt;@dwclogic&lt;/a&gt;&amp;nbsp;Here is what the host states actually mean&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.dynatrace.com/docs/shortlink/host-availability#states" target="_blank"&gt;https://docs.dynatrace.com/docs/shortlink/host-availability#states&lt;/A&gt;&lt;/P&gt;&lt;P&gt;To make things simple and if you want to know percentage of time the host has been available instead of reporting on individual states , you can use a query like below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries m1=max(dt.host.availability, rollup: sum),
filter:availability.state == "up" , by:{availability.state, dt.entity.host}
| parse replaceString(toString(m1),"null","0"), """'['ARRAY{ DOUBLE:i ', '}{1,10000}:m1Pop"""
| fieldsAdd intervalToMinutes = toLong(interval)/60000000000
| fieldsAdd normalizedM1 = if(m1Pop[]&amp;gt;intervalToMinutes, intervalToMinutes, else: m1Pop[])
| fieldsAdd availability= toDouble(arraySum(normalizedM1)/(arraySize(normalizedM1))*100)/intervalToMinutes
| fieldsAdd dt.entity.host.name = entityName(dt.entity.host)
| fieldsKeep availability,dt.entity.host,dt.entity.host.name, availability.state&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 18 Nov 2025 23:05:49 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Retrieve-Entity-IDs-Names-and-Hosts-Using-DQL-Queries/m-p/289791#M2791</guid>
      <dc:creator>p_devulapalli</dc:creator>
      <dc:date>2025-11-18T23:05:49Z</dc:date>
    </item>
  </channel>
</rss>

