<?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 alert if at least 2/5 locations fail 3 times consecutively in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Create-Alerts-for-Multiple-Location-Failures-Using-DQL/m-p/262083#M1416</link>
    <description>&lt;P&gt;If I set it up this way then an alert will get created when a single location fails 3 times within a 5 minute window. There's 2 things I see wrong with this. First, I need it to alert when there are 3 consecutive failures and second, I only need an alert if 2 locations fail 3 times consecutive, I don't want an alert if just 1 single location is failing.&lt;/P&gt;</description>
    <pubDate>Mon, 11 Nov 2024 15:39:23 GMT</pubDate>
    <dc:creator>sivart_89</dc:creator>
    <dc:date>2024-11-11T15:39:23Z</dc:date>
    <item>
      <title>Create Alerts for Multiple Location Failures Using DQL</title>
      <link>https://community.dynatrace.com/t5/DQL/Create-Alerts-for-Multiple-Location-Failures-Using-DQL/m-p/261736#M1404</link>
      <description>&lt;P&gt;I'm trying to essentially duplicate this type of alerting but with a custom alert in the Davis anomaly detection app. What I'm struggling most with is the '3 times consecutively' part. The synthetic I am working with runs every 5 minutes, any ideas of a DQL that would work for this? I have some simple code below, it just needs to be improved upon.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sivart_89_0-1730908684096.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/24441i2BE203D0AEB42DBF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sivart_89_0-1730908684096.png" alt="sivart_89_0-1730908684096.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;timeseries synthetics_v = avg(dt.synthetic.browser.availability), by: {dt.entity.synthetic_test, dt.entity.synthetic_location}, interval: 5m&lt;BR /&gt;| fieldsAdd syntheticName = entityName(dt.entity.synthetic_test)&lt;BR /&gt;| fieldsAdd locationName = entityName(dt.entity.synthetic_location)&lt;BR /&gt;| filter contains(syntheticName, "&amp;lt;synthetic name&amp;gt;")&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2025 12:56:52 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Create-Alerts-for-Multiple-Location-Failures-Using-DQL/m-p/261736#M1404</guid>
      <dc:creator>sivart_89</dc:creator>
      <dc:date>2025-12-18T12:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: DQL for alert if at least 2/5 locations fail 3 times consecutively</title>
      <link>https://community.dynatrace.com/t5/DQL/Create-Alerts-for-Multiple-Location-Failures-Using-DQL/m-p/261864#M1411</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/17361"&gt;@sivart_89&lt;/a&gt;&amp;nbsp;- I think you can achieve it by using violating samples and sliding window in advanced properties of anomaly detector app&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.dynatrace.com/docs/shortlink/anomaly-detection-configuration#sliding-window" target="_blank"&gt;https://docs.dynatrace.com/docs/shortlink/anomaly-detection-configuration#sliding-window&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="p_devulapalli_0-1731024096217.png" style="width: 454px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/24462iAEB904795826D208/image-dimensions/454x193?v=v2" width="454" height="193" role="button" title="p_devulapalli_0-1731024096217.png" alt="p_devulapalli_0-1731024096217.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 00:05:17 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Create-Alerts-for-Multiple-Location-Failures-Using-DQL/m-p/261864#M1411</guid>
      <dc:creator>p_devulapalli</dc:creator>
      <dc:date>2024-11-08T00:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: DQL for alert if at least 2/5 locations fail 3 times consecutively</title>
      <link>https://community.dynatrace.com/t5/DQL/Create-Alerts-for-Multiple-Location-Failures-Using-DQL/m-p/262083#M1416</link>
      <description>&lt;P&gt;If I set it up this way then an alert will get created when a single location fails 3 times within a 5 minute window. There's 2 things I see wrong with this. First, I need it to alert when there are 3 consecutive failures and second, I only need an alert if 2 locations fail 3 times consecutive, I don't want an alert if just 1 single location is failing.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2024 15:39:23 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Create-Alerts-for-Multiple-Location-Failures-Using-DQL/m-p/262083#M1416</guid>
      <dc:creator>sivart_89</dc:creator>
      <dc:date>2024-11-11T15:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: DQL for alert if at least 2/5 locations fail 3 times consecutively</title>
      <link>https://community.dynatrace.com/t5/DQL/Create-Alerts-for-Multiple-Location-Failures-Using-DQL/m-p/291830#M2943</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/17361"&gt;@sivart_89&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;SPAN&gt;I just wanted to check in and see if you still need help with this. If so, I’d be happy to look into it for you!&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Please let me know what works best for you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2025 12:56:31 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Create-Alerts-for-Multiple-Location-Failures-Using-DQL/m-p/291830#M2943</guid>
      <dc:creator>IzabelaRokita</dc:creator>
      <dc:date>2025-12-18T12:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Create Alerts for Multiple Location Failures Using DQL</title>
      <link>https://community.dynatrace.com/t5/DQL/Create-Alerts-for-Multiple-Location-Failures-Using-DQL/m-p/291837#M2946</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;What you’re missing is that “3 consecutive failures” can’t be reliably expressed with violating samples or sliding windows alone, especially when you also need multi-location logic.&lt;/P&gt;&lt;P&gt;So, I think i find other solution, something like workaround. A practical way to model consecutive failures in DQL is to treat them as continuous failure over the evaluation window.&lt;BR /&gt;For a browser synthetic running every 5 minutes,&lt;BR /&gt;3 consecutive runs = 15 minutes of continuous failure.&lt;/P&gt;&lt;P&gt;You can express this in DQL by checking that all samples in the window failed, and then counting how many locations meet that condition.&lt;/P&gt;&lt;P&gt;Example DQL:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries avail = avg(dt.synthetic.browser.availability),
by:{dt.entity.synthetic_test, dt.entity.synthetic_location},
interval:5m
| fieldsAdd syntheticName = entityName(dt.entity.synthetic_test)
| fieldsAdd locationName  = entityName(dt.entity.synthetic_location)
| filter syntheticName == "&amp;lt;synthetic name&amp;gt;"
| fieldsAdd
    samples  = arraySize(avail),
    maxAvail = arrayMax(avail)
| filter samples &amp;gt;= 3
| filter maxAvail &amp;lt; 1
| summarize
    failing_locations = count(),
    by:{dt.entity.synthetic_test}
| filter failing_locations &amp;gt;= 2&lt;/LI-CODE&gt;&lt;P&gt;arrayMax(avail) &amp;lt; 1 guarantees there was no successful execution in the window → truly consecutive failures&lt;/P&gt;&lt;P&gt;samples &amp;gt;= 3 ensures at least 3 runs were evaluated&lt;/P&gt;&lt;P&gt;failing_locations &amp;gt;= 2 enforces the multi-location condition&lt;/P&gt;&lt;P&gt;In Davis Anomaly Detection, configure:&lt;/P&gt;&lt;P&gt;Evaluation window: 15 minutes&lt;/P&gt;&lt;P&gt;Evaluation frequency: 5 minutes&lt;/P&gt;&lt;P&gt;Trigger condition: Result exists&lt;/P&gt;&lt;P&gt;No sliding window / violating samples needed&lt;BR /&gt;&lt;BR /&gt;Try this and give me feedback. I test it, but I don't have test with 3 failures.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2025 14:01:49 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Create-Alerts-for-Multiple-Location-Failures-Using-DQL/m-p/291837#M2946</guid>
      <dc:creator>t_pawlak</dc:creator>
      <dc:date>2025-12-18T14:01:49Z</dc:date>
    </item>
  </channel>
</rss>

