# Amazon CloudWatch Integration

[Amazon CloudWatch](https://aws.amazon.com/cloudwatch/) is a monitoring service for AWS cloud resources and applications running in the AWS Cloud. Amazon CloudWatch can monitor AWS resources, such as EC2 instances, Amazon DynamoDB tables, and Amazon RDS DB instances, as well as application and service generated metrics and log files.

With ilert's CloudWatch integration, you can automatically create alerts in ilert from CloudWatch alarms. That way, you will never miss a critical alert and always alert the right person using ilert's on-call schedules, automatic escalation, and multiple alerting channels. When CloudWatch creates an alarm, ilert will alert the on-call person through their preferred channel, including SMS, phone calls, push notifications and Slack. ilert will automatically escalate to the next person, if the alert is not acknowledged. ilert also lets you define alerting rules based on support hours and delay alerts until your support hours start.

## In ilert: Create a CloudWatch alert source <a href="#create-alert-source" id="create-alert-source"></a>

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

   <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 **Amazon Cloudwatch** in the search field, click on the Amazon Cloudwatch tile and click on **Next**.<br>

   <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.<br>

   <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.<br>

   <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%2FJ1QwcjLiVLOyieOrgmpC%2FScreenshot%202023-08-28%20at%2011.47.34.png?alt=media&#x26;token=72dc29a2-ded0-44cd-89bc-229bb0569626" alt=""><figcaption></figcaption></figure>

## In AWS SNS: Create topic <a href="#create-topic" id="create-topic"></a>

{% hint style="info" %}
If you have already created an SNS topic for your CloudWatch alarms that you want to reuse, you can proceed to step 3.
{% endhint %}

1. In the SNS Dashboard click on "Create topic"<br>

   ![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M76ygPnS4HUcFSX8ulm%2F-M9ShA8LCwIa8gVjr4VX%2F-M9ShU_yV2i6dnjuZlZL%2Fcw3.png?alt=media\&token=9c8038f5-d475-401a-a28e-af8814a28c28)
2. Name the topic and click on "Create topic".<br>

   ![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M76ygPnS4HUcFSX8ulm%2F-M9ShA8LCwIa8gVjr4VX%2F-M9Shad2FnMhA3UO9vJY%2Fcw4.png?alt=media\&token=be019888-ff60-4ff1-8851-cb7fa773e3c5)
3. Click on "Create subscription" on the Topic Detail page

   ![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M76ygPnS4HUcFSX8ulm%2F-M9ShA8LCwIa8gVjr4VX%2F-M9ShoMDQPgf3Ij8NHlq%2Fcw5.png?alt=media\&token=4cf22bc1-c6da-4d55-a3f7-bfc84461a4f5)
4. Select "HTTPS" as the protocol and copy the webhook URL from the above created alert source to ilert at Endpoint and click on "Create subscription".<br>

   ![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M76ygPnS4HUcFSX8ulm%2F-M9ShA8LCwIa8gVjr4VX%2F-M9ShuDJpIlCIwXBc8W2%2Fcw6.png?alt=media\&token=6f6eefba-a8cd-4d20-bdd6-37256327a2c3)
5. The subscription is automatically confirmed by ilert when it is created. After updating the overview, the status "PendingConfirmation" should disappear and the ID should be displayed.<br>

   ![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M76ygPnS4HUcFSX8ulm%2F-M9ShA8LCwIa8gVjr4VX%2F-M9ShyFDxdBKuNw8z0_v%2Fcw7.png?alt=media\&token=a3cbea13-de61-44d3-b1a8-abe558a838b2)

## In AWS CloudWatch: Create alarm and link to topic <a href="#create-alarm" id="create-alarm"></a>

You can now link any CloudWatch alarm to the topic you have created. The following section describes how to create an alarm and make the link.

1. In CloudWatch, on the Alarms tab, click Create Alarm and select a metric

![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M76ygPnS4HUcFSX8ulm%2F-M9ShA8LCwIa8gVjr4VX%2F-M9Si2vA73CIzSY5h58P%2Fcw8.png?alt=media\&token=a7cfe608-652c-4de4-b96c-20e1af68e4a2)

2. Click on "+ Notification" to add two "Notification Actions": one for the states ALARM and OK. In the "Send notification to:" box, select the topic created above.<br>

   ![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M76ygPnS4HUcFSX8ulm%2F-M9ShA8LCwIa8gVjr4VX%2F-M9Si8dU0bFpCFgBW4LS%2Fcw9.png?alt=media\&token=b2de6639-42cb-4637-ad64-e06b799cf181)

   ![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M76ygPnS4HUcFSX8ulm%2F-M9ShA8LCwIa8gVjr4VX%2F-M9SiHyD9wyRqbanw-a7%2Fcw10.png?alt=media\&token=00d99943-ef6c-4bd3-9992-857c2a6efd29)

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

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

Yes, as soon as the condition of an alarm is OK again in CloudWatch, the alert in ilert will be fixed.

**Can I link CloudWatch to multiple alert sources in ilert?**

Yes, create an SNS topic in CloudWatch for each alert source. You can then select for each alert in CloudWatch which topic you want to use for alerting.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ilert.com/integrations/inbound-integrations/amazon-cloudwatch.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
