Dynatrace plugin for event driven ansible automated remediation ssl issue

45 views Asked by At

I have installed the new Event driven ansible operator in Ansible automation platform. Everything is working fine but the goal for me is to implement a solution for Dynatrace event remediation. Here is the links That I have followed :

https://www.ansible.com/blog/while-you-sleep-automate-resolving-dynatrace-problem-alerts-and-report-them-to-servicenow

https://galaxy.ansible.com/ui/repo/published/dynatrace/event_driven_ansible/docs/

This is my rulebook :

 ---
- name: Listen for events on a webhook
  hosts: all
  sources:
    - dynatrace.event_driven_ansible.dt_esa_api:
        dt_api_host: "https://mydynatarace.com/"
        dt_api_token: "my_token"
        delay: 60
  rules:
    - name: Problem payload Dynatrace for CPU issue
      condition: event.title != "NOT A TITLE"
      action:
        print_event:
          pretty: true
          var_root: i

But EDA could not connect to Dynatrace because of ssl verification errors, here is the error:

2024-02-21 07:17:58,320 - ansible_rulebook.rule_set_runner - INFO - Waiting for actions on events from Listen for events on a webhook
2024-02-21 07:17:58,320 - ansible_rulebook.rule_set_runner - INFO - Waiting for events, ruleset: Listen for events on a webhook
2024-02-21 07:17:58,324 - ansible_rulebook.websocket - INFO - feedback websocket connected
2024-02-21 07:17:58,333 - ansible_rulebook.engine - ERROR - Source error Cannot connect to host mydynatrace.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)')]
2024-02-21 07:17:58,333 - ansible_rulebook.engine - ERROR - Shutting down source: dynatrace.event_driven_ansible.dt_esa_api error : Cannot connect to host mydynatrace.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)')]
2024-02-21 07:17:58,334 - ansible_rulebook.rule_set_runner - INFO - Ruleset: Listen for events on a webhook, received shutdown: Shutdown(message="Shutting down source: dynatrace.event_driven_ansible.dt_esa_api error : Cannot connect to host mydynatrace.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)')]", delay=60.0, kind='graceful', source_plugin='dynatrace.event_driven_ansible.dt_esa_api')
2024-02-21 07:17:58 370 [main] INFO org.drools.ansible.rulebook.integration.api.RulesExecutor - Disposing session with id: 1; SessionStats{start='2024-02-21T07:17:57.231400365Z', end='2024-02-21T07:17:58.334718238Z', lastClockTime='2024-02-21T07:17:58.233Z', clockAdvanceCount=10, numberOfRules=1, numberOfDisabledRules=0, rulesTriggered=0, eventsProcessed=0, eventsMatched=0, eventsSuppressed=0, permanentStorageCount=0, permanentStorageSize=0, asyncResponses=0, bytesSentOnAsync=0, sessionId=1, ruleSetName='Listen for events on a webhook', lastRuleFired='', lastRuleFiredAt='null', lastEventReceivedAt='null', usedMemory='15425584', maxAvailableMemory='536870912'}

PS: there is no config properties for SSL Verification available for the plugin

0

There are 0 answers