community.grafana.grafana_contact_point module – Manage Grafana Contact Points
Note
This module is part of the community.grafana collection (version 2.1.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.grafana
.
To use it in a playbook, specify: community.grafana.grafana_contact_point
.
New in community.grafana 2.0.0
Synopsis
Create/Update/Delete Grafana Contact Points via API.
Parameters
Parameter |
Comments |
---|---|
Password for accessing Alertmanager. |
|
URL for accessing Alertmanager. Required when |
|
Username for accessing Alertmanager. |
|
PEM formatted certificate chain file to be used for SSL client authentication. This file can also include the key as well, and if the key is included, client_key is not required |
|
PEM formatted file that contains your private key to be used for SSL client authentication. If client_cert contains both the certificate and key, this option is not required. |
|
The message to send via DingDing. |
|
The type of message to send via DingDing. |
|
The title of the DingDing message. |
|
The URL for DingDing webhook. Required when |
|
Disables the resolve message. Choices:
|
|
The avatar URL for Discord messages. |
|
The message to send via Discord. |
|
The title of the Discord message. |
|
The URL for Discord webhook. Required when |
|
Whether to use a custom username in Discord. Choices:
|
|
List of email addresses to send the message to. Required when |
|
The content of the email message. |
|
Whether to send a single email or individual emails. Choices:
|
|
The subject of the email. |
|
The message to send via Google Chat. |
|
The title of the Google Chat message. |
|
The URL for Google Chat webhook. Required when |
|
The Grafana API key. If set, |
|
Whether to include an image in the notification. Choices:
|
|
The API version for Kafka. Default: |
|
The cluster ID for Kafka. |
|
The description for the Kafka configuration. |
|
Additional details for Kafka. |
|
Password for accessing Kafka. |
|
URL for Kafka REST Proxy. Required when |
|
Kafka topic to publish to. Required when |
|
Username for accessing Kafka. |
|
Description for the Line message. |
|
Title of the Line message. |
|
Access token for Line. Required when |
|
The name of the contact point. Required when |
|
API key for OpsGenie. Required when |
|
Whether to enable auto-closing of alerts in OpsGenie. Choices:
|
|
Description of the OpsGenie alert. |
|
Message to send via OpsGenie. |
|
Whether to override the priority in OpsGenie. Choices:
|
|
List of responders for OpsGenie alerts. |
|
Format for sending tags in OpsGenie. |
|
URL for OpsGenie webhook. Required when |
|
The organization ID. Default: |
|
The name of the organization. |
|
Class of the PagerDuty alert. |
|
Client identifier for PagerDuty. |
|
Client URL for PagerDuty. |
|
Component involved in the PagerDuty alert. |
|
List of additional details for PagerDuty. |
|
Group associated with the PagerDuty alert. |
|
Integration key for PagerDuty. Required when |
|
Severity level of the PagerDuty alert. Choices:
|
|
Source of the PagerDuty alert. |
|
Summary of the PagerDuty alert. |
|
Indicates if provisioning is enabled. Choices:
|
|
API token for Pushover. Required when |
|
List of devices for Pushover notifications. |
|
Expiration time for Pushover notifications. |
|
Message to send via Pushover. |
|
Priority for OK messages in Pushover. |
|
Sound for OK messages in Pushover. |
|
Priority for Pushover messages. |
|
Retry interval for Pushover messages. |
|
Sound for Pushover notifications. |
|
Title of the Pushover message. |
|
Whether to upload an image with Pushover notification. Choices:
|
|
User key for Pushover. Required when |
|
API key for Sensu Go. Required when |
|
Check name for Sensu Go. |
|
Entity name for Sensu Go. |
|
Handler for Sensu Go. |
|
Message to send via Sensu Go. |
|
Namespace for Sensu Go. |
|
URL for Sensu Go. Required when |
|
Endpoint URL for Slack webhook. |
|
Icon emoji for Slack messages. |
|
Icon URL for Slack messages. |
|
Channel mention for Slack messages. Choices:
|
|
List of groups to mention in Slack messages. |
|
List of users to mention in Slack messages. |
|
Recipient for Slack messages. Required when |
|
Text content for Slack messages. |
|
Title of the Slack message. |
|
Token for Slack authentication. Required when |
|
URL for Slack webhook. Required when |
|
Username to use in Slack messages. |
|
Status of the contact point. Choices:
|
|
Message to send via Microsoft Teams. |
|
Section title for Microsoft Teams messages. |
|
Title of the Microsoft Teams message. |
|
URL for Microsoft Teams webhook. Required when |
|
Chat ID for Telegram. Required when |
|
Whether to disable notifications for Telegram messages. Choices:
|
|
Message to send via Telegram. |
|
Parse mode for Telegram messages. |
|
Whether to protect content in Telegram messages. Choices:
|
|
Token for Telegram authentication. Required when |
|
Whether to enable web page preview in Telegram messages. Choices:
|
|
API secret for Threema. Required when |
|
Description for Threema messages. |
|
Gateway ID for Threema. Required when |
|
Recipient ID for Threema messages. Required when |
|
Title of the Threema message. |
|
The type of the contact point. Required when Choices:
|
|
The unique ID of the contact point. Normally the uid is generated randomly, but it is required for handling the contact point via API. |
|
The Grafana URL. |
|
The Grafana password for API authentication. Default: |
|
The Grafana user for API authentication. Default: |
|
If Choices:
|
|
If This should only set to Choices:
|
|
Description for VictorOps messages. |
|
Message type for VictorOps. Choices:
|
|
Title of the VictorOps message. |
|
URL for VictorOps webhook. Required when |
|
API URL for Webex. |
|
Message to send via Webex. |
|
Room ID for Webex messages. Required when |
|
Token for Webex authentication. Required when |
|
Authorization credentials for webhook. |
|
Authorization scheme for webhook. |
|
HTTP method for webhook. Choices:
|
|
Maximum number of alerts for webhook. |
|
Message to send via webhook. |
|
Password for webhook authentication. |
|
Title of the webhook message. |
|
URL for webhook. Required when |
|
Username for webhook authentication. |
|
Agent ID for WeCom. Required when |
|
Corporate ID for WeCom. Required when |
|
Message to send via WeCom. |
|
Message type for WeCom. |
|
Secret for WeCom authentication. Required when |
|
Title of the WeCom message. |
|
List of users to send the WeCom message to. |
|
URL for WeCom webhook. Required when |
Examples
- name: Create email contact point
community.grafana.grafana_contact_point:
grafana_url: "{{ grafana_url }}"
grafana_user: "{{ grafana_username }}"
grafana_password: "{{ grafana_password }}"
uid: email
name: E-Mail
type: email
email_addresses:
- [email protected]
- name: Delete email contact point
community.grafana.grafana_contact_point:
grafana_url: "{{ grafana_url }}"
grafana_user: "{{ grafana_username }}"
grafana_password: "{{ grafana_password }}"
uid: email
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Contact point created or updated by the module. Returned: success |
|
Is the resolve message of the contact point disabled. Returned: success Sample: |
|
The name of the contact point. Returned: success Sample: |
|
The secure fields config of the contact point. Returned: success |
|
The type specific settings of the contact point. Returned: success Sample: |
|
The type of the contact point. Returned: success Sample: |
|
The uid of the contact point. Returned: success Sample: |
|
Difference between previous and updated contact point. Returned: changed |
|
Current contact point. Returned: changed Sample: |
|
Previous contact point. Returned: changed Sample: |