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

Restart Web server in case a problem is occured

kanari_naiki
Newcomer

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.

10 REPLIES 10

Radoslaw_Szulgo
Dynatrace Guru
Dynatrace Guru

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

You can ready here : https://www.dynatrace.com/support/help/how-to-use-dynatrace/problem-detection-and-analysis/notificat...

Here's a similar question: https://answers.dynatrace.com/spaces/482/dynatrace-open-qa/questions/240675/problem-auto-remediation...


Here's a blog post for SNOW integration: https://www.dynatrace.com/news/blog/leveraging-servicenow-dynatrace-to-automate-incident-management-...


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.

Senior Technical Product Manager,
Dynatrace Managed expert

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.

Senior Technical Product Manager,
Dynatrace Managed expert

I understand. Thank you for confirmation!

I wanted to achieve self-healing without those tools.

Can I request this?

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

Senior Technical Product Manager,
Dynatrace Managed expert

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.

Senior Technical Product Manager,
Dynatrace Managed expert

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

Senior Technical Product Manager,
Dynatrace Managed expert

Thank you for your kindly support. I will check.