on 02 Jun 2026 02:13 PM
This article helps you troubleshoot log rotation issues that prevent Log module from correctly ingesting your log files. It applies to Log module deployed via OneAgent or Dynatrace Operator on both SaaS and Managed environments, and covers file-based logs on Linux and Windows.
Logs from a rotated file are missing, duplicated, or only partially ingested. Common symptoms include:
Use the table below to check whether the rotation behavior you're seeing is supported. If your scenario is listed as unsupported, jump to the corresponding section for guidance or a workaround.
| Scenario | Support |
|---|---|
Index-based rotation (.1, .2, …) |
✅ Supported |
| Rename-and-replace | ✅ Supported |
| Copy-and-truncate | ✅ Supported (content must not be deleted before the agent reads it) |
| Rotation identifier in filename (date, counter, GUID with separator) | ✅ Supported |
| Fast rotation on CRI-O | ✅ Supported |
| Rotation with directory change | ❌ Not supported |
| Immediate compression after rotation | ❌ Not supported |
| Queue logic (fixed-size file, oldest content removed) | ❌ Not supported |
| Unrecognized rotation identifier | ❌ Not detected |
Symptoms
Cause
The custom log source path does not match both the active file and its rotated counterparts. The most common mistake is placing an extra separator character (such as .) before the # wildcard. That separator exists in the rotated filename but not in the active filename, so the pattern matches only one of them.
Example
Files on disk:
/var/log/app/test.log/var/log/app/test.2026.05.07.log| Configured path | Matches test.log |
Matches test.2026.05.07.log |
Result |
|---|---|---|---|
/var/log/app/test.log |
✅ | ❌ | Active file only; rotated files missed |
/var/log/app/test.#.log |
❌ | ✅ | Rotated files only; active file missed |
/var/log/app/test#.log |
✅ | ✅ | Both active and rotated files ingested |
Resolution
In Settings > Collect and capture > Log Monitoring > Custom log sources, update the custom log source path to remove the separator between the static part of the filename and the # placeholder:
/var/log/app/test.#.log/var/log/app/test#.logChanges propagate to the agent within approximately 90 seconds. New rotated files are picked up at the next rotation scan (every 5 minutes for custom log sources).
Symptoms
Cause (brief)
The Log Module does not follow files that are moved across directory boundaries during rotation. When a rotation tool moves a rotated file to a different directory, Log module loses track of it. Depending on timing, this can result in either data loss or duplicate ingestion.
Resolution
Configure your rotation tool to keep all rotated files in the same directory as the active log file.
Symptoms
app.log.1.gz) appears in the directory, but its content is not ingested..2, .3, …) also show no ingestion because they are also compressed.Cause (brief)
Log Module cannot read compressed files. This is a known limitation.
Workaround
Configure your rotation tool to delay compression. Keep rotated files in their uncompressed form long enough for Log module to read them before compression occurs.
Symptoms
Cause (brief)
If a file is deleted before Log module finishes reading it, the remaining content is lost. This affects:
Current status
This is a known limitation. An improvement is tracked in the product backlog but is not yet available.
Workaround
Try any of the following:
sleep in your post-rotation script before cleanup.Symptoms
Cause
Some applications use a circular-buffer approach: the log file has a fixed maximum size, and the oldest content is removed in place as new content is appended. This rotation model is fundamentally not supported by Log Module.
Workaround
There is no workaround that restores full support for queue-style sources. Consider one of the following: