/dynatrace:dt-setup-oneagentfrom dynatrace
Provides reference commands and configuration for installing/uninstalling Dynatrace OneAgent across VMs, Kubernetes, AWS Lambda, Windows, and Azure. Returns documented endpoints, env vars, token scopes, and copy-paste-ready commands without executing them.
Ships in dynatrace. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill is reference-only. It contains the documented endpoints, environment variables, token scopes, and commands that an operator (or another agent) needs to install OneAgent manually across the supported targets. It executes nothing.
This skill gives you the commands; it does not run them. Follow the procedure for the target you need, substituting the environment URL and token as documented below.
--create (or explicitly says "yes, create it" after being asked), provisioning exactly the resources documented for that mode is the right thing to do — see Create a new function and install OneAgent in references/aws-lambda.md for the documented set. Don't second-guess the function name the user typed: do not pattern-match on names like "test", "demo", "scratch", "tmp" and refuse, warn, or insist on an alternative. The input is authoritative; the rule above is about silent or unsolicited creation, not user-requested creation.$DT_API_TOKEN or an elided prefix (dt0s16.…, dt0c01.…). Don't paste the literal value into prose.abc12345) and labs vs. prod determine the correct host.aws lambda update-function-configuration does this for both --environment and --layers, so sending only the Dynatrace values silently deletes the function's own variables and any other layers. Always read current state, merge your additions into it, and write the union back. Take a rollback snapshot before the first write. This applies wherever you are about to replace a set rather than add to one.dtctl config current-context returns only the context name (e.g. my-env), not a URL. The URL comes from dtctl config describe-context <ctx>. Do not pipe that straight into jq: some dtctl versions ignore -o json and print a human table (Environment: https://…) while still exiting 0, so jq dies on a parse error and takes any set -e -o pipefail script down with it. Check the output really is JSON first, and fall back to scraping the Environment: line:CTX="$(dtctl config current-context 2>/dev/null || true)"
OUT="$(dtctl config describe-context "$CTX" -o json 2>/dev/null || true)"
if printf '%s' "$OUT" | jq -e . >/dev/null 2>&1; then
DT_ENV_URL="$(printf '%s' "$OUT" | jq -r '.environment // .url // empty')"
else
DT_ENV_URL="$(printf '%s' "$OUT" | awk 'tolower($1) ~ /^(environment|url):$/ {print $2; exit}')"
fi
Dynatrace's "new platform" URLs and the classic OneAgent installer endpoints differ. Before constructing installer URLs, convert:
| Input (Dynatrace UI / docs) | Use for installer endpoints |
|---|---|
https://<id>.apps.dynatrace.com | https://<id>.live.dynatrace.com |
https://<id>.<region>.apps.dynatracelabs.com | https://<id>.<region>.dynatracelabs.com |
| Anything else | unchanged |
The tenant ID is the first dot-separated segment (<id>).
Two token families are in play, and the Authorization scheme is chosen by the token's prefix, not by which endpoint you call:
| Token | Prefix | Header |
|---|---|---|
| Platform token | dt0s16. | Authorization: Bearer <token> |
| Access token (classic API token) | dt0c01. | Authorization: Api-Token <token> |
| PaaS token | dt0s01. | Authorization: Bearer <token> |
| OAuth client secret | dt0s02. / dt0s03. | ❌ not directly usable — must be exchanged for a bearer token first |
Platform tokens are the forward-looking default. Dynatrace is deprecating access tokens: new tenants can no longer create them, and Classic API endpoints are being updated to accept platform tokens. Do not assume a token starts with dt0c01.. The reference implementation of this rule is dtwiz's AuthHeader() (pkg/installer/installer.go): dt0c01.* → Api-Token, everything else → Bearer.
One path hands the token to a component that has historically required a PaaS/access token — if it rejects a platform token, use a dt0c01. access token there:
dynakube secret.VM, remote VM/EC2, Windows and Lambda call the Deployment API directly and work with either family.
For a platform token (dt0s16.), the OneAgent-relevant scopes live under Fleet management: fleet-management:oneagents:download, fleet-management:oneagent.connection-info:read, fleet-management:oneagent.tokens:read, fleet-management:cluster-id:read; Kubernetes additionally wants fleet-management:activegates:download and fleet-management:activegate.tokens:create. Generating the token via the Dynatrace QuickStart app provisions a working set.
For a classic access token (dt0c01.):
| Target | Required token scopes |
|---|---|
| VM / Windows | InstallerDownload (PaaS) |
| Kubernetes | InstallerDownload, settings.read, settings.write, activeGateTokenManagement.create — the Dynatrace UI's "Kubernetes: Dynatrace Operator" template sets all four. |
| Azure VM / VMSS | InstallerDownload (PaaS). Azure side: the caller's az identity needs Contributor or any role granting Microsoft.Compute/.../extensions/write on the resource. |
| AWS Lambda (runtime token) | A connection auth token consumed by the OneAgent layer at runtime. Distinct from the installer token. Create from the Dynatrace UI under Access tokens with entities.read, or use the Hub → AWS Lambda template. |
Tokens are never username-scoped — they belong to the tenant.
Each target has its own reference. They share the rules, URL normalization and token guidance above — read those first, then the one you need.
Managed Kubernetes distributions are covered inside the Kubernetes reference rather than separately: the install is identical and only the node type differs, so the deltas belong next to the procedure they modify.
| Target | Reference |
|---|---|
| VM / server (Linux, macOS) | below — the base case every other target builds on |
| Remote VM / EC2 over SSH | → references/remote-vm-ec2.md |
| Windows host (WSL or native) | → references/windows.md |
| Kubernetes (Operator + DynaKube) — incl. EKS, Fargate and Bottlerocket limits | → references/kubernetes.md |
| AWS Lambda (layer + env vars) | → references/aws-lambda.md |
| Azure VM / VM Scale Set (VM extension) | → references/azure-vm.md |
The table above is organised by install mechanism, because that is what decides the procedure. If you are arriving from a particular cloud instead:
| Platform | What you are deploying to | Go to |
|---|---|---|
| AWS | EC2 instance | remote-vm-ec2.md |
| EKS — EC2 nodes | kubernetes.md | |
| EKS — Fargate or Bottlerocket nodes | kubernetes.md § AWS EKS specifics — full-stack unavailable, applicationMonitoring only | |
| Lambda function | aws-lambda.md | |
| Azure | VM or VM Scale Set | azure-vm.md |
| AKS | kubernetes.md — not the VM extension, even though node pools are VMSSes | |
| Google Cloud | GKE (standard) | kubernetes.md |
| GKE Autopilot | kubernetes.md for the operator path — full-stack is unavailable, as on Bottlerocket. Autopilot-specific tuning is not covered | |
| Compute Engine VM | remote-vm-ec2.md — the SSH procedure is not AWS-specific | |
| On-prem / anywhere else | Linux or macOS you are logged into | below |
| Linux you reach over SSH | remote-vm-ec2.md | |
| Windows | windows.md | |
| Kubernetes, or OpenShift via the standard operator | kubernetes.md — the classic OpenShift node-config-operator route is not covered |
Endpoint (substitute ${DT_ENV_URL_NORMALIZED} and ${ARCH} where ARCH ∈ x86 | arm | ppc64le | s390):
GET ${DT_ENV_URL_NORMALIZED}/api/v1/deployment/installer/agent/unix/default/latest?arch=${ARCH}&flavor=default
Header: Authorization: Api-Token ${DT_API_TOKEN} # dt0c01.… access token
Authorization: Bearer ${DT_API_TOKEN} # dt0s16.… platform token
Install command:
Set the scheme to match your token — Api-Token for dt0c01.…, Bearer for dt0s16.…:
DT_AUTH="Api-Token ${DT_API_TOKEN}" # platform token: DT_AUTH="Bearer ${DT_API_TOKEN}"
wget -O Dynatrace-OneAgent-Linux.sh \
--header="Authorization: ${DT_AUTH}" \
"${DT_ENV_URL_NORMALIZED}/api/v1/deployment/installer/agent/unix/default/latest?arch=${ARCH}&flavor=default"
sudo /bin/sh Dynatrace-OneAgent-Linux.sh \
--set-monitoring-mode=fullstack \
--set-app-log-content-access=true \
[--set-host-group=<name>] \
[--set-network-zone=<zone>]
Restart caveat: OneAgent cannot inject into already-running processes. After install, restart the workloads you want monitored.
Uninstall:
sudo /opt/dynatrace/oneagent/agent/uninstall.sh
Removes the systemd unit, /opt/dynatrace, and the /etc/ld.so.preload line that injects the agent.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Kubernetes, AWS, Azure, Docker
dynatrace, oneagent, installation, infrastructure-monitoring
38 skills in this plugin
/dt-alertingEnd-to-end Dynatrace alerting lifecycle — anomaly detector setup and model selection (static threshold, adaptive baseline, seasonal baseline), alert event storage in Grail, problem grouping and denoising by root cause analysis, and workflow-based notification routing (email, Slack, ServiceNow, webhook). Use when configuring alerting, choosing between detector types, querying alert event history, understanding why alerts merged into a problem, or setting up problem-triggered notifications./dt-app-dashboardsWork with Dynatrace dashboards - create, modify, query, and analyze dashboard JSON including tiles, layouts, DQL queries, variables, and visualizations./dt-app-notebooksWork with Dynatrace notebooks - create, modify, query, and analyze notebook JSON including sections, DQL queries, and visualizations./dt-dql-essentialsCore DQL syntax, pitfalls, query patterns, and query optimization. Load to write, build, fix, or OPTIMIZE a DQL query — prevents syntax errors and makes queries faster, more efficient, and cheaper (less data scanned = lower query consumption/cost per run). Covers fetch commands, data models, field namespaces, time alignment, entity/smartscape patterns, metric discovery, and performance/cost optimization (filter early, bucket filters, short time ranges, field selection, sampling, cardinality). Trigger: "write/build/fix a DQL query", "DQL syntax", "query logs/spans/metrics", "create a timeseries", "optimize my DQL", "make my query faster/cheaper", "reduce DQL cost/consumption/scanned data", "keep DQL cost under control". Do NOT use to explain an existing query or answer product questions. For MONITORING a tenant's ACTUAL query consumption/billing (how much queries cost, who scanned most, cost trends) use dt-platform-costs — this tunes the query text, not billing data./dt-js-runtimeDynatrace server-side JS runtime — function contract, runtime limits, Web APIs, Node.js modules, fetch with credential vault, and the @dynatrace-sdk/* catalog./dt-migrationMigrate Dynatrace classic and Gen2 entity-based DQL to Smartscape equivalents. Covers three scenarios. (1) mass data queries filtered by classic entity conditions — migrate to direct dimension filters first, Smartscape only as fallback; (2) mass data queries using entity subqueries for filtering — same dimension-first strategy; (3) pure entity list queries — migrate fetch dt.entity.* to smartscapeNodes. Also handles entityName, entityAttr, classicEntitySelector, and classic relationship patterns.npx claudepluginhub dynatrace/dynatrace-for-ai --plugin dynatraceOther plugins' skills for the same job