Note
This plugin is part of the community.digitalocean collection (version 1.11.0).
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.digitalocean
.
To use it in a playbook, specify: community.digitalocean.digital_ocean_monitoring_alerts_info
.
New in version 1.10.0: of community.digitalocean
Parameter | Choices/Defaults | Comments |
---|---|---|
oauth_token string / required | DigitalOcean OAuth token; can be specified in DO_API_KEY , DO_API_TOKEN , or DO_OAUTH_TOKEN environment variablesaliases: API_TOKEN | |
state string |
| present to return alerts |
uuid string | Alert uuid (if specified only returns the specific alert policy) |
- name: Get Droplet Monitoring alerts polices community.digitalocean.digital_ocean_monitoring_alerts_info: oauth_token: "{{ lookup('ansible.builtin.env', 'DO_API_TOKEN') }}" register: monitoring_alerts - name: Get specific Droplet Monitoring alerts policy community.digitalocean.digital_ocean_monitoring_alerts_info: oauth_token: "{{ lookup('ansible.builtin.env', 'DO_API_TOKEN') }}" uuid: ec48b0e7-23bb-4a7f-95f2-d83da62fcd60 register: monitoring_alert
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
data dictionary | changed | DigitalOcean Monitoring alerts policies Sample: {'data': [{'alerts': {'email': ['[email protected]'], 'slack': []}, 'compare': 'GreaterThan', 'description': 'Droplet load1 alert', 'enabled': True, 'entities': ['262383737'], 'tags': ['my_alert_tag'], 'type': 'v1/insights/droplet/load_1', 'uuid': 'ec48b0e7-23bb-4a7f-95f2-d83da62fcd60', 'value': 3.14159, 'window': '5m'}]} |
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/digitalocean/digital_ocean_monitoring_alerts_info_module.html