Dynatrace Ingest CLI — analyzes your system and deploys the best Dynatrace observability method.
dtwiz is a Go CLI that analyzes your system and deploys the best Dynatrace observability method automatically.
Early Development: This project is in active development. If you encounter any bugs or issues, please file a GitHub issue. Contributions and feedback are welcome!
Run the following commands in your terminal/console to install and launch dtwiz:
export DT_ENVIRONMENT="https://<your-tenant-domain>"
export DT_PLATFORM_TOKEN="dt0s16.XXXX..."
source <(curl -sSL https://raw.githubusercontent.com/dynatrace-oss/dtwiz/main/scripts/install.sh)
dtwiz setupRequires bash or zsh. Using
source <(...)makesdtwizavailable in your current terminal immediately — no need to open a new one.
$env:DT_ENVIRONMENT="https://<your-tenant-domain>"
$env:DT_PLATFORM_TOKEN="dt0s16.XXXX..."
irm https://raw.githubusercontent.com/dynatrace-oss/dtwiz/main/scripts/install.ps1 | iex
dtwiz setupSet the following environment variables before running dtwiz:
| Variable | Description |
|---|---|
DT_ENVIRONMENT |
Your Dynatrace environment URL (e.g. https://<your-tenant-domain>) |
DT_PLATFORM_TOKEN |
Platform token (dt0s16.*) — primary credential; used for Platform/DQL and (by default) Classic API calls |
For legacy environments where the platform token lacks Classic API access, opt into a Classic API token (dt0c01.*) by passing --access-token explicitly. It is intentionally not read from DT_ACCESS_TOKEN — so a leftover env var can never silently change which token authenticates Classic API calls.
Recommended: Generate your platform token via the Dynatrace QuickStart app on your own tenant. This is the tested path and provisions the scopes
dtwizneeds.
If you create the token manually, grant the following scopes. This list is a practical baseline covering the ingestion methods dtwiz supports; depending on which methods you install, you may not need all of them, and future features may require additional scopes.
| Group | Scopes |
|---|---|
| API tokens | api-tokens:tokens:read, api-tokens:tokens:write |
| Data acquisition | data-acquisition:events:ingest, data-acquisition:logs:ingest, data-acquisition:metrics:ingest |
| Extensions | extensions:configurations:read, extensions:configurations:write, extensions:definitions:read, extensions:definitions:write |
| Fleet management | fleet-management:activegate.connection-info:read, fleet-management:activegate.tokens:create, fleet-management:activegates:download, fleet-management:activegates:read, fleet-management:activegates:write, fleet-management:cluster-id:read, fleet-management:container-images:read, fleet-management:oneagent.connection-info:read, fleet-management:oneagent.tokens:read, fleet-management:oneagents:download |
| OpenPipeline | openpipeline:bizevents:ingest, openpipeline:events:ingest, openpipeline:events.custom:ingest, openpipeline:events.davis:ingest, openpipeline:events.sdlc:ingest, openpipeline:events.sdlc.custom:ingest, openpipeline:events.smartscape:ingest, openpipeline:logs:ingest, openpipeline:metrics:ingest, openpipeline:security.events:ingest, openpipeline:security.events.custom:ingest, openpipeline:traces:ingest |
| Settings | settings:objects:read, settings:objects:write |
| Storage (Grail) | storage:buckets:read, storage:entities:read, storage:events:read, storage:events:write, storage:files:write, storage:logs:read, storage:logs:write, storage:metrics:read, storage:metrics:write, storage:smartscape:read, storage:spans:read, storage:system:read |
Tenant admins can also consult the DtWiz Ingestion User policy, which is provisioned by default on customer tenants. It captures the scopes and Grail schemas the dtwiz user needs and serves as a reference for what to grant.
Linux / macOS:
source <(curl -sSL https://raw.githubusercontent.com/dynatrace-oss/dtwiz/main/scripts/install.sh)Windows (PowerShell):
irm https://raw.githubusercontent.com/dynatrace-oss/dtwiz/main/scripts/install.ps1 | iexFrom source:
git clone https://github.com/dynatrace-oss/dtwiz.git
cd dtwiz
make install| Channel | Linux / macOS | Windows (PowerShell) |
|---|---|---|
| Latest stable release (default) | source <(curl -sSL .../install.sh) |
irm .../install.ps1 | iex |
Latest main branch snapshot |
DTWIZ_CHANNEL=main source <(curl -sSL .../install.sh) |
$env:DTWIZ_CHANNEL="main"; irm .../install.ps1 | iex |
| Specific PR/branch snapshot | DTWIZ_TAG=snapshot-<branch> source <(curl -sSL .../install.sh) |
$env:DTWIZ_TAG="snapshot-<branch>"; irm .../install.ps1 | iex |
The main channel is rebuilt automatically on every push to main and is intended for testing unreleased changes. It is not recommended for production use.
dtwiz install oneagent follows the system requirements defined by Dynatrace OneAgent. See OneAgent requirements for supported operating systems, architectures, and package manager prerequisites.
dtwiz install otel and dtwiz install otel-collector deploy the Dynatrace Distribution of the OpenTelemetry Collector. Refer to that page for supported collector versions and configuration options.
| Command | Description |
|---|---|
dtwiz setup |
Interactive analyze → recommend → install workflow |
dtwiz analyze |
Detect platform, containers, K8s, existing agents, cloud, and services |
dtwiz recommend |
Generate ranked ingestion recommendations |
dtwiz install oneagent |
Install Dynatrace OneAgent on this host |
dtwiz install kubernetes |
Deploy Dynatrace Operator on Kubernetes |
dtwiz install docker |
Install Dynatrace OneAgent for Docker (experimental; enable with --experimental or DTWIZ_EXPERIMENTAL=true) |
dtwiz install otel |
Install/configure OTel Collector and instrument your application |
dtwiz install otel-collector |
Install the Dynatrace OpenTelemetry Collector only |
dtwiz install otel-java |
Instrument a Java project with OpenTelemetry |
dtwiz install otel-node |
Instrument a Node.js project with OpenTelemetry |
dtwiz install otel-python |
Instrument a Python project with OpenTelemetry |
dtwiz install demo |
Download the "schnitzel" demo app and instrument it end-to-end (experimental; enable with --experimental or DTWIZ_EXPERIMENTAL=true) |
dtwiz install aws |
Set up Dynatrace AWS CloudFormation integration |
dtwiz install aws-lambda |
Install Dynatrace Lambda Layer on all functions |
dtwiz install azure |
Set up Dynatrace Azure Monitor integration |
dtwiz install gcp |
Set up Dynatrace Google Cloud Platform integration |
dtwiz uninstall oneagent |
Uninstall Dynatrace OneAgent from this host |
dtwiz uninstall kubernetes |
Remove Dynatrace Operator and DynaKube resources from Kubernetes |
dtwiz uninstall otel |
Kill running OTel Collector processes and remove installation files |
dtwiz uninstall aws |
Remove the Dynatrace AWS CloudFormation stack and monitoring configuration |
dtwiz uninstall aws-lambda |
Remove Dynatrace Lambda Layer from all functions |
dtwiz uninstall azure |
Remove the Dynatrace Azure Monitor integration |
dtwiz uninstall gcp |
Remove the Dynatrace Google Cloud integration |
dtwiz uninstall self |
Remove the dtwiz binary and its PATH entry |
dtwiz update otel |
Patch an existing OTel Collector config with the Dynatrace exporter |
dtwiz update azure |
Reconcile the Dynatrace Azure Monitor integration's monitoring configuration |
dtwiz update gcp |
Reconcile the Dynatrace Google Cloud integration's monitoring configuration |
dtwiz watch |
Live-watch for newly ingested data in Dynatrace (services, logs, traces, etc.) |
dtwiz status |
Show Dynatrace connection status and system state |
Skip all confirmation prompts and apply changes automatically. Available on all install, update, and uninstall subcommands.
dtwiz install otel --yes
dtwiz uninstall oneagent -yPoint install otel, install otel-python, install otel-java, or install otel-node at a specific project directory instead of scanning interactively.
dtwiz install otel --project ./my-service
dtwiz install otel-python --project ./my-python-appdtwiz install demo sets up a complete end-to-end observability demo in one command:
- Downloads and extracts the schnitzel demo app — a 4-service Python application — into
./schnitzel/in your current directory. - Installs Python if not present (via
brewon macOS,apton Debian/Ubuntu,dnfon RHEL/Fedora,wingeton Windows). - Instruments the app with OpenTelemetry and starts sending traces, metrics, and logs to your Dynatrace environment.
dtwiz install demo # interactive confirmation before applying
dtwiz install demo --yes # skip confirmation# 1. Set credentials
export DT_ENVIRONMENT="https://<your-tenant-domain>"
export DT_PLATFORM_TOKEN="dt0s16.XXXX..."
# 2. Analyze the current system
dtwiz analyze
# 3. Get ranked recommendations
dtwiz recommend
# 4. Install the recommended method (e.g., Kubernetes)
dtwiz install kubernetes
# 5. Check status
dtwiz statusanalyze and recommend support --json for structured output:
dtwiz analyze --json | jq .platform
dtwiz recommend --json | jq '.[0].method'cd dtwiz
make build # builds ./dtwiz binary
make test # runs go test ./...
make install # installs to $GOPATH/bin
make clean # removes build artifactsdtwiz/
├── main.go
├── cmd/
│ ├── root.go # Cobra root + persistent flags
│ ├── auth.go # credential resolution (getDtEnvironment, accessToken, platformToken)
│ ├── analyze.go
│ ├── recommend.go
│ ├── setup.go
│ ├── install.go
│ └── status.go
└── pkg/
├── analyzer/ # System detection (platform, Docker, K8s, agents, cloud, services)
├── recommender/ # Recommendation engine
└── installer/ # Shared utilities + per-method stubs
Credentials are read from the DT_ENVIRONMENT and DT_PLATFORM_TOKEN environment variables (or the --environment / --platform-token flags); a legacy Classic API access token is supplied only via the explicit --access-token flag. dtwiz never stores tokens itself.