09 Feb 2021 09:21 AM
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.
Solved! Go to Solution.
09 Feb 2021 09:40 AM - last edited on 16 Oct 2023 03:07 PM by random_user
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://community.dynatrace.com/spaces/482/dynatrace-open-qa/questions/240675/problem-auto-remediati...
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.
09 Feb 2021 09:52 AM
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?
09 Feb 2021 09:55 AM
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.
09 Feb 2021 10:01 AM
I understand. Thank you for confirmation!
I wanted to achieve self-healing without those tools.
Can I request this?
09 Feb 2021 10:14 AM
You can request anything... but IMHO it is not feasible.
09 Feb 2021 10:12 AM - last edited on 16 Oct 2023 03:06 PM by random_user
Hello, I found same question! :
Can I do this?
09 Feb 2021 10:16 AM
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.
09 Feb 2021 10:20 AM
I'm sorry I didn't understand well...
Is it possible to share with me about Ansible Webhook..?
09 Feb 2021 10:23 AM
https://github.com/scalr-tutorials/ansible-webhook
09 Feb 2021 10:24 AM