<?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 disks with wasted space ? in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/DQL-for-disks-with-wasted-space/m-p/284384#M2484</link>
    <description>&lt;P&gt;try something like this...&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries t_disk=avg(dt.host.disk.used.percent), interval: 2h,by:{dt.entity.host, dt.entity.disk}
| fieldsAdd Server=entityName(dt.entity.host)
| fieldsAdd Disk=entityName(dt.entity.disk)
| fieldsAdd `Used_Disk_Space_(%)`=arrayAvg(t_disk)
| fieldsRemove timeframe,interval, dt.entity.host, t_disk

| join [
    timeseries disk.used_sum = avg(dt.host.disk.used), disk.avail_sum = avg(dt.host.disk.avail), by:{dt.entity.disk}
    | fieldsAdd total_disk = toLong((arrayAvg(disk.used_sum) + arrayAvg(disk.avail_sum)) / 1024 / 1024)
    | fieldsKeep total_disk, dt.entity.disk
  ], on:{dt.entity.disk}
| fieldsAdd `Total_Disk_(GB)`  = right.total_disk
| fieldsRemove right.dt.entity.disk, right.total_disk
| sort `Used_Disk_Space_(%)` desc
| limit 10&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 20 Aug 2025 16:21:07 GMT</pubDate>
    <dc:creator>jason_gs</dc:creator>
    <dc:date>2025-08-20T16:21:07Z</dc:date>
    <item>
      <title>DQL for disks with wasted space</title>
      <link>https://community.dynatrace.com/t5/DQL/DQL-for-disks-with-wasted-space/m-p/284310#M2483</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;could you help me with dql to generate a table with the following columns :&amp;nbsp; host, disk, disk total size and disk usage% (or disk available) order by disk total size desc, top n records .&lt;/P&gt;
&lt;P&gt;Thx!&lt;/P&gt;</description>
      <pubDate>Mon, 01 Sep 2025 09:59:15 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/DQL-for-disks-with-wasted-space/m-p/284310#M2483</guid>
      <dc:creator>LouisCypher</dc:creator>
      <dc:date>2025-09-01T09:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: DQL for disks with wasted space ?</title>
      <link>https://community.dynatrace.com/t5/DQL/DQL-for-disks-with-wasted-space/m-p/284384#M2484</link>
      <description>&lt;P&gt;try something like this...&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries t_disk=avg(dt.host.disk.used.percent), interval: 2h,by:{dt.entity.host, dt.entity.disk}
| fieldsAdd Server=entityName(dt.entity.host)
| fieldsAdd Disk=entityName(dt.entity.disk)
| fieldsAdd `Used_Disk_Space_(%)`=arrayAvg(t_disk)
| fieldsRemove timeframe,interval, dt.entity.host, t_disk

| join [
    timeseries disk.used_sum = avg(dt.host.disk.used), disk.avail_sum = avg(dt.host.disk.avail), by:{dt.entity.disk}
    | fieldsAdd total_disk = toLong((arrayAvg(disk.used_sum) + arrayAvg(disk.avail_sum)) / 1024 / 1024)
    | fieldsKeep total_disk, dt.entity.disk
  ], on:{dt.entity.disk}
| fieldsAdd `Total_Disk_(GB)`  = right.total_disk
| fieldsRemove right.dt.entity.disk, right.total_disk
| sort `Used_Disk_Space_(%)` desc
| limit 10&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 20 Aug 2025 16:21:07 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/DQL-for-disks-with-wasted-space/m-p/284384#M2484</guid>
      <dc:creator>jason_gs</dc:creator>
      <dc:date>2025-08-20T16:21:07Z</dc:date>
    </item>
  </channel>
</rss>

