-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
67 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
- name: Dynatrace | Listen and react to events | ||
hosts: localhost | ||
tasks: | ||
- name: Dynatrace | Sample listener | ||
ansible.builtin.debug: | ||
msg: | ||
- "Problem detected on Dynatrace - Details:" | ||
- Impact level: {{ dynatrace_problem_impact_level }} | ||
- Problem Id: {{ dynatrace_problem_id }} | ||
- Problem Title: {{ dynatrace_problem_title }} | ||
- Problem Root Cause: {{ dynatrace_problem_root_cause }} | ||
- Problem Status: {{ dynatrace_problem_status }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
- name: Dynatrace | Listen and react to events | ||
hosts: all | ||
sources: | ||
- dynatrace.event_driven_ansible.dt_esa_api: | ||
dt_api_host: "<YOUR_TENANT_API>" | ||
dt_api_token: "<YOUR_TENANT_API_TOKEN>" | ||
delay: 60 | ||
rules: | ||
- name: Dynatrace | Sample listener | ||
condition: event.problemTitle is defined or event.status is defined | ||
actions: | ||
- debug: | ||
- run_playbook: | ||
name: eda-playbook-dynatrace.yml | ||
extra_vars: | ||
dynatrace_problem_impact_level: "{{ event.impactLevel }}" | ||
dynatrace_problem_id: "{{ event.problemId }}" | ||
dynatrace_problem_root_cause: "{{ event.rootCauseEntity }}" | ||
dynatrace_problem_status: "{{ event.status }}" | ||
dynatrace_problem_title: "{{ event.title }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
FROM registry.access.redhat.com/ubi9-minimal | ||
RUN microdnf install java-17 python3 gcc python3-devel -y && microdnf clean all && python -m ensurepip --upgrade && pip3 install ansible ansible-rulebook asyncio aiokafka aiohttp aiosignal asyncio_mqtt | ||
USER root | ||
RUN microdnf install java-17 python3.11 gcc python3.11-devel -y | ||
RUN rm -rf /usr/bin/python3 && ln -s python3.11 /usr/bin/python3 | ||
RUN microdnf clean all && python3 -m ensurepip --upgrade && pip3 install ansible ansible-rulebook asyncio aiokafka aiohttp aiosignal asyncio_mqtt | ||
ENV JAVA_HOME="/usr/lib/jvm/jre-17" | ||
RUN mkdir /eda-ansible | ||
RUN ansible-galaxy collection install ansible.eda kubealex.eda redhatinsights.eda | ||
RUN ansible-galaxy collection install ansible.eda dynatrace.event_driven_ansible kubealex.eda kubealex.general redhatinsights.eda | ||
WORKDIR /eda-ansible | ||
CMD ansible-rulebook -i inventory.yml --rulebook eda-rulebook-multiple-sources.yml --verbose | ||
CMD ansible-rulebook -i inventory.yml --rulebook eda-rulebook-multiple-sources.yml --verbose |