# How to Push Data from OneAgent to a Third-Party Storage

**URL:** <https://community.dynatrace.com/t/how-to-push-data-from-oneagent-to-a-third-party-storage/49432>\
**Category:** Dynatrace Managed\
**Tags:** log-monitoring-class, oneagent\
**Created:** [December 19, 2024, 2:45am UTC](https://community.dynatrace.com/t/how-to-push-data-from-oneagent-to-a-third-party-storage/49432 "2024-12-19T02:45:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnLee](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@AnLee](https://community.dynatrace.com/u/AnLee)\
**Post date:** [December 19, 2024, 2:45am UTC](https://community.dynatrace.com/t/how-to-push-data-from-oneagent-to-a-third-party-storage/49432/1 "2024-12-19T02:45:00Z")

</div>

Hello,

I use Dynatrace Managed, and the Log Monitoring feature only retains logs for 35 days.  
Is there any way to store logs from OneAgent in third-party storage or any method to retain logs for long-term storage?

Any feedback or advice would be helpful.  
Anlee

---

<div class="post-metadata">

**Author:** ![RohitBisht](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/rohitbisht/32/38577_2.png) [@RohitBisht](https://community.dynatrace.com/u/RohitBisht)\
**Post date:** [December 19, 2024, 3:06am UTC](https://community.dynatrace.com/t/how-to-push-data-from-oneagent-to-a-third-party-storage/49432/2 "2024-12-19T03:06:25Z")

</div>

Hi there,  
You can use Dynatrace API to export logs to external storage. While designing such solution, please be mindful of the API rate limits, amount of data being exported and effectiveness of log search query.&nbsp;  
It is case to case and can be best determined by the environment owner.  
I am aware the log retention cannot be changed for managed however best is to raise a support case and get it confirmed. Thank you.

> **[Log Monitoring API v2 - GET export logs](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/log-monitoring-v2/get-export-logs)**
>
> Fetch log records via the Log Monitoring API v2.

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [December 19, 2024, 5:47am UTC](https://community.dynatrace.com/t/how-to-push-data-from-oneagent-to-a-third-party-storage/49432/3 "2024-12-19T05:47:07Z")

</div>

Hi&nbsp;[@AnLee](https://community.dynatrace.com/user/81690)

In addition to the provided guidance by&nbsp;[@RohitBisht](https://community.dynatrace.com/user/45903), PFA helpful resources:

- [Data Retention](https://docs.dynatrace.com/docs/manage/data-privacy-and-security/data-privacy/data-retention-periods)
- [Adaptive Data Retention](https://docs.dynatrace.com/docs/manage/data-privacy-and-security/data-privacy/adaptive-data-retention)

**Regarding Logs:**

- [git-export-logs](https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-api/environment-api/log-monitoring-v2/git-export-logs)

 ![2024-12-19_09h41_47.png](https://global.discourse-cdn.com/dynatrace/original/2X/f/f20ba85522e3edd14f639a0034f44c1c1801fe74.png)

 ![2024-12-19_09h44_35.png](https://global.discourse-cdn.com/dynatrace/original/2X/b/b753f191dede820fd9d6ac7606254abd14e3b939.png)

**Log Ingestion:**

- [Log ingestion — Dynatrace Docs](https://docs.dynatrace.com/docs/analyze-explore-automate/logs/lma-log-ingestion)
- [Log ingestion via API — Dynatrace Docs](https://docs.dynatrace.com/docs/analyze-explore-automate/logs/lma-log-ingestion/lma-log-ingestion-via-api)

Kindly ensure the token has the required scope for successful execution.

Hoping it helps.

KR,

Peter

---

<div class="post-metadata">

**Author:** ![AnLee](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@AnLee](https://community.dynatrace.com/u/AnLee)\
**Post date:** [January 3, 2025, 3:56am UTC](https://community.dynatrace.com/t/how-to-push-data-from-oneagent-to-a-third-party-storage/49432/4 "2025-01-03T03:56:58Z")

</div>

Hi&nbsp;[@Peter\_Youssef](https://community.dynatrace.com/user/51369),

Thank you very much for your response, but I would like to ask if I use Dynatrace Managed, can I use DQL with the APIv2 [get search log](https://docs.dynatrace.com/managed/discover-dynatrace/references/dynatrace-api/environment-api/log-monitoring-v2/get-search-logs)?

AnLee

---

<div class="post-metadata">

**Author:** ![AnLee](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@AnLee](https://community.dynatrace.com/u/AnLee)\
**Post date:** [January 3, 2025, 4:00am UTC](https://community.dynatrace.com/t/how-to-push-data-from-oneagent-to-a-third-party-storage/49432/5 "2025-01-03T04:00:30Z")

</div>

Hi&nbsp;[@RohitBisht](https://community.dynatrace.com/user/45903),

Thank you very much for your response, but I would like to ask if I use Dynatrace Managed, can I use DQL with the apiv2 [get search log](https://docs.dynatrace.com/managed/discover-dynatrace/references/dynatrace-api/environment-api/log-monitoring-v2/get-search-logs)?

Thank you,  
AnLee

---

<div class="post-metadata">

**Author:** ![RohitBisht](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/rohitbisht/32/38577_2.png) [@RohitBisht](https://community.dynatrace.com/u/RohitBisht)\
**Post date:** [January 3, 2025, 6:16am UTC](https://community.dynatrace.com/t/how-to-push-data-from-oneagent-to-a-third-party-storage/49432/6 "2025-01-03T06:16:38Z")

</div>

Sure you can use this one as well. you may have to test and verify the output as the format will be different for both API’s.&nbsp;  
For use of DQL, i am not sure if we have Grail available yet for managed. Since Grail is only for SAAS right now.

---

<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 3, 2025, 7:49am UTC](https://community.dynatrace.com/t/how-to-push-data-from-oneagent-to-a-third-party-storage/49432/7 "2025-01-03T07:49:08Z")

</div>

Hi,

I would say no, Grail is only available in SaaS tenants.

Best regards
