Can I perform a custom installation with command line parameters?

Windows Group Policy and Linux installers can be used with command line parameters when you can't use the default settings, such as proxy IP address detection or your Dynatrace environment ID. Using parameters to control installers is not necessary in most scenarios because the installer package you download detects proxy settings and knows the address of your Dynatrace server.

You can provide Windows MSI and Linux installers with the following parameters:

SERVER - The address of the Dynatrace Server. Use the IP address or a name. Add the port number following a colon, for example http://100.20.10.1:8020.

TENANT - Your Dynatrace environment ID. You received this ID with your activation email. By default, this setting is already set to the correct value. If you’re selling Dynatrace-based services, use this option to set your customers’ IDs (available from the pool of IDs you purchased from Dynatrace).

TENANT_TOKEN - Your Dynatrace environment authorization token.

PROXY - The address of the proxy server. Use the IP address or a name. Add the port number following a colon, for example 172.1.1.128:8080. We also support IPv6 addresses. Skip the PROXY parameter to force the installer to auto detect or ask for proxy details. If you want the installer to ignore proxy detection or want to skip entering proxy details, type NO_PROXY as the PROXY parameter value.

APP_LOG_CONTENT_ACCESS - When set to true, allows Dynatrace OneAgent to access log files for the purpose of log analytics. You have the option of defining this during setting during installation via the OneAgent installer. Accepted values are (true, false) or (1, 0).

Note

All parameters are optional. If you don't include them when using the MSI installer, OneAgent installation won’t fail. However, OneAgent won’t be able to communicate with Dynatrace Server.

Tips for Linux administrators

The OneAgent installer for Linux works like any other script. Use it in any way you see fit, including within advanced configuration management systems such as Chef or Puppet.

The Linux script accepts additional parameters related to security policies and custom installation directories:

-p preserves SELinux policy sources after compilation. We want to be as transparent as possible. With this parameter enabled, you can see what we do to ensure that your security policy isn’t violated. Go to /opt/dynatrace/oneagent/SELinuxPolicy to begin investigating.

-n makes the installer skip SELinux policy installation. If you use this parameter and SELinux policy is active on your system, you’ll need to create a custom policy rule for OneAgent yourself. Note that you don’t have to use this parameter if SELinux is disabled on your server.

Note

For Dynatrace OneAgent versions 102 and earlier, your security policy can be found at /opt/ruxit/SELinuxPolicy.

INSTALL_PATH allows installation to a different directory. For example: /bin/sh Dynatrace-OneAgent-Linux.sh INSTALL_PATH=/data/dynatrace/. When this parameter is used, the installer creates the symbolic link /opt/dynatrace/oneagent -> /data/dynatrace and all OneAgent files are placed in the specified directory (in this example, /data/dynatrace). Note that this symbolic link needs to be removed manually, once OneAgent has been uninstalled. Using this parameter when SELinux is enabled requires that the semanage binary be available on your system.

USER specifies the name of the unprivileged (non-root) user, which is used by unprivileged OneAgent processes. Unprivileged processes are those that don't need root privileges. These processes on Linux are called Network OneAgent and Plugin OneAgent. The default behavior is that Dynatrace installer uses dtuser for the name of the unprivileged user. If USER=<username> parameter is specified, then the installer uses <username> as the name of the unprivileged user. In both cases, Dynatrace installer checks whether a required user (dtuser or specified by USER parameter) already exists in the system. If a user exists, then this user is used to start the Network OneAgent and the Plugin OneAgent processes. If a user doesn't exist, then the Dynatrace installer creates this user and later starts these unprivileged processes with this new user.

Note

  • The uninstall process doesn't delete the unprivileged user from the system (whether or not it's dtuser or specified by the USER parameter).
  • The unprivileged username is preserved during upgrades, unless a new username is specified during upgrade.

Tips for Windows administrators

The archive you download for automated installs contains a batch file. Use this file as a template and edit the parameter values as required. In addition to the parameters listed above, you can provide Windows with the following parameter:

INSTALLATION.LOG - Path to the file where the installation log is to be stored.

Note

Parameter names are case sensitive. Use ALL CAPS for parameter names.

How to perform a silent installation in Windows

With silent installation, the Dynatrace installer is pre-configured with parameter values that you define. This means that dialogs won't be generated during installation and no human interaction is required.

To set up silent command line installation, add /quiet /qn as shown here:

msiexec /i Dynatrace-OneAgent-Windows-1.114.0.20170202-225117.msi SERVER="https://someserver.com" TENANT="xxx" TENANT_TOKEN="xxx" INSTALL_PATH="c:\test dir" /quiet /qn