<?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 Alert on low disk space by using both disk space % and disk space bytes in Alerting</title>
    <link>https://community.dynatrace.com/t5/Alerting/Alert-on-low-disk-space-by-using-both-disk-space-and-disk-space/m-p/251021#M4658</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are looking to monitor low disk space with the following setup:&lt;BR /&gt;alert if space &amp;lt;= 97% AND space &amp;lt;300 gig&lt;/P&gt;&lt;P&gt;Is this something that can be achieved within the alerting query?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jul 2024 19:27:38 GMT</pubDate>
    <dc:creator>RishiSuthar</dc:creator>
    <dc:date>2024-07-18T19:27:38Z</dc:date>
    <item>
      <title>Alert on low disk space by using both disk space % and disk space bytes</title>
      <link>https://community.dynatrace.com/t5/Alerting/Alert-on-low-disk-space-by-using-both-disk-space-and-disk-space/m-p/251021#M4658</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are looking to monitor low disk space with the following setup:&lt;BR /&gt;alert if space &amp;lt;= 97% AND space &amp;lt;300 gig&lt;/P&gt;&lt;P&gt;Is this something that can be achieved within the alerting query?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 19:27:38 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Alerting/Alert-on-low-disk-space-by-using-both-disk-space-and-disk-space/m-p/251021#M4658</guid>
      <dc:creator>RishiSuthar</dc:creator>
      <dc:date>2024-07-18T19:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: Alert on low disk space by using both disk space % and disk space bytes</title>
      <link>https://community.dynatrace.com/t5/Alerting/Alert-on-low-disk-space-by-using-both-disk-space-and-disk-space/m-p/251042#M4659</link>
      <description>&lt;P&gt;You can use new "Davis Anomaly Detector" app for this.&lt;BR /&gt;What you need is a query which checks both of the conditions.&lt;BR /&gt;In data explorer it looks something like this&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Maheedhar_T_0-1721368409796.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21225iA94200E6CC33D1A9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Maheedhar_T_0-1721368409796.png" alt="Maheedhar_T_0-1721368409796.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and when you click on open with and open that with a notebook it gets converted to DQL and looks something like the below.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries { free = avg(dt.host.disk.free), avail = avg(dt.host.disk.avail) }, by: { dt.entity.host }, filter: { in(dt.entity.host, classicEntitySelector("type(host),fromRelationship.isInstanceOf(type(HOST_GROUP),entityName.equals(\"XXXXXX\"))")) }
| sort arrayAvg(free) desc
| fieldsAdd entityName(dt.entity.host)
| limit 20&lt;/LI-CODE&gt;&lt;P&gt;Then again when you click open with you find something like this.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Maheedhar_T_1-1721368946085.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21226iB55012CBE91098D6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Maheedhar_T_1-1721368946085.png" alt="Maheedhar_T_1-1721368946085.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;click on Davis anomaly detector and you will be redirected to the Anomaly detector Application where you can create the event.&lt;BR /&gt;Then you can see your query in the query section of the config and in the Customise parameters section this is what you have to give.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Maheedhar_T_2-1721369275744.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21227i7924BF1FE026A671/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Maheedhar_T_2-1721369275744.png" alt="Maheedhar_T_2-1721369275744.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here the query gives disk available % first and disk available (bytes) as second output hence we configure something like this.&lt;BR /&gt;3,322,122,547,200&lt;BR /&gt;Don't get confused with so many "," s.&lt;BR /&gt;Split it as&amp;nbsp;&lt;BR /&gt;(3),(322,122,547,200) the first part is disk available is 3% and the second part is disk available is&amp;nbsp;322,122,547,200 bytes.&lt;BR /&gt;and we have set the alert to be triggered if the metric is below which means alert would be triggered if both of the conditions you mentioned above are met.&lt;BR /&gt;&lt;BR /&gt;Hope this answers your query.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/76275"&gt;@Maheedhar_T&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 06:19:39 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Alerting/Alert-on-low-disk-space-by-using-both-disk-space-and-disk-space/m-p/251042#M4659</guid>
      <dc:creator>Maheedhar_T</dc:creator>
      <dc:date>2024-07-19T06:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: Alert on low disk space by using both disk space % and disk space bytes</title>
      <link>https://community.dynatrace.com/t5/Alerting/Alert-on-low-disk-space-by-using-both-disk-space-and-disk-space/m-p/251044#M4660</link>
      <description>&lt;P&gt;One thing I forgot to mention is that you have to convert your&amp;nbsp;&lt;SPAN&gt;300 gig to bytes to add it as threshold as the metric we are using above gives the disk available in bytes.&lt;BR /&gt;&lt;BR /&gt;Also,&lt;BR /&gt;This is the only way I see ahead as I was not able to replicate the same using classic metric events.&lt;BR /&gt;&lt;BR /&gt;Hope you're on Grail....&lt;BR /&gt;Happy querying&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/50148"&gt;@RishiSuthar&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 06:22:22 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Alerting/Alert-on-low-disk-space-by-using-both-disk-space-and-disk-space/m-p/251044#M4660</guid>
      <dc:creator>Maheedhar_T</dc:creator>
      <dc:date>2024-07-19T06:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: Alert on low disk space by using both disk space % and disk space bytes</title>
      <link>https://community.dynatrace.com/t5/Alerting/Alert-on-low-disk-space-by-using-both-disk-space-and-disk-space/m-p/280196#M5731</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I tried following your solution as I am interested in a similar setup, however when I get to setting up the anomaly detector, I get the following error with my query: "The query results in multiple metrics, but anomaly detectors only support single metric."&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dlee1_0-1750881339103.png" style="width: 679px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/28680i24F7716760B41CDE/image-dimensions/679x416?v=v2" width="679" height="416" role="button" title="dlee1_0-1750881339103.png" alt="dlee1_0-1750881339103.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;*I replaced the server name to "XXXXXX" in my screenshot, but when I put in an actual server name I get the error*&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does this functionality no longer work, or am I missing something?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jun 2025 19:56:28 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Alerting/Alert-on-low-disk-space-by-using-both-disk-space-and-disk-space/m-p/280196#M5731</guid>
      <dc:creator>dlee1</dc:creator>
      <dc:date>2025-06-25T19:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Alert on low disk space by using both disk space % and disk space bytes</title>
      <link>https://community.dynatrace.com/t5/Alerting/Alert-on-low-disk-space-by-using-both-disk-space-and-disk-space/m-p/289116#M5974</link>
      <description>&lt;P&gt;You could try something like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;timeseries by:{dt.entity.disk, dt.entity.host}, {used_percent = avg(dt.host.disk.used.percent), used = avg(dt.host.disk.used), avail = avg(dt.host.disk.avail)},
  filter:{matchesValue(entityAttr(type:"dt.entity.host", dt.entity.host, "hostGroupName"), "xxxxx")}
| fieldsAdd entityName(dt.entity.disk)
| fieldsAdd entityName(dt.entity.host)
         
| fieldsAdd free_percent = 100 - used_percent[],
            free_space_gb = avail[] / (1024*1024*1024)
| filter iAny(free_space_gb[] &amp;lt; 300)

| fieldsAdd alert_level = if(isNull(free_percent[]), null,
                           else:if(free_percent[] &amp;lt; 5, 2, 
                           else:if(free_percent[] &amp;lt; 10, 1, else:0)))
| filter iAny(alert_level[] &amp;gt; 0) 

| fields dt.entity.disk, dt.entity.host, dt.entity.disk.name, dt.entity.host.name, alert_level, timeframe, interval, used_percent, used
, avail,
         last_alert_level = arrayLast(alert_level), 
         last_used_percent_display = round(arrayLast(used_percent), decimals:2),
         last_free_space_gb = round(arrayLast(free_space_gb), decimals:2)

| fieldsAdd alert_severity = if(last_alert_level == 2, "CRITICAL",
                             else:if(last_alert_level == 1, "WARNING", 
                             else:"OK"))

| dedup dt.entity.disk&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2025 14:52:32 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Alerting/Alert-on-low-disk-space-by-using-both-disk-space-and-disk-space/m-p/289116#M5974</guid>
      <dc:creator>rkdy</dc:creator>
      <dc:date>2025-11-05T14:52:32Z</dc:date>
    </item>
  </channel>
</rss>

