dynatrace.Dynatrace-Agent
Dynatrace-Agent-Ansible
This Ansible role installs and sets up the Agent for the Dynatrace AppMon system.
Note: This role only makes the Dynatrace Agent ready to use, but it doesn't configure your application to actually use it. If you need an example for configuring the Java agent, check out the Dynatrace-Java-Agent-Ansible role.
Download
You can get this role from:
Description
This role downloads and installs the latest version of the Dynatrace AppMon Agent from http://downloads.dynatracesaas.com. If you prefer, you can also put the installer file named dynatrace-agent-linux-x86.jar
in the role's files
directory, and it will be used during installation. You can change the default installer file name and URL by using the attributes dynatrace_agent_linux_installer_file_name
and dynatrace_agent_linux_installer_file_url
. Check defaults/main.yml
for all supported attributes.
Role Variables
As listed in defaults/main.yml
:
Name | Default | Description |
---|---|---|
dynatrace_agent_linux_install_dir | /opt | The Dynatrace Agent will be installed in $dynatrace_agent_linux_install_dir/dynatrace-$major-$minor-$rev, where $major, $minor, and $rev are given by the installer. A shortcut to the installation directory will be created in $dynatrace_agent_linux_install_dir/dynatrace. |
dynatrace_agent_linux_installer_file_name | dynatrace-agent-7.0.0.2469-unix.jar | The name of the Dynatrace Agent installer file in the role's files directory. |
dynatrace_agent_linux_installer_file_url | https://files.dynatrace.com/downloads/OnPrem/dynaTrace/7.0/7.0.0.2469/dynatrace-agent-7.0.0.2469-unix.jar | A URL (HTTP, HTTPS, or FTP) where the Dynatrace Agent installer can be found. |
dynatrace_agent_owner | dynatrace | The system user that owns the Dynatrace installation. |
dynatrace_agent_group | dynatrace | The user group that owns the Dynatrace installation. |
dynatrace_agent_role_name | Dynatrace.Dynatrace-Agent | The actual name of this role in an Ansible Playbook's roles directory. |
Example Playbook
- hosts: all
roles:
- role: Dynatrace.Dynatrace-Agent
Testing
We use Test Kitchen to automatically test our deployments with Serverspec and RSpec:
- Install Test Kitchen and its needed tools from the project's directory:
gem install bundler
bundle install
- Run all tests
kitchen test
By default, we run our tests inside Docker containers for faster testing (see .kitchen.yml
).
Additional Resources
Blogs
- How to Automate Enterprise Application Monitoring with Ansible
- How to Automate Enterprise Application Monitoring with Ansible - Part II
Presentations
- Automated Deployments (of Dynatrace) with Ansible
- Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
Problems? Questions? Suggestions?
This tool is Dynatrace Community Supported. You can discuss any issues, questions, or suggestions with other users in the Dynatrace Community's Application Monitoring & UEM Forum.
License
Licensed under the MIT License. See the LICENSE file for details.
An Ansible role for automated deployments of the Dynatrace Agents package.
ansible-galaxy install dynatrace.Dynatrace-Agent