Skip to content

Commit 410ff62

Browse files
committed
Incorporated SME Feedback
1 parent de433b2 commit 410ff62

File tree

1 file changed

+180
-43
lines changed

1 file changed

+180
-43
lines changed

docs/user-guide/global-configurations/manage-notification.md

+180-43
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# Manage Notification
1+
# Manage Notifications
22

33
## Introduction
44

55
Monitoring updates of your CI/CD pipelines, such as their triggers, successes, and failures, can be tricky without a notification system in place.
66

7-
The **Manage Notifications** feature in Devtron helps you solve this by sending updates about your pipelines through tools like Email, Slack, Discord, Microsoft Teams, and many more; thus ensuring you stay in the loop.
7+
The **Notifications** feature in Devtron helps you solve this by sending updates about your pipelines through tools like Email, Slack, Discord, Microsoft Teams, and many more, thus ensuring you stay in the loop.
88

99
![Figure 1: Notifications Page in Global Configurations](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/manage-notification/notification-screen.gif)
1010

1111
{% hint style="info" %}
1212
### Prerequisite
13-
OSS users should install **Notifications** integration available in [Devtron Stack Manager](../stack-manager.md).
13+
OSS users should install the **Notifications** integration available in [Devtron Stack Manager](../stack-manager.md).
1414
{% endhint %}
1515

1616
Go to **Global Configurations****Notifications** to access this feature in Devtron. As shown below, there are 2 tabs available for you to manage your notification settings:
@@ -26,6 +26,8 @@ Go to **Global Configurations** → **Notifications** to access this feature in
2626
Only superadmins can manage configurations.
2727
{% endhint %}
2828

29+
This section allows you to perform the configurations required for your notifications to work. Make sure you finish this step before [creating a notification](#create-notifications).
30+
2931
![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/manage-notification/configurations-tab.jpg)
3032

3133
Here you can add and manage the following configurations:
@@ -36,15 +38,15 @@ Here you can add and manage the following configurations:
3638

3739
{% hint style="info" %}
3840
### Tip
39-
At any point of time, you have the option to edit or delete an existing configuration, or add more as per your requirements.
41+
At any point in time, you have the option to edit or delete an existing configuration or add more as per your requirements.
4042
{% endhint %}
4143

4244
### SES Configuration
4345

4446
{% hint style="info" %}
4547
### Prerequisites
46-
* [Generate SMTP Credentials from AWS SES](https://docs.aws.amazon.com/ses/latest/dg/smtp-credentials.html) - To get the user ID and secret.
47-
* [Verify Email Identities in AWS SES](https://docs.aws.amazon.com/ses/latest/dg/creating-identities.html#verify-email-addresses-procedure) - This is to verify the email of the sender email address (e.g., *michael.devtron.ai*) you wish to use for sending email notifications.
48+
* [Generate SMTP Credentials from AWS SES](https://docs.aws.amazon.com/ses/latest/dg/smtp-credentials.html) - To get the user access key and secret key.
49+
* [Verify Email Identities in AWS SES](https://docs.aws.amazon.com/ses/latest/dg/creating-identities.html#verify-email-addresses-procedure) - This is to verify the sender's email address (e.g., *michael@devtron.ai*) you wish to use for sending email notifications.
4850
{% endhint %}
4951

5052
You can use Amazon Simple Email Service (SES) to send email notifications to the recipients.
@@ -53,13 +55,13 @@ You can use Amazon Simple Email Service (SES) to send email notifications to the
5355

5456
2. Enter the following details in the **Configure SES** window:
5557

56-
| Key | Description |
57-
| --- | ----------- |
58-
| **Configuration Name** | Give a name to your SES Configuration, e.g., `Email SES 2024` |
59-
| **Access Key ID** | Valid user ID from your AWS SMTP Settings page, e.g., `AKIAWEAVHF123ABCD123` |
60-
| **Secret Access Key** | Password from your AWS SMTP Settings page |
61-
| **AWS Region** | The AWS Region you used while setting up SES |
62-
| **Send email from** | The sender email address verified by SES for sending emails |
58+
| Key | Description |
59+
| --- | ----------- |
60+
| **Configuration Name** | Give a name to your SES Configuration, e.g., `Email SES 2024` |
61+
| **Access Key ID** | Valid user ID from your AWS SMTP Settings page, e.g., `AKIAWEAVHF123ABCD123` |
62+
| **Secret Access Key** | Password from your AWS SMTP Settings page |
63+
| **AWS Region** | The AWS Region you used while setting up SES |
64+
| **Send email from** | The sender email address verified by SES for sending emails |
6365

6466
![Figure 2: Sample SES Configuration](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/manage-notification/ses-data.jpg)
6567

@@ -77,7 +79,7 @@ Refer [Create Notifications](#create-notifications).
7779

7880
{% hint style="info" %}
7981
### Prerequisite
80-
SMTP Credentials from your SMTP Provider. If you are using AWS SMTP, make sure to [verify domain identities](https://docs.aws.amazon.com/ses/latest/dg/creating-identities.html#verify-domain-procedure) to verify the domain (e.g., *devtron.ai*) of the sender email address you wish to use for sending emails notifications.
82+
SMTP Credentials from your SMTP Provider. If you are using AWS SMTP, make sure to [verify domain identities](https://docs.aws.amazon.com/ses/latest/dg/creating-identities.html#verify-domain-procedure) to verify the domain (e.g., *devtron.ai*) of the sender email address you wish to use for sending email notifications.
8183
{% endhint %}
8284

8385
You can use any SMTP provider (e.g., Gmail SMTP, AWS) to send email notifications to the recipients.
@@ -86,14 +88,14 @@ You can use any SMTP provider (e.g., Gmail SMTP, AWS) to send email notification
8688

8789
2. Enter the following details in the **Configure SMTP** window:
8890

89-
| Key | Description |
90-
| :--- | :--- |
91-
| **Configuration Name** | Give a name to your SMTP Configuration, e.g., `Email SMTP 2024` |
92-
| **SMTP Host** | The SMTP endpoint available in your SMTP settings, e.g., `email-smtp.ap-south-1.amazonaws.com` |
93-
| **SMTP Port** | The port number available in your SMTP settings, e.g., `587` |
94-
| **SMTP Username** | A valid username created with your SMTP provider, e.g., `AKIAWEAVHF123ABCD123` |
95-
| **SMTP Password** | The password generated by your SMTP provider |
96-
| **Send email from** | The sender email address verified by your SMTP provider for sending emails |
91+
| Key | Description |
92+
| :--- | :--- |
93+
| **Configuration Name** | Give a name to your SMTP Configuration, e.g., `Email SMTP 2024` |
94+
| **SMTP Host** | The SMTP endpoint available in your SMTP settings, e.g., `email-smtp.ap-south-1.amazonaws.com` |
95+
| **SMTP Port** | The port number available in your SMTP settings, e.g., `587` |
96+
| **SMTP Username** | A valid username created with your SMTP provider, e.g., `AKIAWEAVHF123ABCD123` |
97+
| **SMTP Password** | The password generated by your SMTP provider |
98+
| **Send email from** | The sender email address verified by your SMTP provider for sending emails |
9799

98100
![Figure 3: Sample SMTP Configuration](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/manage-notification/smtp-data.jpg)
99101

@@ -121,11 +123,11 @@ This configuration helps you receive notifications on your preferred Slack chann
121123

122124
2. Enter the following details in the **Configure Slack** window:
123125

124-
| Key | Description |
125-
| :--- | :--- |
126-
| **Slack Channel** | Name of the Slack channel on which you wish to receive notifications |
127-
| **Webhook URL** | Enter a valid incoming webhook URL (see [prerequisites](#prerequisites-1)) |
128-
| **Project** | Select the project name to control the user access. Apps outside your selected project cannot use this configuration.|
126+
| Key | Description |
127+
| :--- | :--- |
128+
| **Slack Channel** | Name of the Slack channel on which you wish to receive notifications |
129+
| **Webhook URL** | Enter a valid incoming webhook URL (see [prerequisites](#prerequisites-1)) |
130+
| **Project** | Select the project name to control user access. Apps outside your selected project cannot use this configuration.|
129131

130132
![Figure 4: Sample Slack Configuration](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/manage-notification/slack-data.jpg)
131133

@@ -147,16 +149,18 @@ A Webhook URL for receiving notifications (e.g., Microsoft Teams Webhook URL, Di
147149

148150
2. Enter the following details in the **Configure Webhook** window:
149151

150-
| Key | Description |
151-
| :--- | :--- |
152-
| **Configuration name** | Name of the Slack channel on which you wish to receive notifications |
153-
| **Webhook URL** | Enter a valid Webhook URL link |
154-
| **Headers** | Add optional key-value pairs, e.g. `Content-Type: application/json` |
155-
| **Data** | Write the payload content of the notification in a JSON format <br /> `{ "content": "Automation Notification for Devtron \n App : {{devtronAppName}} \n Event Type : {{eventType}}" }` |
152+
| Key | Description |
153+
| :--- | :--- |
154+
| **Configuration name** | Give a name to your webhook configuration |
155+
| **Webhook URL** | Enter a valid Webhook URL link |
156+
| **Headers** | Add optional key-value pairs, e.g. `Content-Type: application/json` |
157+
| **Data** | Write the payload content of the notification in a JSON format. <br /> Refer: <ul><li>[Microsoft Teams Payload](#for-microsoft-teams)</li><li>[Discord Payload](#for-discord)</li><li>[Slack Payload](#for-slack)</li><li>[RingCentral Payload](#for-ringcentral)</li></ul> |
156158

157159
![Figure 5: Sample Webhook Configuration](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/manage-notification/webhook-data.jpg)
158160

159-
3. Click **Save**. You may watch the [Discord Notification Walkthrough](#discord-notification) for better understanding.
161+
3. Here are some sample payloads for your reference:
162+
163+
4. Click **Save**. You may watch the [Discord Notification Walkthrough](#discord-notification) for better understanding.
160164

161165
{% hint style="success" %}
162166
### Next Step
@@ -172,10 +176,10 @@ Refer [Create Notifications](#create-notifications).
172176
Only superadmins can manage notifications.
173177
{% endhint %}
174178

175-
After completing the [configurations](#configurations), you can create notifications.
176-
177179
### Create Notifications
178180

181+
After completing the [configurations](#configurations), you can start creating notifications.
182+
179183
1. Go to the **Notifications** tab and click **Add Notification**.
180184

181185
![Figure 6: Adding Notifications](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/manage-notification/add-notification-v2.jpg)
@@ -205,15 +209,15 @@ You can add more than one recipient as per your requirement.
205209
You will see a list of CI/CD pipelines corresponding to your selected filter type.
206210
* <span><img src="https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/manage-notification/ci1.jpg" alt="CI Icon"></span> indicates that it is a CI (Build) pipeline.
207211
* <span><img src="https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/manage-notification/cd1.jpg" alt="CD Icon"></span> indicates that it is a CD (Deployment) pipeline.
208-
* You can also choose to receive notifications for any CI or CD pipeline that do not exist currently but may exist in future.
212+
* You can also choose to receive notifications for any CI or CD pipelines that do not exist currently but may exist in future.
209213
{% endhint %}
210214

211215
4. For each pipeline, there are individual checkboxes for 3 types of events:
212216
* **Trigger** - Use this if you wish to receive notification whenever the pipeline is triggered.
213217
* **Success** - Use this if you wish to receive notification upon a successful build or deploy.
214218
* **Failure** - Use this if you wish to receive notification upon a failed build or deploy.
215219

216-
Click the checkbox relevant to you for receiving notifications. You can choose more than one as per your requirement.
220+
Click the checkbox relevant to you to receive notifications. You can choose more than one as per your requirements.
217221

218222
![Figure 9: Selecting Events](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/manage-notification/choose-events.gif)
219223

@@ -226,13 +230,13 @@ Build and Deploy your application to get notifications of its CI/CD events.
226230

227231
### Edit Notifications
228232

229-
You can use the checkbox besides the notifications to edit them one-by-one or in bulk.
233+
You can use the checkbox beside the notifications to edit them. You may delete the notification, modify its event, or change its recipients. Moreover, you can do it one by one or in bulk.
230234

231235
#### Delete Notification
232236

233237
Use this to delete unwanted notifications.
234238

235-
![Figure 10: Deleting Existing Notifications](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/manage-notification/delete-notification.gif)
239+
![Figure 10: Deleting Existing Notifications](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/manage-notification/bulk-delete.gif)
236240

237241
#### Modify Event
238242

@@ -252,15 +256,148 @@ Use this to remove or add recipients/channels to the existing notification(s).
252256

253257
### Email Notification
254258

255-
{% embed url="https://www.youtube.com/watch?v=VSSdmtG3_6s" caption="Enabling Email Notifications for Devtron CI/CD" %}
259+
{% embed url="https://www.youtube.com/watch?v=rzP3KfTY3XU" caption="Enabling Email Notifications for Devtron CI/CD" %}
256260

257261
### Slack Notification
258262

259-
{% embed url="https://www.youtube.com/watch?v=hv4JVgyQ2Qs" caption="Enabling Slack Notifications for Devtron CI/CD" %}
263+
{% embed url="https://www.youtube.com/watch?v=ve1eGqslBqc" caption="Enabling Slack Notifications for Devtron CI/CD" %}
260264

261265
### Discord Notification
262266

263-
{% embed url="https://www.youtube.com/watch?v=p-qeW8iOs-c" caption="Enabling Notifications for Devtron CI/CD using Webhook" %}
267+
{% embed url="https://www.youtube.com/watch?v=8RQ2dezrVvY" caption="Enabling Notifications for Devtron CI/CD using Webhook" %}
268+
269+
270+
---
271+
272+
## Sample Payloads
273+
274+
Here are some sample payloads for [webhook configurations](#webhook-configuration).
275+
276+
### For Microsoft Teams
277+
278+
{% code title="Teams Webhook Payload" overflow="wrap" lineNumbers="true" %}
279+
```json
280+
{
281+
"type": "message",
282+
"attachments": [
283+
{
284+
"contentType": "application/vnd.microsoft.card.adaptive",
285+
"contentUrl": null,
286+
"content": {
287+
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
288+
"type": "AdaptiveCard",
289+
"version": "1.2",
290+
"body": [
291+
{
292+
"type": "TextBlock",
293+
"text": "Automation Notification for Devtron \n *App* : {{devtronAppName}} \n *Event Type* : {{eventType}}"
294+
}
295+
]
296+
}
297+
}
298+
]
299+
}
300+
```
301+
{% endcode %}
302+
303+
### For Slack
304+
305+
{% code title="Slack Webhook Payload" overflow="wrap" lineNumbers="true" %}
306+
```json
307+
{
308+
"text": "CI Triggered",
309+
"blocks": [
310+
{
311+
"type": "section",
312+
"text": {
313+
"type": "mrkdwn",
314+
"text": "Automation Notification for Devtron \n *App* : {{devtronAppName}} \n *Event Type* : {{eventType}}"
315+
},
316+
"accessory": {
317+
"type": "image",
318+
"image_url": "https://awsmp-logos.s3.amazonaws.com/3ec35b66-ca90-4ed0-8c9e-146fa65e1037/f3966518a472c0e5f51c57f5efb20da7.png",
319+
"alt_text": "Devtron Logo"
320+
}
321+
}
322+
]
323+
}
324+
```
325+
{% endcode %}
326+
327+
### For Discord
328+
329+
{% code title="Discord Webhook Payload" overflow="wrap" lineNumbers="true" %}
330+
```json
331+
{
332+
"content": "Automation Notification at Devtron \n App : {{devtronAppName}} \n Event Type : {{eventType}}"
333+
}
334+
```
335+
{% endcode %}
336+
337+
### For RingCentral
338+
339+
{% code title="RingCentral Webhook Payload" overflow="wrap" lineNumbers="true" %}
340+
```json
341+
{
342+
"activity": "CI Triggered",
343+
"attachments": [
344+
{
345+
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
346+
"type": "AdaptiveCard",
347+
"version": "1.0",
348+
"body": [
349+
{
350+
"type": "TextBlock",
351+
"text": "Automation Notification at Devtron \n App: {{devtronAppName}} \n Event Type: {{eventType}}",
352+
"weight": "bolder",
353+
"size": "medium",
354+
"wrap": true
355+
},
356+
{
357+
"type": "ColumnSet",
358+
"columns": [
359+
{
360+
"type": "Column",
361+
"width": "auto",
362+
"items": [
363+
{
364+
"type": "Image",
365+
"url": "https://awsmp-logos.s3.amazonaws.com/3ec35b66-ca90-4ed0-8c9e-146fa65e1037/f3966518a472c0e5f51c57f5efb20da7.png",
366+
"size": "small",
367+
"style": "person"
368+
}
369+
]
370+
},
371+
{
372+
"type": "Column",
373+
"width": "stretch",
374+
"items": [
375+
{
376+
"type": "TextBlock",
377+
"text": "Container Image Repo: {{devtronContainerImageRepo}} \n Container Image Tag: {{devtronContainerImageTag}}",
378+
"weight": "bolder",
379+
"wrap": true
380+
},
381+
{
382+
"type": "TextBlock",
383+
"spacing": "none",
384+
"text": "Triggered by: {{devtronTriggeredByEmail}}",
385+
"isSubtle": true,
386+
"wrap": true
387+
}
388+
]
389+
}
390+
]
391+
},
392+
]
393+
}
394+
]
395+
}
396+
```
397+
{% endcode %}
398+
399+
400+
264401

265402

266403

0 commit comments

Comments
 (0)