Setup Dynatrace

In order to evaluate the quality gates, we have to set up monitoring to provide the needed data.

Setup Dynatrace

  1. Get your Dynatrace Tenant

    If you don’t have a Dynatrace tenant yet, sign up for a free trial or a developer account.

    Please note that if you bring your own tenant, the current version of keptn only supports Dynatrace SaaS tenants. Support for Dynatrace Managed is planned for future releases.

  2. Create a Dynatrace API Token

    Log in to your Dynatrace tenant, and go to Settings > Integration > Dynatrace API. Then, create a new API Token with the following permissions:

    • Access problem and event feed, metrics and topology
    • Access logs
    • Configure maintenance windows
    • Read configuration
    • Write configuration
    • Capture request data
    • Real user monitoring JavaScript tag management
    Dynatrace API token
  3. Create a Dynatrace PaaS Token

    In your Dynatrace tenant, go to Settings > Integration > Platform as a Service, and create a new PaaS Token.

  4. Start the following script:

    $ ./
  5. Execute the installation script:

    $ ./

When this script is finished, the Dynatrace OneAgent will be deployed in your cluster.

Note 1: To see the services running in your cluster, make sure to restart the pods they are running in.

  kubectl delete pods --all -n keptn

Note 2: If the nodes in your cluster run on Container-Optimized OS (cos), make sure to follow the instructions for setting up the Dynatrace OneAgent Operator. This means that after the initial setup with, which is a step below, the cr.yml has to be edited and applied again. In addition, all pods have to be restarted.

Configure Jenkins

  1. Go to Jenkins at http://jenkins.keptn.<EXTERNAL_IP> and login with the default credentials admin / AiTx4u8VyUV8tCKk or with the updated credentials you set after the installation. You can retrieve the URL of Jenkins with the following command:

    echo http://jenkins.keptn.$(kubectl describe svc istio-ingressgateway -n istio-system | grep "LoadBalancer Ingress:" | sed 's~LoadBalancer Ingress:[ \t]*~~')
  2. In the Jenkins > Manage Jenkins > Configure System screen, scroll to the environment variables and Add two new environment variables:

    • DT_TENANT_URL with the Dynatrace tenant URL as value
    • DT_API_TOKEN with the Dynatrace API token as value
      Jenkins environment variables

(Optional) Create process group naming rule in Dynatrace

  1. Create a naming rule for process groups

    1. Go to Settings, Process and containers, and click on Process group naming.
    2. Create a new process group naming rule with Add new rule.
    3. Edit that rule:
      • Rule name: Container.Namespace
      • Process group name format: {ProcessGroup:KubernetesContainerName}.{ProcessGroup:KubernetesNamespace}
      • Condition: Kubernetes namespace> exits
    4. Click on Preview and Save.

    Screenshot shows this rule definition.

    Dynatrace naming rule