Header background

Connect Dynatrace with Ansible Tower to trigger your IT automation tasks

Managing modern microservices environments can be complex, highly dynamic, and error-prone. IT automation management platforms such as Red Hat Ansible Tower use job templates to organize and execute customized automation scripts to help manage such environments.

Ansible playbooks are widely used to configure multiple nodes within complex service deployment scenarios. Playbooks and job templates formally specify repeatable and treatable configurations and remediation tasks. So each time you configure a service deployment scenario, you can use the same playbook that you push to GitHub. Ansible Tower not only helps you organize your playbooks on a single platform, it also helps you automate the execution of your playbooks and keep track of the execution history.

With the latest release, Dynatrace now offers a convenient built-in integration with Ansible Tower that enables you to automatically trigger selected playbook job templates, such as specific remediation automation tasks along with important context information, whenever Dynatrace detects a problem in your IT environment.

Dynatrace provides full-stack monitoring insights into your complete IT operation and automatically detects if any part of your deployment doesn’t fulfill the required quality in terms of performance or error rates. Whenever Dynatrace detects such abnormal system behavior, it creates a single problem that contains all incidents that share the same root cause. Dynatrace sends out problem notifications to inform third-party systems about incidents within your environment. Following simple setup in Dynatrace, and definition of a custom message containing user-defined information, you can do this in Ansible Tower.

Set up integration with Ansible Tower

To set up a direct Ansible Tower integration within your Dynatrace environment:

  1. Navigate to Settings > Integration > Problem notifications.
  2. Click Set up notifications and select Ansible Tower from the list of available integrations.
  3. Select the URL of a playbook job template within your Ansible Tower instance, as shown below.
  4. The job template URL can then be pasted into the Ansible Tower job template URL field in Ansible Tower integration settings.
  5. Enter the Username and Password of an Ansible Tower user who is authorized to trigger the job template via the Ansible Tower REST API, and specify if your Tower installation must have a valid SSL certificate. Even though it’s recommended that you use a valid SSL certificate (even for internal installations) you can ignore the certificate for convenience.

Customize a message

A custom message can be used to transfer any user-defined information while all context detail related to detected problems is automatically transferred in the additional information payload field.

Ansible Tower

Alerting profiles

Alerting profiles defined in your Ansible Tower integration configuration enable you to filter detected problems based on severity level or tags on affected components. For example, you can define an alerting profile that filters all problems except availability problems that occur on a specific tagged process or host.

Once you’ve created a custom message and successfully pushed a test notification to your Ansible Tower instance, save the integration. Of course, it’s possible to set up multiple Ansible Tower integrations to trigger different job templates for different kinds of problems.

The direct integration of Dynatrace detected problems with Ansible Tower job executions can be seen immediately within your Ansible Tower dashboard, which visualizes the successful runs of each template.