16 Jul 2024
06:03 PM
- last edited on
17 Jul 2024
07:25 AM
by
MaciejNeumann
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.
Solved! Go to Solution.
18 Jul 2024 01:01 AM
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.
Hope this helps
06 Jun 2025 04:02 PM
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"
} }] });
06 Jun 2025 04:29 PM
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.
10 Jun 2025 08:24 AM
Hi StrangerThing,
how would that workflow look like?