dynatrace.Dynatrace-NGINX-Agent
Dynatrace-NGINX-Agent-Ansible
This Ansible role installs and configures the Dynatrace AppMon WebServer Agent of the Dynatrace AppMon solution for NGINX.
Note: you will have to restart the web server after placing the agent.
Download
The role is available via:
Dependencies
This roles depends on the following roles:
Description
This role downloads and installs the most recent version of the Dynatrace AppMon WebServer Agent package from http://downloads.dynatracesaas.com and integrates the agent with NGINX. The default download link can be overridden via the dynatrace_wsagent_linux_installer_file_url attribute. Alternatively, you can place the installer artifact as dynatrace-wsagent.tar in the role's files directory from where it will be picked up during the installation. Please refer to defaults/main.yml for a list of supported attributes.
Role Variables
As defined in defaults/main.yml:
| Name | Default | Description |
|---|---|---|
| dynatrace_nginx_agent_linux_agent_path | /opt/dynatrace/agent/lib64/libdtagent.so | The path to the Agent library. |
| dynatrace_nginx_agent_linux_nginx_config_path | /etc/nginx/nginx.conf | The path to NGINX's config file. |
| dynatrace_nginx_agent_name | nginx-dtwsagent | The name the Web Server Agent as it appears in Dynatrace AppMon. |
| dynatrace_nginx_agent_state | present | Whether the Agent shall be present or absent. |
Example Playbook
- hosts: all
roles:
- role: Dynatrace.Dynatrace-NGINX-Agent
Testing
We use Test Kitchen to automatically test our automated deployments with Serverspec and RSpec:
- Install Test Kitchen and its dependencies from within the project's directory:
gem install bundler
bundle install
- Run all tests
kitchen test
By default, we run our tests inside Docker containers as this considerably speeds up testing time (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 AppMon) with Ansible
- Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
Problems? Questions? Suggestions?
This offering is Dynatrace Community Supported. Feel free to share any problems, questions and suggestions with your peers on the Dynatrace Community's Application Monitoring & UEM Forum.
License
Licensed under the MIT License. See the LICENSE file for details.
ansible-galaxy install dynatrace.Dynatrace-NGINX-Agent