oneagentctl command-line interface to perform OneAgent reconfiguration at the individual host level. You'll need to update multiple OneAgent communication configuration settings:
- Set OneAgent communication settings
- Set environment ID
- Set environment token
- Set proxy configuration or clear proxy configuration. For details, OneAgent configuration via command-line interface.
How to use oneagentctl
- curl installed on a host
Specifying a wrong
--set-server will lead to OneAgent losing communication with both the previous and the new environment.
There are two scenarios, depending on how OneAgent connects to your Dynatrace Managed environment currently:
- Standalone OneAgent directly connects to your cluster nodes
- Standalone OneAgent uses a Cluster ActiveGate or Environment ActiveGate
If OneAgent connects via an ActiveGate, you need to install a new ActiveGate for your Dynatrace SaaS environment.
- Create a PaaS token – scope PaaS integration - Installer download
- Use the following command to reroute OneAgent to your new Dynatrace environment:
- Linux or AIX:
./oneagentctl --set-server=https://abc123456.live.dynatrace:443 --set-tenant=abc123456 --set-tenant-token=abcdefg123456790 --set-proxy=my-proxy.com --restart-service
.\oneagentctl.exe --set-server=https://abc123456.live.dynatrace.com:443 --set-tenant=abc123456 --set-tenant-token=abcdefg123456790 --set-proxy=my-proxy.com --restart-service
--set-server parameter is used to set a OneAgent communication endpoint. Use the IP address or name. Depending on your deployment, it can be an environment or ActiveGate.
--set-tenant parameter to set an environment ID. By default, this is already set to the correct value. If you're selling Dynatrace-based services, use this option to set your customers' IDs from the pool of IDs you purchased from Dynatrace.
--set-tenant-token parameter sets the environment token, which is used to authenticate communication with the defined endpoint.
You must restart OneAgent and all the applications monitored with deep code modules. Remove
--restart-service from the command to stop and start the OneAgent process manually. For OS-specific instructions, see Linux, Windows, or AIX. You can also use the restart parameter on its own without other parameters. See an example command below.
- Linux or AIX:
./oneagentctl --set-proxy=my-proxy.com --restart-service
.\oneagentctl.exe --set-proxy=my-proxy.com --restart-service
Check if your OneAgent appears on the OneAgent Deployment status page and if monitored applications are instrumented properly. In case of an error, repeat these steps to re-route the OneAgent back to the Managed environment.
For other operation options, see OneAgent configuration via command-line interface.
Visit the Upgrade to SaaS forum to ask questions, get answers, and share what you're learned with others.