16 Jul 2026 10:42 AM
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?
16 Jul 2026 01:55 PM
Hi,
If you have OneAgent, you can ingest custom logs base on tomcus log course and ingestion rules.
Best regards
16 Jul 2026 07:49 PM
The idea is to not have log files in the first place, so I don't have to write to disk. Something like:
16 Jul 2026 11:19 PM
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
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
Details are explained in Step 5.
Hope this helps 🙂
Featured Posts