# Google Cloud Monitoring (formerly Stackdriver) Integration

With [Google Cloud Monitoring](https://cloud.google.com/monitoring) you can gain visibility into the performance, availability, and health of your applications and infrastructure.

## In ilert: Create a Google Cloud Monitoring alert source <a href="#in-ilert" id="in-ilert"></a>

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 **Google Cloud Monitoring** in the search field, click on the Google Cloud Monitoring 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 Google Cloud Console: Create Webhook Notification Channel <a href="#create-webhook-notification" id="create-webhook-notification"></a>

1. Go to Google Cloud Console and search for Monitoring

![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M76ygPnS4HUcFSX8ulm%2F-MkHNgatvPiuy0QQ6AzC%2F-MkboOKG4rZ7xBB_lHqH%2FScreenshot_27_09_21__17_12.png?alt=media\&token=d13b99e8-dfc3-44aa-9a09-2f87af4c5010)

2. On the Monitoring page go to **Alerting** and click on the **Edit Notification channels** button

![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M76ygPnS4HUcFSX8ulm%2F-MkHNgatvPiuy0QQ6AzC%2F-Mkbp0J8MrM1hv8VgEyG%2FScreenshot_27_09_21__17_15.png?alt=media\&token=9341bee1-ba14-4b45-ab02-e3b03d8b3b08)

3. On the Notification Channels page click on the **Add New** button beside the Webhooks channels.

![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M76ygPnS4HUcFSX8ulm%2F-MkHNgatvPiuy0QQ6AzC%2F-MkbpciTuNJbM5r3QohH%2FScreenshot_27_09_21__17_17.png?alt=media\&token=1e395565-244d-4e00-abb4-e39457f18ab2)

4. Assign a **Display Name** on the following modal (e.g. ilert) and in the field "Endpoint URL" paste the **Webhook URL** that you generated in ilert and click on the **Save** button.

![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M76ygPnS4HUcFSX8ulm%2F-MkHNgatvPiuy0QQ6AzC%2F-MkbqIExdHXCzsj2-xxk%2FScreenshot_27_09_21__17_21.png?alt=media\&token=0aa0415c-c920-4bfc-bd1e-e4dec568d3a2)

5. After you've created the ilert webhook, you can use it as a notification in any Alerting Policy in Google Cloud Monitoring. The following screenshot will create a new Alerting Policy with ilert as the notification method.

![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M76ygPnS4HUcFSX8ulm%2F-MkHNgatvPiuy0QQ6AzC%2F-Mkbr1cSsBTN7vaNY1mc%2FScreenshot_27_09_21__17_25.png?alt=media\&token=32363840-b776-4f15-8f0f-a67836a19985)

## FAQ <a href="#faq" id="faq"></a>

**Will alerts in ilert be resolved automatically?**

Yes, as soon as the state of an alert in Google Cloud Monitoring is `RESOLVED`, the associated alert in ilert is resolved.

**Can I link Google Cloud Monitoring to multiple alert sources in ilert?**

Yes, create a webhook for each alert source in Google Cloud Monitoring. You can then choose which Webhook to use for alerting for each Alerting Policy in Google Cloud.
