{"id":20317637,"url":"https://github.com/dynatrace/dynatrace-oneagent-chef","last_synced_at":"2025-04-11T17:56:16.345Z","repository":{"id":50145447,"uuid":"97609114","full_name":"Dynatrace/Dynatrace-OneAgent-Chef","owner":"Dynatrace","description":"This chef recipe downloads and installs the Dynatrace OneAgent on Linux or Windows systems.","archived":false,"fork":false,"pushed_at":"2021-09-20T08:22:59.000Z","size":95,"stargazers_count":6,"open_issues_count":3,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2023-03-18T04:21:45.676Z","etag":null,"topics":["chef","dynatrace","integration","oneagent"],"latest_commit_sha":null,"homepage":"https://help.dynatrace.com/get-started/installation/how-do-i-install-dynatrace-oneagent/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dynatrace.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-18T14:36:31.000Z","updated_at":"2023-03-18T04:21:45.676Z","dependencies_parsed_at":"2022-08-25T08:10:52.783Z","dependency_job_id":null,"html_url":"https://github.com/Dynatrace/Dynatrace-OneAgent-Chef","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dynatrace%2FDynatrace-OneAgent-Chef","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dynatrace%2FDynatrace-OneAgent-Chef/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dynatrace%2FDynatrace-OneAgent-Chef/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dynatrace%2FDynatrace-OneAgent-Chef/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dynatrace","download_url":"https://codeload.github.com/Dynatrace/Dynatrace-OneAgent-Chef/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224673926,"owners_count":17351004,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chef","dynatrace","integration","oneagent"],"created_at":"2024-11-14T18:34:34.045Z","updated_at":"2025-04-11T17:56:16.336Z","avatar_url":"https://github.com/Dynatrace.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dynatraceoneagent Cookbook\n\n[![Cookbook Version](https://img.shields.io/badge/cookbook-v0.2.0-blue)](https://supermarket.chef.io/cookbooks/dynatraceoneagent)\n\nThis cookbook deploys the [Dynatrace OneAgent] on Linux and Windows Operating Systems with different available configurations and ensures the OneAgent service maintains a running state.\n\n## Requirements\n\n- OneAgent version 1.199+\n- Dynatrace version 1.204+\n\n### Platforms\n\n- Linux\n- Windows\n\nVisit [Supported technologies and versions] for further information about all environments, technologies, and versions that can be monitored with Dynatrace.\n\n### Setup requirements\n\nYou will then need to supply the dynatraceoneagent cookbook with two critical pieces of information.\n\n* The Dynatrace environment URL: **Managed** `https://{your-domain}/e/{your-environment-id}` |  **SaaS** `https://{your-environment-id}.live.dynatrace.com`\n* The PaaS token of your environment for downloading the OneAgent installer\n\nRefer to the customize OneAgent installation documentation on [Dynatrace Supported Operating Systems].\nThis module uses the Dynatrace deployment API for downloading the installer for each supported OS. See [Deployment API].\n\n### Chef\n\n- Chef 14+\n\n## Attributes\n\n- `node['dynatraceoneagent']['dynatrace_environment_url']`\n\n  - String. URL of your dynatrace Tenant. Managed `https://{your-domain}/e/{your-environment-id}` - SaaS `https://{your-environment-id}.live.dynatrace.com`, default `nil`.\n\n- `node['dynatraceoneagent']['dynatrace_paas_token']`\n\n  - String. Paas token for downloading the OneAgent installer, default `nil`.\n\n- `node['dynatraceoneagent']['oneagent_version']`\n\n  - String. The required version of the OneAgent in 1.199.247.20200714-111723 format, default `latest`.\n\n- `node['dynatraceoneagent']['oneagent_installer_architecture']`\n\n  - String. The architecture of your OS, default `x86`.\n\n- `node['dynatraceoneagent']['oneagent_installer_type']`\n\n  - String. The type of the installer, default `default`.\n\n- `node['dynatraceoneagent']['oneagent_download_dir']`\n\n  - String. OneAgent installer file download directory - default `Linux /tmp, Windows $TEMP`\n\n- `node['dynatraceoneagent']['verify_installer_signature']`\n\n  - Boolean. Verify OneAgent installer signature (Linux only) - default `true`\n\n- `node['dynatraceoneagent']['oneagent_preserve_installer']`\n\n  - Boolean. Preserve installers on a managed node after deployment, default `true`.\n\n- `node['dynatraceoneagent']['oneagent_install_params_hash']`\n\n  - Hash. Hash map of additional parameters to pass to the installer. Refer to the Customize OneAgent installation documentation on [Dynatrace Supported Operating Systems]. Default `{\n  '--set-infra-only'             =\u003e 'false',\n  '--set-app-log-content-access' =\u003e 'true',\n}`\n- `node['dynatraceoneagent']['oneagent_service_state']`\n\n  - Array. What state the Dynatrace OneAgent service should be in - default `[:enabled, :start]`\n\n- `node['dynatraceoneagent']['oneagent_package_state']`\n  - String. What state the dynatrace oneagent package should be in - default `installed` Allowed values: `installed, removed`\n\n\u003c!-- ## Automatically Set Attributes\n\nThese attributes are set based on other set attributes, as well as platform / system information provided by Ohai\n\n- `node['dynatraceoneagent']['oneagent_installer_filename']`\n\n  - String. OneAgent installer filename.\n\n- `node['dynatraceoneagent']['dynatrace_deployment_api']`\n\n  - String. Dynatrace deployment API. Default - `/api/v1/deployment/installer/agent`\n\n- `node['dynatraceoneagent']['oneagent_os_type']`\n\n  - String. OS Type used for downloading the OneAgent installer binary.\n\n- `node['dynatraceoneagent']['oneagent_installer_path']`\n\n  - String. File path of OneAgent installer.\n\n- `node['dynatraceoneagent']['dynatrace_root_cert_file_name']`\n\n  - String. Name of the Dynatrace root certificarte file - default `dt-root.cert.pem`\n\n- `node['dynatraceoneagent']['dynatrace_root_cert_path']`\n\n  - String. Path of the Dynatrace root certificate file.\n\n- `node['dynatraceoneagent']['oneagent_certificate_verification_header']`\n\n  - String. OneAgent certificate verification header.\n\n- `node['dynatraceoneagent']['oneagent_ctl_bin_path']`\n\n  - String. Path of oneagentctl binary.\n\n- `node['dynatraceoneagent']['oneagent_service']`\n\n  - String. OneAgent service name.\n\n--\u003e\n\n## Recipes\n\n### default\n\nInclude the default recipe in a run list, to get `dynatraceoneagent`.\n\n### oneagent_download\n\nThis recipe downloads the OneAgent installer binary.\n\n### oneagent_installer_cleanup\n\nThis recipe deletes the OneAgent installer after deployment. On Linux it will also delete the Dynatrace root certificate.\n\n### oneagent_linux_install\n\nInstalls the Dynatrace OneAgent on Linux machines, optionally it will also verify the installer signature.\n\n### oneagent_linux_uninstall\n\nUninstalls the Dynatrace OneAgent on Linux machines.\n\n### oneagent_service\n\nManages the Dynatrace OneAgent service on both Linux and Windows.\n\n### oneagent_windows_install\n\nInstalls the Dynatrace OneAgent on Windows machines.\n\n### oneagent_windows_uninstall\n\nUninstalls the Dynatrace OneAgent on Windows machines.\n\n## Usage\n\nSet up the `dynatraceoneagent` attributes in a role.\n\n### Roles Examples\n\n#### Most basic OneAgent installation using a SAAS tenant\n\n```ruby\nname 'dynatraceoneagent'\ndescription 'Deploy Dynatrace OneAgent'\ndefault_attributes(\n  'dynatraceoneagent' =\u003e {\n    'dynatrace_environment_url' =\u003e 'https://{your-environment-id}.live.dynatrace.com',\n    'dynatrace_paas_token'      =\u003e '{your-paas-token}'\n  }\n)\nrun_list(\n  'recipe[dynatraceoneagent]'\n)\n```\n\n#### OneAgent installation using a managed tenant with a specific version\n\nThe required version of the OneAgent must be in 1.155.275.20181112-084458 format. See [Deployment API - GET available versions of OneAgent]\n\n```ruby\nname 'dynatraceoneagent'\ndescription 'Deploy Dynatrace OneAgent'\ndefault_attributes(\n  'dynatraceoneagent' =\u003e {\n    'dynatrace_environment_url' =\u003e 'https://{your-domain}/e/{your-environment-id}',\n    'dynatrace_paas_token'      =\u003e '{your-paas-token}',\n    'oneagent_version'          =\u003e '1.217.74.20210504-135638'\n  }\n)\nrun_list(\n  'recipe[dynatraceoneagent]'\n)\n```\n\n#### Verify Installer Signature (Linux Only)\n\nSet 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.\n\n```ruby\nname 'dynatraceoneagent'\ndescription 'Deploy Dynatrace OneAgent'\ndefault_attributes(\n  'dynatraceoneagent' =\u003e {\n    'dynatrace_environment_url'  =\u003e 'https://{your-environment-id}.live.dynatrace.com',\n    'dynatrace_paas_token'       =\u003e '{your-paas-token}',\n    'verify_installer_signature' =\u003e true,\n  }\n)\nrun_list(\n  'recipe[dynatraceoneagent]'\n)\n```\n\n#### Advanced configuration\n\nDownload OneAgent installer to a custom directory with additional OneAgent install parameters should be defined as follows (will override default install params):\n\n```ruby\nname 'dynatraceoneagent'\ndescription 'Deploy Dynatrace OneAgent'\ndefault_attributes(\n  'dynatraceoneagent' =\u003e {\n    'dynatrace_environment_url'     =\u003e 'https://{your-environment-id}.live.dynatrace.com',\n    'dynatrace_paas_token'          =\u003e '{your-paas-token}',\n    'verify_installer_signature'    =\u003e true,\n    'oneagent_version'              =\u003e '1.217.74.20210504-135638'\n    'oneagent_download_dir'         =\u003e '\"C:\\\\Download Dir\"',\n    'oneagent_install_params_hash'  =\u003e {\n        '--set-infra-only'              =\u003e 'false',\n        '--set-app-log-content-access'  =\u003e 'true',\n        '--set-host-group'              =\u003e 'chef-windows',\n        'INSTALL_PATH'                  =\u003e '\"C:\\Program Files\"',\n    }\n  }\n)\nrun_list(\n  'recipe[dynatraceoneagent]'\n)\n```\n\nFor 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.\n\n## Authors\n\nDynatrace Autonomous Cloud Enablement team (ACE): [ace@dynatrace.com]\n\n## License\n\nLicensed under the MIT License. See the [LICENSE] file for details.\n\n\n[Dynatrace OneAgent]: https://www.dynatrace.com/support/help/setup-and-configuration/dynatrace-oneagent/\n[Supported technologies and versions]: https://www.dynatrace.com/support/help/technology-support/supported-technologies-and-versions/\n[Dynatrace Supported Operating Systems]:https://www.dynatrace.com/support/help/technology-support/operating-systems/\n[Deployment API]: https://www.dynatrace.com/support/help/extend-dynatrace/dynatrace-api/environment-api/deployment/\n[Deployment API - GET available versions of OneAgent]: https://www.dynatrace.com/support/help/dynatrace-api/environment-api/deployment/oneagent/get-available-versions/\n[LICENSE]: ./LICENSE\n[ace@dynatrace.com]: mailto:ace@dynatrace.com","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdynatrace%2Fdynatrace-oneagent-chef","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdynatrace%2Fdynatrace-oneagent-chef","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdynatrace%2Fdynatrace-oneagent-chef/lists"}