event_driven_ansible

3Plugins

Overview

Description

This collection contains two event source plugins from Dynatrace. The dt_esa_api plugin captures all problems from your Dynatrace tenant and in conjunction with Ansible EDA rulebooks helps to enable auto-remediation in your environment. The dt_webhook plugin listens for events sent by the Red Hat Ansible for workflows integration from Dynatrace.

Readme

Dynatrace + Red Hat Event Driven Ansible

This collection contains the following Event-Driven Ansible source plugins:

  • dt_webhook - Event-Driven Ansible without simplified event routing (event streams)
  • dt_esa_api

Auto-Remediation (dt_esa_api)

This Event source plugin from Dynatrace captures all problems from your Dynatrace tenant and in conjunction with Ansible EDA rulebooks helps to enable auto-remediation in your environment.

Requirements

  • Dynatrace SaaS or Managed environment
  • Dynatrace API Token with the following scopes: Read problems and Write problems
  • Ansible Automation Platform with EDA Controller instance

Example rulebook

---
- name: Listen for events on a webhook
  hosts: all
  sources:
    - dynatrace.event_driven_ansible.dt_esa_api:
        dt_api_host: "https://abc.live.dynatrace.com"
        dt_api_token: "asjfsjkfjfjh"
        delay: 60 # Default is 60 seconds, i.e. the plugin polls problems every 60 seconds
        proxy: "http://my-proxy:3128" # Proxy through which to access host. (default is none)

  rules:
    - name: Problem payload Dynatrace for CPU issue
      condition: event.title is match("CPU saturation")
      action:
        run_job_template:
          name: "Remediate CPU saturation issue"
          organization: "Default"
    - name: Problem payload Dynatrace for App Failure rate increase issue
      condition: event.title is match("Failure rate increase")
      action:
        run_job_template:
          name: "Remediate Application issue"
          organization: "Default"
    - name: Update comments in Dynatrace
      condition: 
        all: 
          - event.status == "OPEN"
      action:
        run_playbook:
          name: dt-update-comments.yml

dt_webhook - Event-Driven Ansible without simplified event routing (event streams)

The dt_webhook event-source plugin is capable of receiving events from Dynatrace via the "Send event to Event-Driven Ansible" workflow action of the Red Hat Ansible for Workflows integration without simplified event routing (event streams).

The dt_webhook event-source plugin must be installed within a decision environment on the Event-Driven Ansible Controller.

For more information on how to set up a new decision environment, see Event-Driven Ansible controller user guide.

When using event streams, you can use the standard decision environment provided by Red Hat, for example, the Ansible-rulebook default-de. You don't need to build a custom decision environment with the dt_webhook plugin when using event streams.

Example rulebook

---
- name: Listen for events on dt_webhook
  hosts: all
  sources:
    - dynatrace.event_driven_ansible.dt_webhook:
        host: 0.0.0.0
        port: 5000
        token: '{{ <token_variable_name> }}'

  rules:
    - name: API Endpoint not available
      condition: event.payload.eventData["event.name"] is match ("Monitoring not available")
      action:
        run_job_template:
          name: "Trigger test playbook"
          organization: "Default"    

Licensing

We are using Apache License 2.0 as our default.

Source Code Headers

Every file containing source code must include copyright and license information. This includes any JS/CSS files that you might be serving out to browsers. (This is to help well-intentioned people avoid accidental copying that doesn't comply with the license.)

Apache header:

Copyright 2022 Dynatrace LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Additional Questions/Remarks

If you do have additional questions/remarks, feel free to reach out to Dynatrace support (support@dynatrace.com), either via Slack or email.

If you think this template did not solve all your problems, please also let us know, either with a message or a pull request. Together we can improve this template to make it easier for our future projects.

Certification

Product
Red Hat Ansible Automation Platform 2.4
Red Hat Ansible Automation Platform 2.5
DocumentationDependencies
No dependencies
There are currently no dependencies for this collection.
View in Automation Hub
Red Hat logoLinkedInYouTubeFacebookTwitter

Platforms

Products & services

Try, buy, sell

Help

About Red Hat Ecosystem Catalog

The Red Hat Ecosystem Catalog is the official source for discovering and learning more about the Red Hat Ecosystem of both Red Hat and certified third-party products and services.

We’re the world’s leading provider of enterprise open source solutions—including Linux, cloud, container, and Kubernetes. We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2025 Red Hat