Skip to content

An Ansible role for automated deployments of the Dynatrace Collector.

License

Notifications You must be signed in to change notification settings

Dynatrace/Dynatrace-Appmon-Collector-Ansible

Repository files navigation

Dynatrace-Collector-Ansible

This Ansible role installs and configures the Dynatrace Collector of the Dynatrace AppMon solution.

Download

The role is available via:

Description

This role downloads and installs the most recent version of the Dynatrace Collector from http://downloads.dynatracesaas.com. Alternatively, you can place the installer artifact as dynatrace-collector-linux-x86.jar in the role's files directory from where it will be picked up during the installation. The default file name and URL can be overridden via the dynatrace_collector_linux_installer_file_name and dynatrace_collector_linux_installer_file_url attributes, respectively. Please refer to defaults/main.yml for a list of supported attributes.

Role Variables

As defined in defaults/main.yml:

Name Default Description
dynatrace_collector_installer_bitsize 64 32 or 64
dynatrace_collector_linux_install_dir /opt The Dynatrace Collector will be installed into the directory $dynatrace_collector_linux_install_dir/dynatrace-$major-$minor-$rev, where $major, $minor and $rev are given by the installer. A symbolic link to the actual installation directory will be created in $dynatrace_collector_linux_install_dir/dynatrace.
dynatrace_collector_linux_installer_file_name dynatrace-collector-7.2.0.1697-linux-x86.jar The file name of the Dynatrace Collector installer in the role's files directory.
dynatrace_collector_linux_installer_file_url https://files.dynatrace.com/downloads/OnPrem/dynaTrace/7.2/7.2.0.1697/dynatrace-collector-7.2.0.1697-linux-x86.jar A HTTP, HTTPS or FTP URL to the Dynatrace Collector installer in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path.
dynatrace_collector_agent_port 9998 The port where the Collector shall listen for agent connections.
dynatrace_collector_server_hostname localhost The location of the Server the Collector shall connect to.
dynatrace_collector_server_port 6699 The port on the Server the Collector shall connect to. Use either 6698 (non-SSL) or 6699 (SSL).
dynatrace_collector_jvm_xms The Dynatrace Collector's JVM setting: -Xms.
dynatrace_collector_jvm_xmx The Dynatrace Collector's JVM setting: -Xmx.
dynatrace_collector_jvm_perm_size The Dynatrace Collector's JVM setting: -XX:PermSize.
dynatrace_collector_jvm_max_perm_size The Dynatrace Collector's JVM setting: -XX:MaxPermSize.
dynatrace_collector_owner dynatrace The system user that owns the Dynatrace installation.
dynatrace_collector_group dynatrace The system user's group that owns the Dynatrace installation.
dynatrace_collector_role_name Dynatrace.Dynatrace-Collector The actual name of this role in an Ansible Playbook's roles directory.

Example Playbook

- hosts: all
  roles:
    - role: Dynatrace.Dynatrace-Collector

Testing

We use Test Kitchen to automatically test our automated deployments with Serverspec and RSpec:

  1. Install Test Kitchen and its dependencies from within the project's directory:
gem install bundler
bundle install
  1. 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

Presentations

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. analytics