Migrate configuration
The best way to migrate your Dynatrace Managed environments’ configuration to Dynatrace is to leverage Configuration as Code.
Configuration as Code is a tool that automates the deployment of a Dynatrace configuration to one or more Dynatrace environments. Configuration as Code’s self-service approach enables development teams to set up monitoring and observability quickly and efficiently, even for large-scale applications. It reduces the manual work for monitoring teams.
Configuration as Code’s approach enables you to manage your Dynatrace environment monitoring tasks through configuration files instead of a graphical user interface. Configuration files allow you to create, update, and manage your monitoring configurations safely, consistently, and repetitively. They can be reused, versioned, and shared within your team.
Migrate your configuration
- Follow the instructions to Install Dynatrace Configuration as Code on a host with network access to your Dynatrace Managed cluster (for example, to the cluster node itself).
- Create a deployment manifest:
manifest.yaml
- For each environment that you want to migrate, add a configuration:
-
Go to the environment’s web UI, navigate to Access tokens, and Generate new token.
-
Type a token name and set a feasible expiration date.
-
Select the scopes below:
- Read configuration
- Read settings
- Read SLO
- Access problem and event feed, metrics, and topology
- Create and read synthetic monitors, locations, and nodes
-
Store the token in a secret place. For example, use a password manager.
-
Create an operating system environment variable with the token value. For example, on Linux systems:
export ENV_TOKEN_PRODUCTION_FIN= dt0c01.abc123.abcdefjhij1234567890
-
Add the environment data to the manifest.yaml:
- Add the name into the
projects
field - In the managed environmentGroup, input the URL with a token
Example of environments.yaml:
manifestVersion: 1.0 projects: - name: production-fin - name: production-logistics environmentGroups: - name: managed environments: - name: production-fin url: value: https://foo123.dynatrace-managed.com/e/1231aaa1-1111-434e-8111-11abcd1234a1 token: name: MIGRATION_TOKEN_PROD_FIN - name: production-logistics url: value: https://foo123.dynatrace-managed.com/e/2345bbb3-3333-456b-1566622abcd3456a1 token: name: MIGRATION_TOKEN_PROD_LOGISTICS
- Add the name into the
-
- Run Monaco using the download command
monaco download manifest manifest.yaml
- Create your SaaS environment configuration. Apply the steps described in step 3, but set the token scope as follows:
- Read Configuration
- Write Configuration
- Read settings
- Write settings
- Read SLO
- Write SLO
- Access problem and event feed, metrics, and topology
- Create and read synthetic monitors, locations, and nodes
- Store the token in a secure place (for example, use a password manager)
- Change data privacy settings Example:
environmentGroups:
- name: saas
environments:
- name: abc1234456
url:
value: https://abc1234456.live.dynatrace.com
token:
name: ENV_TOKEN_SAAS
- Run Monaco using the deploy command:
monaco deploy -e saas
- Resolve problems and conflicts as stated in the output log.
Use
skipDeployment: "true"
for unsupported or duplicated configurations and recreate them manually.
Now your configuration should be replicated in your new SaaS environment.
Visit the Upgrade to SaaS forum to ask questions, get answers, and share what you're learned with others.