Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms


dynatraceoneagent (2) Versions 0.2.0

Installs the Dynatrace OneAgent.

cookbook 'dynatraceoneagent', '~> 0.2.0'
cookbook 'dynatraceoneagent', '~> 0.2.0', :supermarket
knife supermarket install dynatraceoneagent
knife supermarket download dynatraceoneagent
Quality 100%

dynatraceoneagent Cookbook

Cookbook Version

This cookbook deploys the Dynatrace OneAgent on Linux and Windows Operating Systems with different available configurations and ensures the OneAgent service maintains a running state.


  • OneAgent version 1.199+
  • Dynatrace version 1.204+


  • Linux
  • Windows

Visit Supported technologies and versions for further information about all environments, technologies, and versions that can be monitored with Dynatrace.

Setup requirements

You will then need to supply the dynatraceoneagent cookbook with two critical pieces of information.

  • The Dynatrace environment URL: Managed https://{your-domain}/e/{your-environment-id} | SaaS https://{your-environment-id}
  • The PaaS token of your environment for downloading the OneAgent installer

Refer to the customize OneAgent installation documentation on Dynatrace Supported Operating Systems. This module uses the Dynatrace deployment API for downloading the installer for each supported OS. See Deployment API.


  • Chef 14+


  • node['dynatraceoneagent']['dynatrace_environment_url']

    • String. URL of your dynatrace Tenant. Managed https://{your-domain}/e/{your-environment-id} - SaaS https://{your-environment-id}, default nil.
  • node['dynatraceoneagent']['dynatrace_paas_token']

    • String. Paas token for downloading the OneAgent installer, default nil.
  • node['dynatraceoneagent']['oneagent_version']

    • String. The required version of the OneAgent in format, default latest.
  • node['dynatraceoneagent']['oneagent_installer_architecture']

    • String. The architecture of your OS, default x86.
  • node['dynatraceoneagent']['oneagent_installer_type']

    • String. The type of the installer, default default.
  • node['dynatraceoneagent']['oneagent_download_dir']

    • String. OneAgent installer file download directory - default Linux /tmp, Windows $TEMP
  • node['dynatraceoneagent']['verify_installer_signature']

    • Boolean. Verify OneAgent installer signature (Linux only) - default true
  • node['dynatraceoneagent']['oneagent_preserve_installer']

    • Boolean. Preserve installers on a managed node after deployment, default true.
  • node['dynatraceoneagent']['oneagent_install_params_hash']

    • Hash. Hash map of additional parameters to pass to the installer. Refer to the Customize OneAgent installation documentation on Dynatrace Supported Operating Systems. Default { '--set-infra-only' => 'false', '--set-app-log-content-access' => 'true', }
  • node['dynatraceoneagent']['oneagent_service_state']

    • Array. What state the Dynatrace OneAgent service should be in - default [:enabled, :start]
  • node['dynatraceoneagent']['oneagent_package_state']

    • String. What state the dynatrace oneagent package should be in - default installed Allowed values: installed, removed

<!-- ## Automatically Set Attributes

These attributes are set based on other set attributes, as well as platform / system information provided by Ohai

  • node['dynatraceoneagent']['oneagent_installer_filename']

    • String. OneAgent installer filename.
  • node['dynatraceoneagent']['dynatrace_deployment_api']

    • String. Dynatrace deployment API. Default - /api/v1/deployment/installer/agent
  • node['dynatraceoneagent']['oneagent_os_type']

    • String. OS Type used for downloading the OneAgent installer binary.
  • node['dynatraceoneagent']['oneagent_installer_path']

    • String. File path of OneAgent installer.
  • node['dynatraceoneagent']['dynatrace_root_cert_file_name']

    • String. Name of the Dynatrace root certificarte file - default dt-root.cert.pem
  • node['dynatraceoneagent']['dynatrace_root_cert_path']

    • String. Path of the Dynatrace root certificate file.
  • node['dynatraceoneagent']['oneagent_certificate_verification_header']

    • String. OneAgent certificate verification header.
  • node['dynatraceoneagent']['oneagent_ctl_bin_path']

    • String. Path of oneagentctl binary.
  • node['dynatraceoneagent']['oneagent_service']

    • String. OneAgent service name.




Include the default recipe in a run list, to get dynatraceoneagent.


This recipe downloads the OneAgent installer binary.


This recipe deletes the OneAgent installer after deployment. On Linux it will also delete the Dynatrace root certificate.


Installs the Dynatrace OneAgent on Linux machines, optionally it will also verify the installer signature.


Uninstalls the Dynatrace OneAgent on Linux machines.


Manages the Dynatrace OneAgent service on both Linux and Windows.


Installs the Dynatrace OneAgent on Windows machines.


Uninstalls the Dynatrace OneAgent on Windows machines.


Set up the dynatraceoneagent attributes in a role.

Roles Examples

Most basic OneAgent installation using a SAAS tenant

name 'dynatraceoneagent'
description 'Deploy Dynatrace OneAgent'
  'dynatraceoneagent' => {
    'dynatrace_environment_url' => 'https://{your-environment-id}',
    'dynatrace_paas_token'      => '{your-paas-token}'

OneAgent installation using a managed tenant with a specific version

The required version of the OneAgent must be in format. See Deployment API - GET available versions of OneAgent

name 'dynatraceoneagent'
description 'Deploy Dynatrace OneAgent'
  'dynatraceoneagent' => {
    'dynatrace_environment_url' => 'https://{your-domain}/e/{your-environment-id}',
    'dynatrace_paas_token'      => '{your-paas-token}',
    'oneagent_version'          => ''

Verify Installer Signature (Linux Only)

Set the verify_installer_signature parameter to true if chef should verify the signature of the OneAgent Linux installer script prior to installation. If set to true, chef will download the dynatrace root certificate file to the download_dir set value on the managed node. If the verification fails, the recipe will exit with an error code and won't continue with the Dynatrace OneAgent installation.

name 'dynatraceoneagent'
description 'Deploy Dynatrace OneAgent'
  'dynatraceoneagent' => {
    'dynatrace_environment_url'  => 'https://{your-environment-id}',
    'dynatrace_paas_token'       => '{your-paas-token}',
    'verify_installer_signature' => true,

Advanced configuration

Download OneAgent installer to a custom directory with additional OneAgent install parameters should be defined as follows (will override default install params):

name 'dynatraceoneagent'
description 'Deploy Dynatrace OneAgent'
  'dynatraceoneagent' => {
    'dynatrace_environment_url'     => 'https://{your-environment-id}',
    'dynatrace_paas_token'          => '{your-paas-token}',
    'verify_installer_signature'    => true,
    'oneagent_version'              => ''
    'oneagent_download_dir'         => '"C:\\Download Dir"',
    'oneagent_install_params_hash'  => {
        '--set-infra-only'              => 'false',
        '--set-app-log-content-access'  => 'true',
        '--set-host-group'              => 'chef-windows',
        'INSTALL_PATH'                  => '"C:\Program Files"',

For Windows, because the parameter oneagent_download_dir is a string variable, 2 backslashes are required within the file path. Since the OneAgent install parameter INSTALL_PATH can be defined within the oneagent_install_params_hash hash map, no escaping is needed.


Dynatrace Autonomous Cloud Enablement team (ACE):


Licensed under the MIT License. See the [LICENSE] file for details.

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

dynatraceoneagent CHANGELOG

All notable changes to this project will be documented in this file.


Initial release.



  • Ability to download specific version
  • Cookbook automatically detects OS and downloads required installer.
  • Cookbook automatically detects OS and will install Dynatrace OneAgent with required Chef resource.
  • Add support for OneAgent Install Params
  • Added parameter to set Dynatrace OneAgent package status
  • Added parameter to set Dynatrace OneAgent service status
  • Introduced OneAgent installer signature verification functionality
  • Add option to delete installer files after successful install.
  • Added idempotency


  • Using cookbook specific attributes
  • Fixed windows installer

Collaborator Number Metric

0.2.0 passed this metric

Contributing File Metric

0.2.0 passed this metric

Foodcritic Metric

0.2.0 passed this metric

No Binaries Metric

0.2.0 passed this metric

Publish Metric

0.2.0 passed this metric

Supported Platforms Metric

0.2.0 passed this metric

Testing File Metric

0.2.0 passed this metric

Version Tag Metric

0.2.0 passed this metric