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.
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}
| SaaShttps://{your-environment-id}.live.dynatrace.com
- 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}
- SaaShttps://{your-environment-id}.live.dynatrace.com
, defaultnil
.
- String. URL of your dynatrace Tenant. Managed
-
node['dynatraceoneagent']['dynatrace_paas_token']
- String. Paas token for downloading the OneAgent installer, default
nil
.
- String. Paas token for downloading the OneAgent installer, default
-
node['dynatraceoneagent']['oneagent_version']
- String. The required version of the OneAgent in 1.199.247.20200714-111723 format, default
latest
.
- String. The required version of the OneAgent in 1.199.247.20200714-111723 format, default
-
node['dynatraceoneagent']['oneagent_installer_architecture']
- String. The architecture of your OS, default
x86
.
- String. The architecture of your OS, default
-
node['dynatraceoneagent']['oneagent_installer_type']
- String. The type of the installer, default
default
.
- String. The type of the installer, default
-
node['dynatraceoneagent']['oneagent_download_dir']
- String. OneAgent installer file download directory - default
Linux /tmp, Windows $TEMP
- String. OneAgent installer file download directory - default
-
node['dynatraceoneagent']['verify_installer_signature']
- Boolean. Verify OneAgent installer signature (Linux only) - default
true
- Boolean. Verify OneAgent installer signature (Linux only) - default
-
node['dynatraceoneagent']['oneagent_preserve_installer']
- Boolean. Preserve installers on a managed node after deployment, default
true
.
- Boolean. Preserve installers on a managed node after deployment, default
-
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', }
- Hash. Hash map of additional parameters to pass to the installer. Refer to the Customize OneAgent installation documentation on Dynatrace Supported Operating Systems. Default
-
node['dynatraceoneagent']['oneagent_service_state']
- Array. What state the Dynatrace OneAgent service should be in - default
[:enabled, :start]
- Array. What state the Dynatrace OneAgent service should be in - default
-
node['dynatraceoneagent']['oneagent_package_state']
- String. What state the dynatrace oneagent package should be in - default
installed
Allowed values:installed, removed
- String. What state the dynatrace oneagent package should be in - default
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.
name 'dynatraceoneagent'
description 'Deploy Dynatrace OneAgent'
default_attributes(
'dynatraceoneagent' => {
'dynatrace_environment_url' => 'https://{your-environment-id}.live.dynatrace.com',
'dynatrace_paas_token' => '{your-paas-token}'
}
)
run_list(
'recipe[dynatraceoneagent]'
)
The required version of the OneAgent must be in 1.155.275.20181112-084458 format. See Deployment API - GET available versions of OneAgent
name 'dynatraceoneagent'
description 'Deploy Dynatrace OneAgent'
default_attributes(
'dynatraceoneagent' => {
'dynatrace_environment_url' => 'https://{your-domain}/e/{your-environment-id}',
'dynatrace_paas_token' => '{your-paas-token}',
'oneagent_version' => '1.217.74.20210504-135638'
}
)
run_list(
'recipe[dynatraceoneagent]'
)
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'
default_attributes(
'dynatraceoneagent' => {
'dynatrace_environment_url' => 'https://{your-environment-id}.live.dynatrace.com',
'dynatrace_paas_token' => '{your-paas-token}',
'verify_installer_signature' => true,
}
)
run_list(
'recipe[dynatraceoneagent]'
)
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'
default_attributes(
'dynatraceoneagent' => {
'dynatrace_environment_url' => 'https://{your-environment-id}.live.dynatrace.com',
'dynatrace_paas_token' => '{your-paas-token}',
'verify_installer_signature' => true,
'oneagent_version' => '1.217.74.20210504-135638'
'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"',
}
}
)
run_list(
'recipe[dynatraceoneagent]'
)
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): [email protected]
Licensed under the MIT License. See the LICENSE file for details.