# dynatrace\_ingest for logs?

**URL:** <https://community.dynatrace.com/t/dynatrace-ingest-for-logs/56478>\
**Category:** Open Q&A\
**Tags:** oneagent, data-ingest, logs\
**Created:** [July 16, 2026, 9:42am UTC](https://community.dynatrace.com/t/dynatrace-ingest-for-logs/56478 "2026-07-16T09:42:13Z")\
**Posts on this page:** 11\
**Page:** 1

<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:** [July 16, 2026, 9:42am UTC](https://community.dynatrace.com/t/dynatrace-ingest-for-logs/56478/1 "2026-07-16T09:42:13Z")

</div>

dynatrace\_ingest can ingest metrics locally. But if we want to ingest logs locally, suggested way is with a curl command.  
Is there a way to pipe output from a Linux/Windows command, through dynatrace\_ingest, or something similar?

---

<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:** [July 16, 2026, 12:55pm UTC](https://community.dynatrace.com/t/dynatrace-ingest-for-logs/56478/2 "2026-07-16T12:55:53Z")

</div>

Hi,

If you have OneAgent, you can ingest custom logs base on tomcus&nbsp;log course and ingestion rules.

Best regards

---

<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:** [July 16, 2026, 6:49pm UTC](https://community.dynatrace.com/t/dynatrace-ingest-for-logs/56478/3 "2026-07-16T18:49:10Z")

</div>

[@AntonPineiro](https://community.dynatrace.com/user/58682)&nbsp;,

The idea is to not have log files in the first place, so I don’t have to write to disk. Something like:

- ./my\_program -v | dynatrace\_ingest

---

<div class="post-metadata">

**Author:** ![JustSchwendi](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/justschwendi/32/32925_2.png) [@JustSchwendi](https://community.dynatrace.com/u/JustSchwendi)\
**Post date:** [July 16, 2026, 10:19pm UTC](https://community.dynatrace.com/t/dynatrace-ingest-for-logs/56478/4 "2026-07-16T22:19:28Z")

</div>

You mean ingest logs from local to SaaS cluster?  
For this use case, you would use the log ingest API and curl, or powershell.  
You first need to create an API log.ingest token and then run somthing like

```markup
tail -f /var/log/syslog | while read line; do
curl -X POST "http://<tenantFQDN>/v2/logs/ingest" \
-H "Content-Type: application/json" \
-H "Authorization: Api-Token <your-token>" \
-d "{\"content\": \"$line\"}"
done

```

In this blog, OTel was used to ingest logs extracted from a local json file on a raspberry pi:  
[Leverage edge IoT data with OpenTelemetry and Dynatrace](https://www.dynatrace.com/news/blog/leverage-edge-iot-data-with-opentelemetry-and-dynatrace/)  
Details are explained in Step 5.

Hope this helps 🙂

---

<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:** [July 17, 2026, 6:55am UTC](https://community.dynatrace.com/t/dynatrace-ingest-for-logs/56478/5 "2026-07-17T06:55:55Z")

</div>

Hi,

I understand your point now. I am not aware that is possible.

Best regards

---

<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:** [July 17, 2026, 8:09am UTC](https://community.dynatrace.com/t/dynatrace-ingest-for-logs/56478/6 "2026-07-17T08:09:16Z")

</div>

[@JustSchwendi](https://community.dynatrace.com/user/75414)&nbsp;,

As said below, the idea is to not have log files at all.&nbsp;nd also not having tokens and other configurations. If you ingest locally, you don’t need it:&nbsp;[OneAgent log ingest API — Dynatrace Docs](https://docs.dynatrace.com/docs/ingest-from/extend-dynatrace/extend-logs/oneagent-log-ingest-api)

My idea was just using something like dynatrace\_ingest ([link](https://docs.dynatrace.com/docs/ingest-from/extend-dynatrace/extend-metrics/ingestion-methods/oneagent-pipe)) to ingest locally without any other configuration. But it doesn’t seem to exist, so creating a Product Idea:&nbsp;[https://community.dynatrace.com/t5/Ideas/dynatrace-ingest-for-logs/idi-p/302055](https://community.dynatrace.com/post/302055)

BTW, loved the blog post; hadn’t seen it before.

---

<div class="post-metadata">

**Author:** ![dylan\_taelemans](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dylan_taelemans/32/21501_2.png) [@dylan\_taelemans](https://community.dynatrace.com/u/dylan_taelemans)\
**Post date:** [July 17, 2026, 8:33am UTC](https://community.dynatrace.com/t/dynatrace-ingest-for-logs/56478/7 "2026-07-17T08:33:16Z")

</div>

[@AntonioSousa](https://community.dynatrace.com/user/17213)&nbsp;  
I believe this can be done without a token or additional configuration by using the OneAgent localhost API:

> **[OneAgent log ingest API](https://docs.dynatrace.com/docs/ingest-from/extend-dynatrace/extend-logs/oneagent-log-ingest-api)**
>
> Use the Dynatrace API to push locally retrieved logs to Dynatrace.

So it would be similar to the solution proposed by [@JustSchwendi](https://community.dynatrace.com/user/75414)&nbsp;, but using the localhost endpoint instead. This removes the need for:

```auto
-H "Authorization: Api-Token <your-token>"

```

It is not as straightforward to use as dynatrace\_ingest, but it could be a valid alternative depending on the use case and requirements.

The idea would be to pipe the output of your commands to curl, which then forwards the data to the local OneAgent endpoint.

Example using ls just to keep it simple:

```markup
ls | jq -Rs '{content: .}' | curl \
-H "Content-Type: application/json" \
-X POST \
-d @- \
http://localhost:14499/v2/logs/ingest

```

Note: the jq -Rs ‘{content: .}’ part is only used to convert the output lines into the required JSON format.

If your script (./my\_program) could already output the data in the expected JSON format, for example:

```auto
{"content": "YOUR_CONTENT"}

```

then jq would no longer be needed.

---

<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:** [July 17, 2026, 11:09am UTC](https://community.dynatrace.com/t/dynatrace-ingest-for-logs/56478/8 "2026-07-17T11:09:36Z")

</div>

[@dylan\_taelemans](https://community.dynatrace.com/user/19639)&nbsp;,  
Yes, I know I can do it with curl, as I posted initially in the thread.  
The question is if dynatrace\_ingest could do it.

BTW, the reservation against curl is a security one: they don’t want it to be used…

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [July 17, 2026, 11:15am UTC](https://community.dynatrace.com/t/dynatrace-ingest-for-logs/56478/9 "2026-07-17T11:15:35Z")

</div>

Afaik dynatrace\_ingest does it by HTTP POST anyway.

---

<div class="post-metadata">

**Author:** ![dylan\_taelemans](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dylan_taelemans/32/21501_2.png) [@dylan\_taelemans](https://community.dynatrace.com/u/dylan_taelemans)\
**Post date:** [July 17, 2026, 11:21am UTC](https://community.dynatrace.com/t/dynatrace-ingest-for-logs/56478/10 "2026-07-17T11:21:09Z")

</div>

Okay, I focused on your reply to [@JustSchwendi](https://community.dynatrace.com/user/75414).

> > ==\> As said below, the idea is to not have log files at all. nd also not having tokens and other configurations.

Therefore, I proposed a solution that does not require log files, tokens, or any additional configuration.

I don’t think there is another way to achieve this, so the Product Idea is indeed the only remaining option.

Regarding the concern about curl being a security issue: I believe the script behind the dynatrace\_ingest tool uses curl as well, or at least something with the same functionality. However, this should probably be validated/confirmed to be sure.

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [July 17, 2026, 1:22pm UTC](https://community.dynatrace.com/t/dynatrace-ingest-for-logs/56478/11 "2026-07-17T13:22:59Z")

</div>

There are many options how to do a&nbsp;HTTP POST locally on http port. You can use printf + netcat or even bash redirection (if enabled).

Curious what security issue does curl pose?
