# Metric for sum of problem durations

**URL:** <https://community.dynatrace.com/t/metric-for-sum-of-problem-durations/43640>\
**Category:** Automations\
**Tags:** dynatrace-managed, slo, problems-classic\
**Created:** [January 16, 2024, 8:47am UTC](https://community.dynatrace.com/t/metric-for-sum-of-problem-durations/43640 "2024-01-16T08:47:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rsmsdk](https://avatars.discourse-cdn.com/v4/letter/r/e19adc/32.png) [@rsmsdk](https://community.dynatrace.com/u/rsmsdk)\
**Post date:** [January 16, 2024, 8:47am UTC](https://community.dynatrace.com/t/metric-for-sum-of-problem-durations/43640/1 "2024-01-16T08:47:02Z")

</div>

Hi

I was wondering if it is possible to track the sum of problem card duration for specific alerting profiles or services?

If for example I have a database with frequent response time degradations, and I want to know to sum of minuttes/hours problem cards was raised in a fixed range of time.

Can I in any way display this in Dynatrace? I know I can create a SLO and get percentages, but I’m interrested in duration.

Currently I get the data from ServiceNow integration where I then create reports in display the sum of resolution time on a dashboard. But it would be cooler to simply display in Dynatrace.

Problem 1: 20 minuttes  
Problem 2: 11 minuttes  
Problem 3: 37 minuttes

Sum would be 1 hour and 8 minuttes. Can I display that?

---

<div class="post-metadata">

**Author:** ![marina\_pollehn](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/marina_pollehn/32/39120_2.png) [@marina\_pollehn](https://community.dynatrace.com/u/marina_pollehn)\
**Post date:** [January 16, 2024, 11:02am UTC](https://community.dynatrace.com/t/metric-for-sum-of-problem-durations/43640/2 "2024-01-16T11:02:44Z")

</div>

![marina_pollehn_0-1705402949258.png](https://global.discourse-cdn.com/dynatrace/original/2X/f/f04a5117b44cc5835d4ad1cc771de16745556df3.png)

You can do that for notification channels as shown above 🙂

So now I have the sum of all problem durations for a specific alerting profile pushed to a specific Teams account for example.

Or you use the advanced mode:

dsfm:server.notifications.problem\_notifications\_duration:splitBy(“notification.display\_name”):sum:sort(value(sum,descending)):limit(20)

Now you can still add filters ofc if you only want to see it for one integration and maybe also use the single value visualization.

---

<div class="post-metadata">

**Author:** ![rsmsdk](https://avatars.discourse-cdn.com/v4/letter/r/e19adc/32.png) [@rsmsdk](https://community.dynatrace.com/u/rsmsdk)\
**Post date:** [January 16, 2024, 11:26am UTC](https://community.dynatrace.com/t/metric-for-sum-of-problem-durations/43640/3 "2024-01-16T11:26:15Z")

</div>

Hi

Thank you for the provided input. Sadly the math does not add up.

I can find a problem notification group I have set up with the alerting profile in question. But when I use the metric you suggest, the numbers returned does not equal the amount of minuttes these problems was open. It returns values way less than the actualy duration of the problem.

Best regards

---

<div class="post-metadata">

**Author:** ![marina\_pollehn](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/marina_pollehn/32/39120_2.png) [@marina\_pollehn](https://community.dynatrace.com/u/marina_pollehn)\
**Post date:** [January 16, 2024, 12:18pm UTC](https://community.dynatrace.com/t/metric-for-sum-of-problem-durations/43640/4 "2024-01-16T12:18:12Z")

</div>

You are right, apparently this is the description of the metric.

= The problem notification sending duration (time between sending the notification and receiving a response).

So nice to have but not really what we want :(. Out of the box there does not seem to be a&nbsp;dsfm metric for this.

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [January 16, 2024, 12:58pm UTC](https://community.dynatrace.com/t/metric-for-sum-of-problem-durations/43640/5 "2024-01-16T12:58:18Z")

</div>

As&nbsp;[@marina\_pollehn](https://community.dynatrace.com/user/2456)&nbsp;stated the metrics is really only for the duration of the alert triggering with your alert integrations as defined. Also keep in mind the default aggregation of the metric is set to “average”. You’d really need to create a metrics that pulls the start and end time from the problem card via the Problems V2 API and then formulate it as a metric that you can then target.

You can also always toss in a RFE to request this functionality in Dynatrace 🙂

---

<div class="post-metadata">

**Author:** ![rsmsdk](https://avatars.discourse-cdn.com/v4/letter/r/e19adc/32.png) [@rsmsdk](https://community.dynatrace.com/u/rsmsdk)\
**Post date:** [January 16, 2024, 1:15pm UTC](https://community.dynatrace.com/t/metric-for-sum-of-problem-durations/43640/6 "2024-01-16T13:15:29Z")

</div>

Thank you for the input, I’ll look into the API suggestion. If I had a dollar for everytime I was pointed towards an RFE, I would be a rich man.. or at least be able to buy a decently sized ice cream&nbsp;😀
