Automations
All questions related to Workflow Automation, AutomationEngine, and EdgeConnect, as well as integrations with various tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to close a problem with tag abcd via Workflow

munawarhossain3
Contributor

Hello,

I want to get rid of some problems with a specific tag. Which means once the problem is created it should be auto closed via workflow.

I've the DQL query with me, can you please help how should I implement that in workflow?

Thank

MH

7 REPLIES 7

dannemca
DynaMight Guru
DynaMight Guru

Why not define a Maintenance Window instead?

https://docs.dynatrace.com/docs/analyze-explore-automate/notifications-and-alerting/maintenance-wind...

 

Site Reliability Engineer @ Kyndryl

munawarhossain3
Contributor

Thank you for your response!

Maintenance window is already configured but not serving the need.

FYR -

munawarhossain3_1-1782314069849.png

As you see the maintenance umbrella is already there but problem is getting created at the same time. These are auto scaled hosts which are coming for a while and going back off.

Thanks

 

Hi,

Can you share maintenace window created?

Best regards

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

Sure -

munawarhossain3_0-1782371997248.png

Problem Statement: The auto scaled hosts are coming for somewhat ex 5mins and by that time the tags are not getting propagated. Once it is getting propagated its too late the hosts are already gone.

As a reason both the MW umbrella and problems are seen on the last given snap.

Hence, we need a way to close these with a cron schedule via workflow but how?

I've already checked the API solution too but that's one problem ID at a time.

Thanks

Hi,

Important thing is scope. Are those hosts in scope? Are you filtering them by tag or management zone?

Best regards

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

Hello,

With "tag" and yes "hosts"!

MW is perfect! The 1st snap has the umbrella.

Thanks

Hey,
You could use the Problems API to automatically close the issue.

It is strange that the maintenance window is not working, as this should normally prevent the problem from being created in the first place avoiding pollution of your env.

Using a workflow is more of a workaround / dirty fix rather than the ideal solution.
Note: Instead of using tags, you could leverage the advanced options to create more detailed and granular filters. However, this should already provide you with a good first version to get started.

dylan_taelemans_0-1782381315820.png

dylan_taelemans_1-1782389658390.png

 

 


Replace {envID} by your envID. 

https://{environmentid}.live.dynatrace.com/api/v2/problems/{{event()["event.id"] }}/close

in your credential vault don't forget to add 'Api-Token ' before copy pasting of your token

dylan_taelemans_2-1782381710349.png

Featured Posts