Your cluster has been running for years, upgrades keep coming and the team spends more time operating Dynatrace than operating its own services. The decision is made: migrate Dynatrace Managed to SaaS. What remains is doing it without a visibility gap, without losing alerts and without waking the on-call engineer at 3 a.m.
A failed migration is expensive: hosts that stop reporting, forgotten alerting profiles, SLOs that start again from zero. Every hour without data is an hour in which the MTTR of a real incident explodes. The key is to treat the migration as an infrastructure change: inventory, configuration as code, cut-over in waves, a check at every step.
The goal of this guide: a concrete six-step plan, the tools to use (Monaco, oneagentctl, Dynatrace Operator) and the most common pitfalls. It covers both worlds: Dynatrace Managed as the source, Dynatrace SaaS as the target. The commercial migration programme and any assistance tooling depend on your contract: confirm them with your Dynatrace contact.
What migrates and what does not
Before running any command, set expectations with the teams. Three families of objects behave differently.
| Item | Approach | Comment |
|---|---|---|
| Configuration (alerting profiles, management zones, tagging rules, anomaly detection) | Export then import as code (Monaco or Terraform) | Review it: some classic objects have a different equivalent on SaaS |
| Agents (OneAgent, ActiveGate, Operator) | Repoint or reinstall towards the new environment | Done in waves, with a rollback plan |
| Historical data (metrics, traces, logs) | Do not count on it | Plan a period where the Managed cluster stays available |
| Users, groups, tokens | Recreate them in the SaaS account | Tokens are tied to their environment: none survive the migration |
The last point often surprises people. An API token from a Managed environment does not work on a SaaS environment: every integration (CI/CD, OpenTelemetry Collector, scripts) will need a new token.
Prerequisites
- A provisioned Dynatrace SaaS environment and administrator access to the account.
- On Managed: one API token per source environment with configuration read scopes (
ReadConfig,settings.read). - On SaaS: an API token (
WriteConfig,settings.write) and, for platform objects (documents, workflows), an OAuth client or a platform token. - The
monacoCLI installed (binary from theDynatrace/dynatrace-configuration-as-coderepository) and a Git repository to version the export. - An inventory of hosts, Kubernetes clusters and ActiveGates, with their owners.
Migrate Dynatrace Managed to SaaS in six steps
Step 1: inventory and split into waves
List everything that sends data to the cluster. The Cluster API and the environment API return the list of hosts and agent versions; the guide Automating administration with the Cluster API shows how to query it. Then group them into waves: a test environment first, then non-critical services, and production last. Each wave has an owner, a date and a measurable success criterion (for example: 100% of the wave’s hosts visible on SaaS within 30 minutes).
Step 2: export the configuration with Monaco
Declare the Managed environment in a manifest. A Managed environment URL contains the /e/<env-id> path.
manifestVersion: 1.0
projects:
- name: export
environmentGroups:
- name: source
environments:
- name: managed-prod
url:
type: environment
value: MANAGED_URL
auth:
token:
name: MANAGED_TOKEN
Here, type: environment means the value is the name of an environment variable, and token.name names the variable holding the token. Nothing secret is written to the file.
export MANAGED_URL="https://<your-domain>/e/<env-id>"
export MANAGED_TOKEN="dt0c01.XXXX"
monaco download --manifest manifest.yaml --environment managed-prod --output-folder export-managed
Commit the result as is. This first commit is your baseline: any later change will show up in a diff.
Step 3: clean up before importing
A migration is the best moment to pay down debt. Review the export:
- remove alerting profiles and notifications that no longer reach anyone;
- replace hard-coded entity IDs (
HOST-…,SERVICE-…) with tag rules: they will change on SaaS; - merge redundant management zones (see Management zones and automatic tagging);
- note the objects that do not exist in the same form on SaaS, such as some classic dashboards or SLOs, which you will recreate with the platform tools.
Step 4: deploy the configuration to SaaS
Add the target environment to the manifest, then start with a dry run:
environmentGroups:
- name: target
environments:
- name: saas-prod
url:
type: environment
value: SAAS_URL
auth:
token:
name: SAAS_TOKEN
export SAAS_URL="https://<env-id>.live.dynatrace.com"
monaco deploy manifest.yaml --environment saas-prod --dry-run
monaco deploy manifest.yaml --environment saas-prod
--dry-run validates files and references without writing anything. Fix every error in the repository, not in the UI: configuration as code must remain the source of truth.
Step 5: repoint the agents, wave by wave
On a host, oneagentctl changes the communication endpoint without reinstalling. Get the environment ID, the tenant token and the communication URL from the SaaS environment, then:
sudo /opt/dynatrace/oneagent/agent/tools/oneagentctl \
--set-server=https://<env-id>.live.dynatrace.com/communication \
--set-tenant=<env-id> \
--set-tenant-token=<tenant-token> \
--restart-service
The URL must end with /communication. Processes with deep monitoring must be restarted to report to the new environment: schedule this with the application teams. A clean reinstall through your deployment tool (Ansible, for example) remains an option that is easier to audit on large estates.
On Kubernetes, the API URL of a DynaKube cannot be edited in place on recent Dynatrace Operator versions: delete the DynaKube and the secret, recreate the secret with the SaaS tokens, then reapply the DynaKube with the new apiUrl. The initial deployment is covered in Connecting Dynatrace Operator to a cluster.
kubectl delete dynakube dynakube -n dynatrace
kubectl delete secret dynakube -n dynatrace
kubectl -n dynatrace create secret generic dynakube \
--from-literal="apiToken=<OPERATOR_TOKEN>" \
--from-literal="dataIngestToken=<DATA_INGEST_TOKEN>"
kubectl apply -f dynakube-saas.yaml
Step 6: switch the integrations
Replace the URL and token in every client: OTLP exporters, CI/CD pipelines, API scripts, inbound webhooks. Do it with secrets stored in your vault, never hard-coded. Keep the Managed cluster read-only for the comparison period and for as long as you need its historical retention.
How to check that it works
- Agents: on the host,
oneagentctl --get-serverand--get-tenantmust return the SaaS values. In the SaaS environment, the host shows up in the host list within minutes. - Configuration: run
monaco deploy --dry-runagain; no difference should appear. Compare the number of alerting profiles and management zones between source and target. - Data: in a SaaS Notebook, count the hosts sending metrics:
timeseries cpu = avg(dt.host.cpu.usage), by:{dt.entity.host}
| summarize hosts = count()
Compare that number with the wave inventory. A gap points to a forgotten host or one blocked by an outbound firewall.
- Alerting: trigger a test alert and check it reaches the right channel. An alert that never arrives is worse than a noisy one.
Good practices and common pitfalls
- Firewall: hosts must reach the SaaS environment (or an ActiveGate that reaches it) over outbound HTTPS. Open the flows before the wave, not during it.
- Entity IDs: anything that references a hard-coded ID breaks. Tags and entity selectors survive.
- Dual reporting: a host reports to a single environment. To compare, keep reference hosts on Managed instead of trying to send twice.
- Licensing: the SaaS consumption model differs from your Managed contract. Get the estimate validated before the production wave.
- Timing: avoid change freezes and peak periods. The Managed cluster update cycles continue during the migration.
- Communication: publish the status of each wave. A blameless migration is documented like an incident: what worked, what surprised you, what changes for the next wave.
Frequently asked questions
Can Managed historical data be brought into SaaS?
Do not build your plan on that assumption. Plan to keep the Managed cluster reachable for the retention period you need, and ask Dynatrace about the options specific to your contract.
Do I need to reinstall OneAgent?
Not necessarily. oneagentctl is enough to repoint a compatible agent. A reinstall is still useful if the agent is old or if you want to use the migration to standardise installation options.
Monaco or Terraform for the configuration?
Both can export and deploy. Monaco is often faster for a bulk export; Terraform suits teams that already manage their infrastructure with it. Pick a single tool as the source of truth to avoid conflicts.
Conclusion
Migrating Dynatrace Managed to SaaS is run like an infrastructure project: inventory, configuration as code, cut-over in waves, measurable checks. Export with Monaco, clean up, dry-run, then repoint agents in batches. Keep Managed read-only for as long as needed: visibility must never drop during the cut-over.
span.observer is an independent community blog, not affiliated with Dynatrace LLC. Dynatrace is a trademark of its owner. Migration terms, available tools and screen names change: check them in the official documentation and with Dynatrace.
Originally published on span.observer. French version: https://span.observer/fr/migrer-managed-vers-saas/.
Top comments (0)