Can I custom install with command line parameters?

Windows Group Policy and Linux installers can be used with command line parameters when you cannot 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.

How to configure batch agent-install

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 e-mail. 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. This value can be changed during installation via the installer UI.

All parameters are optional—if you skip them using the MSI installer, OneAgent installation won’t fail. However OneAgent won’t be able to communicate with Dynatrace Server.

Linux administrators

The Linux OneAgent installer 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 check what we do to ensure that your security policy isn’t violated. Go to /opt/dynatrace/oneagent/SELinuxPolicy to begin investigating.

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

-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.

INSTALL_PATH For example, /bin/sh Dynatrace-OneAgent-Linux.sh INSTALL_PATH=/data/dynatrace/ This parameter allows installation to a different directory. When this parameter is used, the installer creates the symbolic link /opt/dynatrace/oneagent -> /data/dynatrace and all agent 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 semanage binary to be available on your system.

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 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

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

How does batch agent-install work on Windows?

In addition to an EXE download, we also have an MSI file that you can use with Microsoft Group Policy to remotely install Dynatrace OneAgent on your Windows machines. The MSI installer is not pre-configured like the EXE installer is, but it offers the same functionality. Look for the download link for the MSI file during Windows host monitoring setup page, as shown below:

Download and deploy the installer

Download the archive that contains the installation files. The archive contains an MSI installer file and a batch file with an example command line. Use the command line to deploy agents with the default installation settings. You can add or skip any parameters in the batch command. Typically it’s enough to use settings from the batch file.

Configure your Group Policy:

  • Create a distribution point.
  • Assign a package (the agent MSI installer with parameters).
  • Publish your policy.

Take a look at the Microsoft documentation if you need help.

Each successful agent installation is recorded by Dynatrace. You’ll see that your agent has been successfully deployed once communication is established between your OneAgent and Dynatrace.

Successfully connected agent listed on the installation page.

Once you’ve confirmed that your OneAgent has been deployed to all relevant hosts, continue with monitoring setup.