grafana.grafana.alert_contact_point module – Manage Alerting Contact points in Grafana
Note
This module is part of the grafana.grafana collection (version 5.5.1).
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 grafana.grafana
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: grafana.grafana.alert_contact_point
.
New in grafana.grafana 0.0.1
Synopsis
Create, Update and delete Contact points using Ansible.
Requirements
The below requirements are needed on the host that executes this module.
requests >= 1.0.0
Parameters
Parameter |
Comments |
---|---|
When set to Choices:
|
|
Grafana API Key used to authenticate with Grafana. |
|
URL of the Grafana instance. |
|
Sets the name of the contact point. |
|
Sets Contact point settings. |
|
State for the Grafana Alert Contact Point. Choices:
|
|
Sets Contact point type. |
|
Sets the UID of the Contact point. |
Notes
Note
Does not support
check_mode
.
Examples
- name: Create/Update Alerting contact point
grafana.grafana.alert_contact_point:
name: ops-email
uid: opsemail
type: email
settings:
addresses: "[email protected],[email protected]"
grafana_url: "{{ grafana_url }}"
grafana_api_key: "{{ grafana_api_key }}"
state: present
- name: Delete Alerting contact point
grafana.grafana.alert_contact_point:
name: ops-email
uid: opsemail
type: email
settings:
addresses: "[email protected],[email protected]"
grafana_url: "{{ grafana_url }}"
grafana_api_key: "{{ grafana_api_key }}"
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Dict object containing Contact point information information. Returned: On success |
|
When set to True, Disables the resolve message [OK] that is sent when alerting state returns to false. Returned: state is present and on success Sample: |
|
The name for the contact point. Returned: state is present and on success Sample: |
|
Contains contact point settings. Returned: state is present and on success Sample: |
|
The type of contact point. Returned: state is present and on success Sample: |
|
The UID for the contact point. Returned: state is present and on success Sample: |