OneAgent configuration via command-line interface

OneAgent v1.161

Use the oneagentutil command-line interface to perform some post-installation OneAgent configuration at the individual host level.

The interface is available on Windows, Linux, and AIX. You need privileged access to use it (Windows administrator or Linux/AIX root). If you try to run oneagentutil in a non-admin Windows console, Windows will display a User Account Control pop-up and fail.

oneagentutil is located in:

  • Linux and AIX
    /opt/dynatrace/oneagent/agent/tools/lib64/oneagentutil 64-bit systems /opt/dynatrace/oneagent/agent/tools/lib64/oneagentutil 32-bit systems
  • Windows
    C:\Program Files (x86)\dynatrace\oneagent\agent\tools\lib64 64-bit systems
    C:\Program Files (x86)\dynatrace\oneagent\agent\tools\lib 32-bit systems

Host groups

You can use the oneagentutil command-line interface to perform the following configuration actions for host groups.

This is an EAP feature available since OneAgent version 1.161. Register for the EAP to participate.

Change host group assignment

Use --set-host-group parameter to change the host group assignment.

Perform the following steps to assign the host to MyHostGroup:

  1. Stop OneAgent. Linux, Windows, AIX.
  2. Go to oneagentutil directory.
  3. Run the following command:
    oneagentutil --set-host-group MyHostGroup
  4. Restart all the services monitored on the host.
  5. Start OneAgent. Linux, Windows, AIX.

Note: The host group string can only contain alphanumeric characters, hyphens, underscores, and periods. It must not start with dt. and the maximum length is 100 characters.

Clear host group assignment

Use --set-host-group parameter without a value to clear the host group assignment. For example:
oneagentutil --set-host-group ""

Diplay host group assignment

Use --get-host-group parameter to display the current host group assignment. For example:
oneagentutil --get-host-group

For more information on host groups, see Organize your environment using host groups.

Display help

Use --help to display all supported parameters.