<?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 Detect Synthetic Location Failures Using DQL for Alerting in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Detect-Synthetic-Location-Failures-Using-DQL-for-Alerting/m-p/270235#M1720</link>
    <description>&lt;P&gt;I'm trying to essentially replicate this type of built-in alert, to a dql and davis anomaly detector. What would the dql look like for a synthetic that runs every 5 minutes at 5 different locations where I want to alert if any single location fails 3 consecutive runs?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sivart_89_0-1739807473699.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26451iCAA18B5E61D8D1DE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sivart_89_0-1739807473699.png" alt="sivart_89_0-1739807473699.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Dec 2025 12:34:27 GMT</pubDate>
    <dc:creator>sivart_89</dc:creator>
    <dc:date>2025-12-18T12:34:27Z</dc:date>
    <item>
      <title>Detect Synthetic Location Failures Using DQL for Alerting</title>
      <link>https://community.dynatrace.com/t5/DQL/Detect-Synthetic-Location-Failures-Using-DQL-for-Alerting/m-p/270235#M1720</link>
      <description>&lt;P&gt;I'm trying to essentially replicate this type of built-in alert, to a dql and davis anomaly detector. What would the dql look like for a synthetic that runs every 5 minutes at 5 different locations where I want to alert if any single location fails 3 consecutive runs?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sivart_89_0-1739807473699.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26451iCAA18B5E61D8D1DE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sivart_89_0-1739807473699.png" alt="sivart_89_0-1739807473699.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2025 12:34:27 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Detect-Synthetic-Location-Failures-Using-DQL-for-Alerting/m-p/270235#M1720</guid>
      <dc:creator>sivart_89</dc:creator>
      <dc:date>2025-12-18T12:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: DQL for if any synthetic location fails 3 consecutive times</title>
      <link>https://community.dynatrace.com/t5/DQL/Detect-Synthetic-Location-Failures-Using-DQL-for-Alerting/m-p/270440#M1728</link>
      <description>&lt;P&gt;You could try building a logic using the synthetic events table:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;fetch dt.synthetic.events&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are a couple fields there, like the status code, location and synthetic id that can help create another event or make some kind of timeseries for what you're looking for&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Eric_Yu_0-1739978205859.png" style="width: 828px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26506iDA84D802998CF5D2/image-dimensions/828x176?v=v2" width="828" height="176" role="button" title="Eric_Yu_0-1739978205859.png" alt="Eric_Yu_0-1739978205859.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 15:18:40 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Detect-Synthetic-Location-Failures-Using-DQL-for-Alerting/m-p/270440#M1728</guid>
      <dc:creator>Eric_Yu</dc:creator>
      <dc:date>2025-02-19T15:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: DQL for if any synthetic location fails 3 consecutive times</title>
      <link>https://community.dynatrace.com/t5/DQL/Detect-Synthetic-Location-Failures-Using-DQL-for-Alerting/m-p/270444#M1729</link>
      <description>&lt;P&gt;I had tried something like the below but it ended up alerting when there were 2 consecutive failures in 1 location when I want it to only alert when there are 3 consecutive failures (synthetic runs every 5 minutes)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries Synthetics = avg(dt.synthetic.browser.executions), by: {dt.entity.synthetic_test, dt.entity.synthetic_location, state, dt.source_entity}, interval: 1m
| fieldsAdd syntheticName = entityName(dt.entity.synthetic_test)
| fieldsAdd locationName = entityName(dt.entity.synthetic_location)
| filter contains(syntheticName, "&amp;lt;SYNTHETIC-NAME&amp;gt;")
| filter state == "FAIL"
| fieldsAdd arrayWithFailureConditions = arrayMovingMax(Synthetics, 5)
| fieldsRemove Synthetics
| summarize TotalAvailability = sum(arrayWithFailureConditions[]), by: {timeframe, interval, syntheticName, dt.entity.synthetic_test}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sivart_89_0-1739978823371.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26509i4AA317DC8EC77978/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sivart_89_0-1739978823371.png" alt="sivart_89_0-1739978823371.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 15:27:40 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Detect-Synthetic-Location-Failures-Using-DQL-for-Alerting/m-p/270444#M1729</guid>
      <dc:creator>sivart_89</dc:creator>
      <dc:date>2025-02-19T15:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: DQL for if any synthetic location fails 3 consecutive times</title>
      <link>https://community.dynatrace.com/t5/DQL/Detect-Synthetic-Location-Failures-Using-DQL-for-Alerting/m-p/270563#M1733</link>
      <description>&lt;P&gt;I think the way you did it is very clever, it should work. However, if I'm understanding what your query does correctly, I feel like you should modify it to arrayMovingSum instead of Max, use a 15 window and also split the summarization by location too. Maybe like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Can you maybe show your resulting data?&lt;/P&gt;&lt;LI-CODE lang="java"&gt;....
| fieldsAdd arrayWithFailureConditions = arrayMovingSum(Synthetics, 15)
| fieldsRemove Synthetics
| summarize TotalAvailability = sum(arrayWithFailureConditions[]), by: {timeframe, interval, syntheticName, dt.entity.synthetic_test, locationName}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you can also show your threshold and alerting condition that'd be helpful too.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 14:56:54 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Detect-Synthetic-Location-Failures-Using-DQL-for-Alerting/m-p/270563#M1733</guid>
      <dc:creator>Eric_Yu</dc:creator>
      <dc:date>2025-02-20T14:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: DQL for if any synthetic location fails 3 consecutive times</title>
      <link>https://community.dynatrace.com/t5/DQL/Detect-Synthetic-Location-Failures-Using-DQL-for-Alerting/m-p/270945#M1745</link>
      <description>&lt;P&gt;Thank you for the input here. I tried out your query since it did seem to be showing me what I wanted. I can can see that the datapoint value will rise to 1 upon the first failure then 5 mins later it will rise to 2 because of there being 2 consecutive failures and so on. Everything looks good from what I can see but the alert never actually triggers even though the preview shows it should. Still looking into why this never actually triggers and creates a problem.&lt;/P&gt;&lt;P&gt;Full dql here&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries Synthetics = avg(dt.synthetic.browser.executions), by: {dt.entity.synthetic_test, dt.entity.synthetic_location, state, dt.source_entity}, interval: 1m
| fieldsAdd syntheticName = entityName(dt.entity.synthetic_test)
| fieldsAdd locationName = entityName(dt.entity.synthetic_location)
| filter syntheticName == "Test Google"
| filter state == "FAIL"
| fieldsAdd arrayWithFailureConditions = arrayMovingSum(Synthetics, 15)
| fieldsRemove Synthetics&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sivart_89_0-1740486700453.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26639i4A8D92A4FD429A86/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sivart_89_0-1740486700453.png" alt="sivart_89_0-1740486700453.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is defined in the detector. I kept the sliding window to 3 because in my mind it needs to be below 5 since the synthetic runs every 5 mins, if that is not accurate please let me know. Violating sample I left to 1 because as soon as we have above 2 failures then I want to alert (aka, on the 3rd consecutive failure)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sivart_89_2-1740486953699.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26641i06C0AB1A80479DE8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sivart_89_2-1740486953699.png" alt="sivart_89_2-1740486953699.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 12:38:39 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Detect-Synthetic-Location-Failures-Using-DQL-for-Alerting/m-p/270945#M1745</guid>
      <dc:creator>sivart_89</dc:creator>
      <dc:date>2025-02-25T12:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: DQL for if any synthetic location fails 3 consecutive times</title>
      <link>https://community.dynatrace.com/t5/DQL/Detect-Synthetic-Location-Failures-Using-DQL-for-Alerting/m-p/291823#M2938</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:33:56 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Detect-Synthetic-Location-Failures-Using-DQL-for-Alerting/m-p/291823#M2938</guid>
      <dc:creator>IzabelaRokita</dc:creator>
      <dc:date>2025-12-18T12:33:56Z</dc:date>
    </item>
  </channel>
</rss>

