Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PR #2775/c9cf6411 backport][stable-3] datadog_event : Adding api_host as an optional parameter #2831

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Jun 17, 2021

This is a backport of PR #2775 as merged into main (c9cf641).

SUMMARY

Users need the ability to define an API endpoint for the datadog_event Ansible module to send data to. By default, it sends to api.datadog.com which is not necessarily always the case.
This change is to add an optional api_host parameter to pass to the module in order for the events to reach the right location.

This is related to issue #2774

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

datadog_event

ADDITIONAL INFORMATION

The change mainly targets plugins/modules/monitoring/datadog/datadog_event.py to allow users to define datadog api_host in their playbooks

As a result of this change, the playbook now would accept api_host as an optional parameter for datadog_event module where it takes a string value. Example playbook after this change:

---
- name: Test
  hosts: localhost
  tasks:
  - name: datadog_test
    community.general.datadog_event:
      title: Test
      text: This is just a test
      priority: low
      tags: '#group:heros'
      # The URL is for demonstration purposes
      api_host: 'Avengers.datadoghq.eu'
      api_key: KEY
      app_key: KEY

* 2774 Module datadog_event _ Adding api_host as an optional parameter

* Update changelogs/fragments/2774-datadog_event_api_parameter.yml

Co-authored-by: Felix Fontein <[email protected]>

* Update plugins/modules/monitoring/datadog/datadog_event.py

Co-authored-by: Felix Fontein <[email protected]>

* Update datadog_event.py

* Update datadog_event.py

* Update datadog_event.py

* Update datadog_event.py

* Update datadog_event.py

* Update datadog_event.py

* Update datadog_event.py

* Update datadog_event.py

* Update plugins/modules/monitoring/datadog/datadog_event.py

Co-authored-by: Felix Fontein <[email protected]>

* Update plugins/modules/monitoring/datadog/datadog_event.py

Co-authored-by: Felix Fontein <[email protected]>

* Update plugins/modules/monitoring/datadog/datadog_event.py

Co-authored-by: Felix Fontein <[email protected]>

* Update plugins/modules/monitoring/datadog/datadog_event.py

Co-authored-by: Felix Fontein <[email protected]>

* Update plugins/modules/monitoring/datadog/datadog_event.py

Co-authored-by: Amin Vakil <[email protected]>

* Update plugins/modules/monitoring/datadog/datadog_event.py

Co-authored-by: Amin Vakil <[email protected]>

Co-authored-by: Anas Hamadeh <[email protected]>
Co-authored-by: Felix Fontein <[email protected]>
Co-authored-by: Amin Vakil <[email protected]>
(cherry picked from commit c9cf641)
@felixfontein felixfontein merged commit ec2c793 into stable-3 Jun 17, 2021
@felixfontein felixfontein deleted the patchback/backports/stable-3/c9cf641188bad51cc214598e1816da880ee90d8b/pr-2775 branch June 17, 2021 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants