community.general.datadog_event module – Posts events to Datadog service
Note
This module is part of the community.general collection (version 7.5.2).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.datadog_event
.
Synopsis
Allows to post events to Datadog (www.datadoghq.com) service.
Uses http://docs.datadoghq.com/api/#events API.
Aliases: monitoring.datadog.datadog_event
Parameters
Parameter |
Comments |
---|---|
An arbitrary string to use for aggregation. |
|
Type of alert. Choices:
|
|
DataDog API endpoint URL. |
|
Your DataDog API key. |
|
Your DataDog app key. |
|
POSIX timestamp of the event. Default value is now. |
|
Host name to associate with the event. If not specified, it defaults to the remote system’s hostname. |
|
The priority of the event. Choices:
|
|
Comma separated list of tags to apply to the event. |
|
The body of the event. |
|
The event title. |
|
If Choices:
|
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: none |
Can run in |
|
Support: none |
Will return details on what has changed (or possibly needs changing in |
Examples
- name: Post an event with low priority
community.general.datadog_event:
title: Testing from ansible
text: Test
priority: low
api_key: 9775a026f1ca7d1c6c5af9d94d9595a4
app_key: j4JyCYfefWHhgFgiZUqRm63AXHNZQyPGBfJtAzmN
- name: Post an event with several tags
community.general.datadog_event:
title: Testing from ansible
text: Test
api_key: 9775a026f1ca7d1c6c5af9d94d9595a4
app_key: j4JyCYfefWHhgFgiZUqRm63AXHNZQyPGBfJtAzmN
tags: 'aa,bb,#host:{{ inventory_hostname }}'
- name: Post an event with several tags to another endpoint
community.general.datadog_event:
title: Testing from ansible
text: Test
api_key: 9775a026f1ca7d1c6c5af9d94d9595a4
app_key: j4JyCYfefWHhgFgiZUqRm63AXHNZQyPGBfJtAzmN
api_host: 'https://example.datadoghq.eu'
tags:
- aa
- b
- '#host:{{ inventory_hostname }}'