<?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: alerting site wise in Alerting</title>
    <link>https://community.dynatrace.com/t5/Alerting/Close-problem-only-when-dims-units-is-0/m-p/289681#M6009</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="O11y_Noob_0-1763377776018.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/30919i749A50FEEB860B60/image-size/medium?v=v2&amp;amp;px=400" role="button" title="O11y_Noob_0-1763377776018.png" alt="O11y_Noob_0-1763377776018.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;the filter that you see in the problem is not part of my query but its getting added and the reffered fields.unit_Str is not getting the field value referred , could you pls help here&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/42367"&gt;@t_pawlak&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Nov 2025 11:11:19 GMT</pubDate>
    <dc:creator>O11y_Noob</dc:creator>
    <dc:date>2025-11-17T11:11:19Z</dc:date>
    <item>
      <title>Close problem only when {dims:units} is 0</title>
      <link>https://community.dynatrace.com/t5/Alerting/Close-problem-only-when-dims-units-is-0/m-p/289655#M6004</link>
      <description>&lt;PRE&gt;timeseries v = avg(unexpecteddowntime), by: {site, unit}
| summarize {
site_series = avg(v[]), 
units = collectDistinct(unit) 
}, by: {site, timeframe, interval} 
| filter arrayMax(site_series) &amp;gt; 30 
| fieldsAdd units_str = toString(units)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using this in Davis Anomaly Detector for creating alerts site wise, and having {dims:units} in the description but the problem is closing and opening a new instance whenever there is change in the {dims:units}. I only want to close the alert {dims:units} is 0&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2025 10:32:56 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Alerting/Close-problem-only-when-dims-units-is-0/m-p/289655#M6004</guid>
      <dc:creator>O11y_Noob</dc:creator>
      <dc:date>2025-12-18T10:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: alerting site wise</title>
      <link>https://community.dynatrace.com/t5/Alerting/Close-problem-only-when-dims-units-is-0/m-p/289668#M6007</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;If you are using this query, and in the Davis Anomaly metric event you’re using something like {dims:units} in the description. In Dynatrace, whenever a dimension (anything referenced via {dims:...}) changes, Davis treats it as a new problem instance.&lt;BR /&gt;So when the list of units changes even slightly: Old problem is closed and&amp;nbsp;New problem is opened&lt;/P&gt;&lt;P&gt;That’s why you see constant open/close cycles.&lt;/P&gt;&lt;P&gt;If I correctly understand, you want to open one problem per site.&lt;/P&gt;&lt;P&gt;So, do not use {dims:units} anywhere (especially in description).&lt;BR /&gt;That makes units part of the problem key.&lt;/P&gt;&lt;P&gt;Use units only as a field, not a dimension.&lt;/P&gt;&lt;P&gt;Drive open/close behaviour via DQL:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Alert only when units_count &amp;gt; 0&lt;/LI&gt;&lt;LI&gt;Problem auto-closes when units_count = 0&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries v = avg(unexpecteddowntime), by: {site, unit}
| summarize {
    site_series = avg(v[]),
    units = collectDistinct(unit),
    units_count = countDistinct(unit)
  }, by: {site, timeframe, interval}
| filter arrayMax(site_series) &amp;gt; 30
| filter units_count &amp;gt; 0
| fieldsAdd units_str = toString(units)&lt;/LI-CODE&gt;&lt;P&gt;units_count &amp;gt; 0 → only then the metric event is evaluated as violating&lt;/P&gt;&lt;P&gt;When units_count becomes 0, the violation stops → Davis will close the problem&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then in metric event use site as a dimension, like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Site: {dims:site}
Affected units: {fields.units_str}&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 17 Nov 2025 10:01:17 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Alerting/Close-problem-only-when-dims-units-is-0/m-p/289668#M6007</guid>
      <dc:creator>t_pawlak</dc:creator>
      <dc:date>2025-11-17T10:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: alerting site wise</title>
      <link>https://community.dynatrace.com/t5/Alerting/Close-problem-only-when-dims-units-is-0/m-p/289681#M6009</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="O11y_Noob_0-1763377776018.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/30919i749A50FEEB860B60/image-size/medium?v=v2&amp;amp;px=400" role="button" title="O11y_Noob_0-1763377776018.png" alt="O11y_Noob_0-1763377776018.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;the filter that you see in the problem is not part of my query but its getting added and the reffered fields.unit_Str is not getting the field value referred , could you pls help here&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/42367"&gt;@t_pawlak&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Nov 2025 11:11:19 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Alerting/Close-problem-only-when-dims-units-is-0/m-p/289681#M6009</guid>
      <dc:creator>O11y_Noob</dc:creator>
      <dc:date>2025-11-17T11:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: alerting site wise</title>
      <link>https://community.dynatrace.com/t5/Alerting/Close-problem-only-when-dims-units-is-0/m-p/289731#M6017</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I don't see such thing as "fields" in the doc (&lt;A href="https://docs.dynatrace.com/docs/shortlink/anomaly-detection-configuration#event-template" target="_blank"&gt;https://docs.dynatrace.com/docs/shortlink/anomaly-detection-configuration#event-template&lt;/A&gt;) - I also tried to use it in my Davis Anomaly Detector but results were the same like for&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/85826"&gt;@O11y_Noob&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please give the source from which you got this info?&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Patryk&lt;/P&gt;</description>
      <pubDate>Tue, 18 Nov 2025 06:37:38 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Alerting/Close-problem-only-when-dims-units-is-0/m-p/289731#M6017</guid>
      <dc:creator>patryk_ozimek2</dc:creator>
      <dc:date>2025-11-18T06:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: alerting site wise</title>
      <link>https://community.dynatrace.com/t5/Alerting/Close-problem-only-when-dims-units-is-0/m-p/289737#M6020</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;It looks like the additional filter (...) you see in the problem view is not coming from your DQL. Davis automatically adds a filter for the concrete time-series that triggered the event (based on the dimensions/placeholders used in the metric event).&lt;/P&gt;&lt;P&gt;Also, my previous suggestion with {fields.units_str} was misleading – fields.* placeholders are not supported in the event template, which is why you don’t see the value there.&lt;/P&gt;&lt;P&gt;In practice this means that if you reference units / units_str in the title/description, Davis will “pin” the problem to that exact value and will open/close a new problem every time the list of units changes. To have one problem per site, keep units only inside DQL (for filtering/logic) and use only {dims:site} (and standard placeholders like {value}) in the event template.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Nov 2025 08:28:16 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Alerting/Close-problem-only-when-dims-units-is-0/m-p/289737#M6020</guid>
      <dc:creator>t_pawlak</dc:creator>
      <dc:date>2025-11-18T08:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: alerting site wise</title>
      <link>https://community.dynatrace.com/t5/Alerting/Close-problem-only-when-dims-units-is-0/m-p/289741#M6021</link>
      <description>&lt;P&gt;the team wants to see the unit names in the problem ticket , how can i include it in the problem ?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Nov 2025 09:56:40 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Alerting/Close-problem-only-when-dims-units-is-0/m-p/289741#M6021</guid>
      <dc:creator>O11y_Noob</dc:creator>
      <dc:date>2025-11-18T09:56:40Z</dc:date>
    </item>
  </channel>
</rss>

