# Log retention using Dynatrace workflow

**URL:** <https://community.dynatrace.com/t/log-retention-using-dynatrace-workflow/54759>\
**Category:** Automations\
**Tags:** workflows, automations\
**Created:** [January 27, 2026, 7:53am UTC](https://community.dynatrace.com/t/log-retention-using-dynatrace-workflow/54759 "2026-01-27T07:53:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kodiramakrishna](https://avatars.discourse-cdn.com/v4/letter/k/67e7ee/32.png) [@kodiramakrishna](https://community.dynatrace.com/u/kodiramakrishna)\
**Post date:** [January 27, 2026, 7:53am UTC](https://community.dynatrace.com/t/log-retention-using-dynatrace-workflow/54759/1 "2026-01-27T07:53:59Z")

</div>

Hi,

I have created a log retention script which can run on monthly basis to delete the logs which are older than one month.

I need to trigger the same script from Dynatrace workflow.

Could any one help me to achieve this use case? Thanks in Advance!

Note: I need to access the VM directly instead of via azure or AWS cloud providers.

Regards,

Kodi.

---

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [January 27, 2026, 8:01am UTC](https://community.dynatrace.com/t/log-retention-using-dynatrace-workflow/54759/2 "2026-01-27T08:01:25Z")

</div>

Hi,

You should integrate it with Ansible or Puppet.

You can check [Red Hat Ansible Automation](https://docs.dynatrace.com/docs/shortlink/automation-workflows-red-hat-ansible).

Best regards

---

<div class="post-metadata">

**Author:** ![kodiramakrishna](https://avatars.discourse-cdn.com/v4/letter/k/67e7ee/32.png) [@kodiramakrishna](https://community.dynatrace.com/u/kodiramakrishna)\
**Post date:** [January 27, 2026, 8:06am UTC](https://community.dynatrace.com/t/log-retention-using-dynatrace-workflow/54759/3 "2026-01-27T08:06:29Z")

</div>

Hi,

But we have the server in the private network and from Dynatrace SaaS to private network accessible its not advisable, I think. I don’t have public IP address to configure as a host pattern

Regards,

Kodi.

---

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [January 27, 2026, 9:23am UTC](https://community.dynatrace.com/t/log-retention-using-dynatrace-workflow/54759/4 "2026-01-27T09:23:23Z")

</div>

Hi,

I do not see any way to trigger that in OS level commands, if you do not have any orchestration tool.

But lets wait another answers.

Best regards
