Improved configurability of OneAgent log file directory location

If you’re responsible for maintaining your organization’s OneAgent install process or you have particular interest in the OneAgent file footprint on your monitored hosts, this article is for you. Also, if you had concerns about our November 2020 migration of OneAgent logs to /var/log, this is an important follow up for you.

Last November we introduced an even easier OneAgent rollout by freeing up the /opt mount point from any runtime data that’s produced by OneAgents. We changed the location of the OneAgent logs (log files that OneAgent produces for its own diagnostic purposes) to the /var/log/dynatrace/oneagent directory on Linux and AIX systems.

As a much requested follow-up to this, beginning with OneAgent version 1.213, you can configure this location freely (there’s also a migration process for existing customers running OneAgent versions 1.201 and earlier).

Freely define where your OneAgent log files are stored

Our primary goal is to make all our customers happy, with all the possible variety of implementations and standards that they bring to Dynatrace.

Following analysis of the feedback we have received for the OneAgent version 1.203 release (for which we were very grateful) we decided to implement two additional changes to how OneAgent handles its log files.

Fully customizable location of OneAgent files

Starting with OneAgent version 1.213 it is now possible to freely define the location of the log files that are generated by full-stack OneAgent and its modules.

The default location, which was established in version 1.203, remains the /var/log subdirectory. If this location is not acceptable, you can now change it via the installation parameter called LOG_PATH, and thus instruct all OneAgent modules to store their respective logs in a directory of your choosing.

For example adding the parameter LOG_PATH=/opt/logs will result in the creation of Dynatrace specific subdirectories under /opt/logs and consequently all OneAgent logs will be stored there from now on.

The setting is persistent and will be used for all future updates of OneAgent. For other settings and parameters accepted by the OneAgent installer, refer to Dynatrace Help for OS-specific instructions:

Please note the following three important aspects of the solution:

Note 1: The log location setting is a natural sibling to other runtime storage settings which we introduced for OneAgent customization several months ago. You can read about these prior enhancements in the dedicated article. The settings of logs location is another piece of the puzzle of flexible OneAgent file storage configurability.

Note 2: The control of runtime and log location is possible only during the installation or manual upgrade process. Consequently you will not find these settings within the oneagentctl CLI tool, which we provide alongside OneAgent and they cannot be changed on deployed OneAgents without an update.

Note 3: Regardless of where the runtime and log data storage is set, we’ve equipped OneAgent with a powerful file-aging mechanism that assures the safety of the underlying file systems. You can read about how this works in Dynatrace Help.

Easily migrate to old log locations if the /var/log default isn’t right for you

What if the change introduced in November is not welcome and you want to keep logs in the old /opt/dynatrace/oneagent/log location, where they used to be kept? You have two options:

Manual log location migration

This option is applicable regardless of the current OneAgent version. To use it it, OneAgent needs to be updated to version 1.213+ using the manual (triggered on the host) update procedure. The manual update process is identical to full-stack installation and is explained in Dynatrace Help (see instructions for Linux, for Windows or for AIX).

Please note that when executed, the OneAgent installer needs to be instructed of the desired log location via the LOG_PATH parameter.

Automatic log location migration

For customers who decided not to update their OneAgents to 1.203+, we built a special migration mechanism, which will effectively retain the old /opt/dynatrace/oneagent/log log location for all OneAgents in bulk.

To use this option, please reach out to your Dynatrace account manager or a Dynatrace ONE Product Specialist for assistance. The migration is only possible with external Dynatrace assistance.

A prerequisite for the migration process is that OneAgents older than version 1.201 must be first updated to 1.201. This can be done centrally from the Dynatrace web UI or via REST API. For details on the migration, please contact your account manager, Dynatrace ONE, or Dynatrace Services.

Please note that the automatic migration can always be overridden by the manual update process and the LOG_PATH parameter can be set at any later point in time.

Lessons learned

Working on a complex product such like Dynatrace can be challenging.

On one hand, we want to advance the product according to the best industry standards, expectations from our new customers, and “early adopters” of technologies and trends.

On the other hand, we need to satisfy the demands of existing customers who have been with us for many years and who might be a little slower in adapting changes, often due to the sheer size and associated cost of such changes.

Between both groups of customers, the key to success is to listen and adapt.

What we’ve learned here is that with the growing number of Dynatrace customers, we cannot assume anything without careful prior validation. What we’ve also learned is that we have fantastic customers who are ready to provide us with invaluable feedback and product evolution guidelines for even the smallest increments of new functionality we release.

Dynatrace is created with passion by passionate people, and evolved with Agile principles in mind: we iterate on our solution and learn along the way while making the product better all the time. The most recent pair of product iterations should testify to the fact that we are committed to meeting our promises, listening, and adapting to customer needs. Our hope is that you, our customer, will continue to appreciate this approach.

Let us know what you think!

As always, we welcome your feedback and comments. Please continue to share your thoughts via the Dynatrace Community, directly within the product through Dynatrace ONE chat, or with your Dynatrace Account Manager.

Start a free trial!

Dynatrace is free to use for 15 days! The trial stops automatically, no credit card is required. Just enter your email address, choose your cloud location and install our agent.