Lab 3 - Install Dynatrace Agent

Return to Workshop

Deploy the Dynatrace OneAgent Operator on OpenShift 4.4+

Prerequisites: 1) If no existing account, sign-up for a trial with Dynatrace at 2) Dynatrace API Token from Settings > Integration > Dynatrace API > Generate Token Activate the following settings: * Access problem and event feed, metrics, and topology * Read log content * Write configuration 3) Dynatrace PaaS token PaaS (used to download OneAgent and ActiveGate installers) from Settings > Integration > Platform as a Service > Generate Token 4) apiUrl - URL to the API of your Dynatrace environment. In Dynatrace SaaS it will look like e.g. In Dynatrace Managed it will look like https:///e//api e.g.
oc new-project dynatrace

oc -n dynatrace create secret generic oneagent \
--from-literal="apiToken=<API token>" --from-literal="paasToken=<PaaS token>"
You may update this Secret at any time to rotate the tokens. Check the latest release at
oc apply -f \ configured configured created
serviceaccount/dynatrace-oneagent created
serviceaccount/dynatrace-oneagent-operator created
serviceaccount/dynatrace-oneagent-webhook created created created created created created created created created
service/dynatrace-oneagent-webhook created
deployment.apps/dynatrace-oneagent-operator created
deployment.apps/dynatrace-oneagent-webhook created created
curl -o cr.yaml
Update the custom resource (cr.yaml) with apiUrl and the name of secret we create above ("oneagent"). e.g. apiUrl: tokens: "oneagent" as shown below.
kind: OneAgent
  # a descriptive name for this object.
  # all created child objects will be based on it.
  name: oneagent
  namespace: dynatrace
  # dynatrace api url including `/api` path at the end
  # either set ENVIRONMENTID to the proper tenant id or change the apiUrl as a whole, e.q. for Managed
  # disable certificate validation checks for installer download and API communication
  skipCertCheck: false
  # name of secret holding `apiToken` and `paasToken`
  # if unset, name of custom resource is used
  tokens: "oneagent"
If you want Dynatrace to monitor OpenShift Service Mesh deployments, set
enableIstio: true
Apply the modified custom resource (cr.yaml)
oc apply -f cr.yaml configured
oc get pods
NAME                                           READY   STATUS    RESTARTS   AGE
dynatrace-oneagent-operator-788fd7f5b4-6lt67   1/1     Running   0          4m21s
dynatrace-oneagent-webhook-84747567df-lmltw    2/2     Running   0          4m21s
oneagent-4j9xf                                 0/1     Running   0          102s
oneagent-55p2k                                 0/1     Running   0          106s
oneagent-b7qlb                                 0/1     Running   0          108s
oneagent-jhk2f                                 0/1     Running   0          107s
oc logs oneagent-jhk2f
23:19:49 Started agent deployment as a container, PID 1352627.
23:19:49 Downloading agent to /tmp/ via***&arch=x86&flavor=default
23:20:18 Download complete
23:20:18 Downloaded version:
23:20:18 Verifying agent installer signature
23:20:21 Verification successful
23:20:21 Deploying to: /mnt/host_root
23:20:21 Starting installer...
23:20:22 Warning: Parameter APP_LOG_CONTENT_ACCESS is deprecated and will be removed in future release. Please use --set-app-log-content-access instead. For details, see
23:20:23 Checking root privileges...
23:20:23 OK
23:20:23 Installation started, version, build date: 20.07.2020, PID 1352627.
23:20:25 Detected platform: LINUX arch: X86
23:20:25 Detected bitness: 64
23:20:25 Checking free space in /opt/dynatrace/oneagent
23:20:27 Extracting...
23:20:28 Unpacking. This may take a few minutes...
23:20:52 Unpacking complete.
23:20:52 Moving new binaries into lib folders...
23:20:54 User 'dtuser' added successfully.
23:20:57 Non-privileged mode is enabled.
23:20:57 Applying agent configuration
23:20:58 Storing SELinux policy sources in /opt/dynatrace/oneagent/agent.
23:20:58 Installing SELinux Dynatrace module. This may take a while...
23:21:35 dynatrace_oneagent module was successfully installed
If you are using NFS, please see

Workshop Details

Domain Red Hat Logo
Student ID

Return to Workshop