# MongoDB Atlas Integration

[MongoDB Atlas](https://www.mongodb.com/) is a fully-managed cloud database that handles all the complexity of deploying, managing, and deployments to the preferred cloud service provider (AWS , Azure, and GCP). With the MongoDB Atlas integration, alerts about replica lag, slow queries, or resource caps are forwarded to on-call engineers via ilert. These technical alerts trigger escalation policies and deliver necessary context, helping teams maintain database performance and reliability.

## In ilert: Create a MongoDB Atlas alert source

1. Go to **Alert sources** --> **Alert sources** and click on **Create new alert source**

   <figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FjX0cS4q7woTXKajZmc1W%2FScreenshot%202023-08-28%20at%2010.21.10.png?alt=media&#x26;token=8ef3666b-84eb-4b51-abee-f07303313941" alt=""><figcaption></figcaption></figure>
2. Search for **MongoDB Atlas** in the search field, click on the MongoDB Atlas tile and click on **Next**.&#x20;

   <figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FlXzQlJpaTFSR49AZk0xA%2FScreenshot%202023-08-28%20at%2010.24.23.png?alt=media&#x26;token=cffeacb4-57b9-47d4-827d-b0f6b1afd914" alt=""><figcaption></figcaption></figure>
3. Give your alert source a name, optionally assign teams and click **Next**.
4. Select an **escalation policy** by creating a new one or assigning an existing one.

   <figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FNnuZqONaIhbOf6fn4OkZ%2FScreenshot%202023-08-28%20at%2011.37.47.png?alt=media&#x26;token=8a74f7b5-5bd2-4eea-97fa-1c1dbb041333" alt=""><figcaption></figcaption></figure>
5. Select you [Alert grouping](https://docs.ilert.com/alerting/configure-alerting/alert-sources#alert-grouping) preference and click **Continue setup**. You may click **Do not group alerts** for now and change it later.&#x20;

   <figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FueugN4JgHn1c90ggFA6u%2FScreenshot%202023-08-28%20at%2011.38.24.png?alt=media&#x26;token=b8009daf-3ca8-4264-a6fa-e42ef7333205" alt=""><figcaption></figcaption></figure>
6. The next page show additional settings such as customer alert templates or notification prioritiy. Click on **Finish setup** for now.
7. On the final page, an API key and / or webhook URL will be generated that you will need later in this guide.

   <figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2Fi3TIOBvNYBQfDtNpmm0A%2FScreenshot%202023-08-28%20at%2011.47.34.png?alt=media&#x26;token=6cae965a-e448-4443-8c20-37cf501c43b2" alt=""><figcaption></figcaption></figure>

## In MongoDB Atlas

1. In the Project page, click the **Bell (Notification) Icon** on top right.

![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2Fm31UMqmx7m86H7bPn0B2%2Fmongodb_project_alert.png?alt=media\&token=55f33c22-0518-486c-a30e-a53049f222c9)

2. Add Webhook Settings in Integration if it was not configured, by clicking **Integrations** and add the Webhook Settings (there can only be one Webhook).

![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FHR8wXdVKNes5nI6Cui8X%2Fmongodb_project_webhook.png?alt=media\&token=ddaef699-9203-49bf-8746-96bf25e47bdc)

3. Create the Alert by navigating to **Alert -> Add New Alert**. From here any alerts can be added, and make sure that it sends the Alert to the Webhook.

![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FcPcHE2AE2V7pJyIxLDke%2Fmongodb_project_addalert.png?alt=media\&token=6281c0cb-defa-47ec-bda8-9708bd676512)

4. If the Alert has been configured, it should show up in the **Alert Settings** tab and the Alert should be created in ilert.

![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FTAmCsKMEuLHCr8s080N8%2Fmongodb_project_alertsettings.png?alt=media\&token=7539fca0-3e64-4c34-b1e4-42b5f1d5a322)
