Migrate OneAgent
Use the 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 unset proxy configuration. For details, OneAgent configuration via command-line interface.
How to use oneagentctl
Requirements:
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 In this case, your SaaS environment's URL is the communication address for your OneAgent instances. You don't need to install anything additionally beforehand.
-
Standalone OneAgent uses a Cluster ActiveGate or Environment ActiveGate In this case, you need to install a new Environment ActiveGate for your target environment. In the procedure below, use ActiveGate's address as a communication address.
To reconfigure OneAgent in place, follow the procedure below:
In your target environment:
- Create an access token – scope PaaS integration - Installer download.
- From the user menu on the right, open the interactive REST API client for Environment API v1.
- Run Deployment API - View connectivity information for OneAgent using the generated token as an authentication.
Save the response from the API call. You'll need data from it in the next step.
Sign in to your target host and 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
- Windows:
.\oneagentctl.exe --set-server=https://abc123456.live.dynatrace.com:443 --set-tenant=abc123456 --set-tenant-token=abcdefg123456790 --set-proxy=my-proxy.com
The --set-server
parameter sets a OneAgent communication endpoint. Use the IP address or name. Depending on your deployment, it can be an environment's or ActiveGate's URL. You can use formattedCommunicationEndpoints
value from the API's response.
The --set-tenant
parameter sets an environment ID. You can use tenantUUID
value from the API's response.
The --set-tenant-token
parameter sets the environment token, which is used to authenticate communication with the defined endpoint. You can use tenantToken
value from the API's response.
After the successful reconfiguration, the OneAgent will be restarted. For other operation options, see OneAgent configuration via command-line interface.
After reconfiguring the OneAgent, you need to restart all the applications monitored with deep code modules.
Check if your OneAgent appears on the OneAgent Deployment status page and if monitored applications are monitored successfully. In case of an error, repeat these steps to reroute the OneAgent to the Managed environment.
Visit the Upgrade to SaaS forum to ask questions, get answers, and share what you've learned with others.