cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Workflow trigger if the problem persists for at least 5 minutes

JhonU
Guide

Hello community, I have a question regarding workflows, in summary I am running a workflow with a trigger for "Davis problem trigger", the flow analyzes the problem and categorizes it into three priorities creating a tk in servicenow for each case with its respective priority .
In this case, my question is how to emulate a process similar to the alert profile that Dynatrace has, that is, currently we have this alert that triggers a notification only if the problem persists for at least 5 minutes, but in the case of the workflow it performs this detection at the moment in which the event is generated.
I am trying entering delay's but I am worried about the case in which while the flow is executing and waiting for about 5 minutes, what would happen with the problems that are triggered in this period since they would not be detected and therefore we would not be giving adequate treatment.
On the other hand, if I generate alerts for all cases, I would be falling into a case of over-alerting.

4 REPLIES 4

Cameron-Leong
Dynatrace Helper
Dynatrace Helper

Hello,

You could add filters in the problem query to filter by how long the problem has been open. In my testing, I used the filters: 

matchesValue(event.status,"ACTIVE") and (timestamp-event.start)>5m

Which gets active problems that have been open longer than 5 minutes.

CameronLeong_1-1721260815032.png

Hope this helps

 

 

Hi Cameron-Leong,

this doesn't work - I can't save the workflow as the limited DQL there does not allow arithmetic operations.

Instead I figured out that the classic Problem notifications - that support delays for sending notifications - can work with the Teams Power Automate Workflow to get problems into MS Teams chats.

The payload needs to be crafted like this:

{ "type": "message", "attachments": [{ "contentType": "application/vnd.microsoft.card.adaptive", "content": {
  "type": "AdaptiveCard",
  "body": [
           {
            "type": "TextBlock",
            "size": "Medium",
            "weight": "Bolder",
            "text": "Dynatrace Problem"
          },
          {
          "type":"FactSet",
          "facts":[
             {
                "title":"Title",
                "value":"{ProblemTitle}"
             },
             {
                "title":"Status",
                "value":"{State}"
             },
             {
                "title":"Category",
                "value":"{ProblemSeverity}"
             },
             {
                "title":"Display ID",
                "value":"{ProblemID}"
             }
          ]
       }
  ],
  "actions": [
      {
          "type":"Action.OpenUrl",
          "title":"Open in Dynatrace",
          "url":"{ProblemURL}"
       }
  ],
  "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
  "version": "1.2"
} }] });

 

Dynatrace Master, Appmon Master

StrangerThing
DynaMight Advisor
DynaMight Advisor

In your event trigger, you can look for an alert profile on the event. So if you have an alert profile that has a 5m delay it won't trigger the Workflow until the alert profile has been added to the event.

Observability Engineer at FreedomPay

Hi StrangerThing,

how would that workflow look like?

Dynatrace Master, Appmon Master

Featured Posts