Alerting docs: adds template selector docs (#88412)

* Alerting docs: adds template selector docs

* adds line about single save
pull/88380/head
brendamuir 2 years ago committed by GitHub
parent e63037fe51
commit c8bbc9d6e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 73
      docs/sources/alerting/configure-notifications/manage-contact-points/_index.md
  2. 17
      docs/sources/alerting/configure-notifications/template-notifications/use-notification-templates.md

@ -50,9 +50,24 @@ refs:
# Configure contact points
Use contact points to define how your contacts are notified when an alert rule fires. You can add, edit, delete, and test a contact point.
Use contact points to select your preferred communication channel for receiving notifications when your alert rules are firing. You can add, edit, delete, export, and test a contact point.
Configure contact point integrations in Grafana to select your preferred communication channel for receiving notifications when your alert rules are firing.
{{% admonition type="note" %}}
You cannot delete contact points that are in use by a notification policy. Either delete the notification policy or update it to use another contact point.
{{% /admonition %}}
On the **Contact Points** tab, you can:
- Search for name and type of contact points and integrations
- View all existing contact points and integrations
- View how many notification policies each contact point is being used for and navigate directly to the linked notification policies
- View the status of notification deliveries
- Export individual contact points or all contact points in JSON, YAML, or Terraform format
- Delete contact points that are not in use by a notification policy
On the **Notification templates** tab, you can:
- View, edit, copy or delete existing notification templates
## Add a contact point
@ -64,32 +79,37 @@ Complete the following steps to add a contact point.
1. On the **Contact Points** tab, click **+ Add contact point**.
1. Enter a descriptive name for the contact point.
1. From **Integration**, select a type and fill out mandatory fields. For example, if you choose email, enter the email addresses. Or if you choose Slack, enter the Slack channel and users who should be contacted.
1. Some contact point integrations, like email or webhook, have optional settings. In **Optional settings**, specify additional settings for the selected contact point integration.
1. Some contact point integrations, like email or Webhook, have optional settings. In **Optional settings**, specify additional settings for the selected contact point integration.
1. In Notification settings, optionally select **Disable resolved message** if you do not want to be notified when an alert resolves.
1. To add another contact point integration, click **Add contact point integration** and repeat steps 6 through 8.
1. Save your changes.
## Edit a contact point
## Use notification templates
Complete the following steps to edit a contact point.
Use templates in contact points to customize your notifications.
1. In the left-side menu, click **Alerts & IRM** and then **Alerting**.
1. Click **Contact points** to view a list of existing contact points.
1. On the **Contact Points** tab, find the contact point you want to edit, and then click **Edit**.
1. Update the contact point and save your changes.
Complete the following steps to add templates to your contact point.
## Delete a contact point
1. Click an existing contact point or create a new one
1. In **Optional settings**, click any field that contains templates.
Complete the following steps to delete a contact point.
For example, if you are creating an email contact point integration, click **Message** or **Subject**.
1. In the left-side menu, click **Alerts & IRM** and then **Alerting**.
1. Click **Contact points** to view a list of existing contact points.
1. On the **Contact Points** tab, find the contact point you want to delete, and then click **More** -> **Delete**.
1. In the confirmation dialog box, click **Yes, delete**.
1. Click **Edit**.
A dialog box opens where you can select templates.
1. [Optional] Click **Select existing template** to select a template and preview it using the default payload.
{{% admonition type="note" %}}
You cannot delete contact points that are in use by a notification policy. Either delete the notification policy or update it to use another contact point.
{{% /admonition %}}
Click **Save** to use just a single template in the field.
You can also copy the selected template and use it in the custom tab.
1. [Optional] Click **Enter custom message** to customize and edit the field directly. Note that the title changes depending on the field you are editing.
Click **Save** to use just a single template in the field.
1. You can switch between the two tabs to access the list of available templates and copy them across to the customized version.
1. Click **Save contact point**.
## Test a contact point
@ -102,23 +122,6 @@ Complete the following steps to test a contact point.
1. Choose whether to send a predefined test notification or choose custom to add your own custom annotations and labels to include in the notification.
1. Click **Send test notification** to fire the alert.
## Manage contact points
The Contact points list view lists all existing contact points and notification templates.
On the **Contact Points** tab, you can:
- Search for name and type of contact points and integrations
- View all existing contact points and integrations
- View how many notification policies each contact point is being used for and navigate directly to the linked notification policies
- View the status of notification deliveries
- Export individual contact points or all contact points in JSON, YAML, or Terraform format
- Delete contact points that are not in use by a notification policy
On the **Notification templates** tab, you can:
- View, edit, copy or delete existing notification templates
## Configure contact point integrations
Each contact point integration has its own configuration options and setup process. In most cases, this involves providing an API key or a Webhook URL.

@ -33,16 +33,21 @@ refs:
Use templates in contact points to customize your notifications.
In the Contact points tab, you can see a list of your contact points.
Complete the following steps to add templates to your contact point.
1. To create a new contact point, click New.
1. Click an existing contact point or create a new one
1. In **Optional settings**, click any field that contains templates.
**Note:** You can edit an existing contact by clicking the Edit icon.
For example, if you are creating an email contact point integration, click **Message** or **Subject**.
1. Execute a template from one or more fields such as Message and Subject:
1. Click **Edit**.
A dialog box opens where you can select templates.
1. Click **Select existing template** to select a template and preview it using the default payload.
{{< figure max-width="940px" src="/static/img/docs/alerting/unified/use-notification-template-9-4.png" caption="Use notification template" >}}
You can also copy the selected template and use it in the custom tab.
For more information on how to write and execute templates, refer to [Using Go's templating language](ref:using-go-templating-language) and [Create notification templates](ref:create-notification-templates).
1. Click **Enter custom message** to customize and edit the field directly. Note that the title changes depending on the field you are editing.
1. You can switch between the two tabs to access the list of available templates and copy them across to the customized version.
1. Click **Save contact point**.

Loading…
Cancel
Save