Restart Web server in case a problem is occured

We want to trigger a command automatically to restart the application service (like apache) when a host doesn’t make any http response. To do so, we need to execute a command on the host.

You can already achieve this by configuring a auto-remediation using alerting profiles.

You can ready here : Problem alerting profiles — Dynatrace Docs

Here’s a similar question: https://community.dynatrace.com/spaces/482/dynatrace-open-qa/questions/240675/problem-auto-remediation-with-dynatrace.html

Here’s a blog post for SNOW integration: Leveraging ServiceNow and Dynatrace

I’m sure you can find a lot of different materials about this.

In short:

1. Set up an alerting profile and define either a custom event or use existing one.

2. Use Ansible Tower, SNOW, Jenkins, Keptn or whatever else that works for you to trigger a desired job - e.g. restart a host XYZ

3. Bind the notification of the event to remediation action.

It’s helpful for me, thank you!

>2. Use Ansible Tower, SNOW, Jenkins, Keptn or whatever else that works for you to trigger a desired job - e.g. restart a host XYZ

Can I use Ansible instead of Ansible Tower?

No, you cannot. Ansible is just a “scripting” language and doesn’t have any REST API that Dynatrace can communicate with. But you can use Jenkins or other CI/CD you have that triggers the ansible.

I understand. Thank you for confirmation!

I wanted to achieve self-healing without those tools.

Can I request this?

Hello, I found same question! :

Can I do this?

You can request anything… but IMHO it is not feasible.

That’s exactly what I write - you need sth to receive REST calls from Dynatrace. No matter if this is :

- Ansible Tower

- AWX
- Ansible Python/Webhook … whatever else..

- You can even have your own webserver that will trigger Ansible.

I’m sorry I didn’t understand well…

Is it possible to share with me about Ansible Webhook..?

https://github.com/scalr-tutorials/ansible-webhook

Thank you for your kindly support. I will check.