OneAgent in the installer-based deployment uses a built-in aging mechanism that makes sure the OneAgent files are kept within a reasonable size.
Aging mechanism is not used in the application-only mode.
Optimal OneAgent disk usage is determined based on the following limits:
The two type of files that contribute most to OneAgent disk space usage during its operation are OneAgent log files and runtime data such as crash and memory dumps.
The maximum disk space occupied by OneAgent log files is very well managed by the OneAgent aging mechanism. Logs grow in size slowly and steadily. A continuous cleanup process that runs every minute keeps the log size within reasonable constraints. We designed the log aging mechanism with inside knowledge on how OneAgent-related events are logged, so log file aging doesn't require additional configuration.
Unlike log files, large runtime data files such as crash and memory dumps are generated ad hoc and can cause rapid spikes in disk usage. To mitigate this, use the DATA_STORAGE
installation parameter to specify a custom directory for large runtime data. Locate the custom directory on a resource where tight disk size constraints are not as critical as they are on the disk where OneAgent is installed.
For more information on customizing OneAgent installation, see the OS-specific help: Linux, Windows, or AIX.
In an emergency situation, when free disk space reaches 3%
threshold, OneAgent cleans all the files from directories managed by the aging mechanism except the latest installer logs and OneAgent OS module log
The OneAgent aging mechanism ensures that the disk space used by OneAgent is constantly within predefined limits. To do that, a number of rules are applied to OneAgent directories. If necessary, you can contact a Dynatrace product expert via live chat to modify some of the aging rules.
/var/log/dynatrace/oneagent
%PROGRAMDATA%\dynatrace\oneagent\log
The file aging mechanism checks the files and subdirectories in the main log directory and removes the oldest files when:
There are additional rules for subdirectories:
{log-dir}/process
Files are removed when any of these conditions are true:
{log-dir}/installer
Files are removed when any of these conditions are true:
driver.log
file is preserved.{log-dir}/dumpproc
Files are removed when any of these conditions are true:
Linux/AIX /var/lib/dynatrace/oneagent/datastorage
Windows %PROGRAMDATA%\dynatrace\oneagent\datastorage
{data_storage_dir}/supportalerts
Files are removed when any of these conditions are true:
{data_storage_dir}/memorydump
Files are removed when any of these conditions are true:
{data_storage_dir}/crashreports
Files are removed when any of these conditions are true:
/var/lib/dynatrace/oneagent/agent/runtime
%PROGRAMDATA%\dynatrace\oneagent\agent\runtime
The OneAgent file aging mechanism checks the subdirectories starting with 0x
. Checks are performed recursively.
0x*
directory contains a dump subdirectory and all the files in it are older than 3 days, then the dump subdirectory is removed.0x*
directory are older than 7 days, the whole directory is removed.Linux/AIX /opt/dynatrace/oneagent/bin
Windows %PROGRAMFILES%\dynatrace\oneagent\bin
{install-dir}/bin
OneAgent deploys a number of file artifacts during the update process, specifically in cases of injectable technology modules. All injectable module files are stored in versioned folders. When OneAgent is active, it performs file cleanup according to the following criteria:
bin
directory and all the unused binaries from the 32
and 64
bitness directories are removed. For the binaries from the any
directory, the OneAgent aging mechanism keeps the most recent 11 versions, including the current version and the 10 most recent earlier versions.If you don't have access to the infrastructure layer, Dynatrace also provides the option of application-only monitoring for Kubernetes, OpenShift, CloudFoundry or SAP Business Technology Platform.
The aging mechanism in application-only monitoring mode manages the logs of the OneAgent modules. All of them are located in the respective subdirectories of the default OneAgent log directory:
/var/log/dynatrace/oneagent
%PROGRAMDATA%\dynatrace\oneagent\log
Each OneAgent module limits its number of logs to 5. Each of these 5 files is limited to 10 MB.
OneAgent purges the log files at startup when:
To prevent unnecessary delays in your application's startup, the OneAgent bulk purge limit is set to delete a maximum of 50 of the oldest files.