# Need some idea to automate work in dynatrace using python

**URL:** <https://community.dynatrace.com/t/need-some-idea-to-automate-work-in-dynatrace-using-python/21523>\
**Category:** Synthetic Monitoring\
**Tags:** http-monitor, automation\
**Created:** [February 18, 2021, 2:16am UTC](https://community.dynatrace.com/t/need-some-idea-to-automate-work-in-dynatrace-using-python/21523 "2021-02-18T02:16:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shriniwasmundli](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@shriniwasmundli](https://community.dynatrace.com/u/shriniwasmundli)\
**Post date:** [February 18, 2021, 2:16am UTC](https://community.dynatrace.com/t/need-some-idea-to-automate-work-in-dynatrace-using-python/21523/1 "2021-02-18T02:16:28Z")

</div>

We want to automate the pod restart in dynatrace if there is a performance issue with one of the pod like there is high cpu etc etc and we want to restart that pod, in that case we want dynatrace to come into the picture and call our api to either restart or scale the pods. Please kindly provide some insight to work on this. We need to achieve with with our api.

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [February 18, 2021, 10:14pm UTC](https://community.dynatrace.com/t/need-some-idea-to-automate-work-in-dynatrace-using-python/21523/2 "2021-02-18T22:14:06Z")

</div>

Probably, you should have a look at Keptn.

---

<div class="post-metadata">

**Author:** ![pahofmann](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pahofmann/32/17076_2.png) [@pahofmann](https://community.dynatrace.com/u/pahofmann)\
**Post date:** [March 9, 2021, 12:39pm UTC](https://community.dynatrace.com/t/need-some-idea-to-automate-work-in-dynatrace-using-python/21523/3 "2021-03-09T12:39:06Z")

</div>

If you already have an API that can trigger the POD restart, you just need to Setup a&nbsp;[Webhook integration](https://www.dynatrace.com/support/help/shortlink/webhook)&nbsp;to call your API when a Problem is detected.

You can specify the body what is used for the webhook, so your API knows which POD to restart.

With an&nbsp;[Alerting profile](https://www.dynatrace.com/support/help/shortlink/alerting-profiles)&nbsp;you can make sure webhooks are only sent for relevant problems.
