AWS Logo

Amazon CloudWatch Integration Guide

Amazon CloudWatch is an observability tool that helps monitor AWS resources and services. It collects data, gains insights and helps track system changes across your AWS platform. It allows alerts to be set for certain metric thresholds. When metrics fall outside the threshold, alerts are triggerd.

Increase the effectiveness and visbility of these alerts with TaskCall's Amazon CloudWatch integration. Alerts will be received in TaskCall immediately after they trigger on CloudWatch, kicking off our powerful and persistent notification mechanism to bring the correct responders on-board and resolve it with urgency.

Pointers

  • The integration is between a TaskCall service and Amazon CloudWatch.
  • Incidents will automatically resolve in TaskCall when metrics fall back within the normal threshold.
  • Similar alerts will be automatically grouped together into one incident to avoid interrupting responders unnecessarily.
  • This integration only receives alerts in TaskCall from Amazon CloudWatch.

In TaskCall

  1. Go to Configurations > Integrations and click New Integration.
  2. Select the Amazon CloudWatch integration.
  3. Give the integration a name and configure how incidents will be created. Only the Default Service field is required. The rest are optional.
  4. Incidents (Optional)
    1. TaskCall automatically maps incoming payloads with internal attributes to create incidents. However, this can be customized in the Incidents tab. Constant values can be included alongside placeholders to dictate which attributes should map to the Incident Title, Description, Tags, Snapshots and Vendor URL. To insert a placeholder use double curly braces.

      Incoming Webhook Incident Tab

      For example, if you enter {{ alert.title }} in the Incident Title field, TaskCall will look for an attribute called "title" nested inside another attribute called "alert" in the incoming payload. If the nested attribute exists, its corresponding value will be pulled from the payload and inserted. If the nested attribute does not resolve successfully, TaskCall will fall back to the default mapping.

      If you are unsure, please leave the fields empty. TaskCall will use the default mapping to create the incident for you.
    2. Select the Urgency level the incident should be created at.
    3. Select the option to Group similar alerts together if you would like follow up triggers from the same alert source to be grouped into the same incident. If you leave this option unchecked, then a new incident will be created for every trigger. (This behavior is specific to new triggers; not updates to an alert.)
    4. Click Next to move on to the Services tab.
  5. Services (Required)
    1. Select the Default Service incidents should be sent to. To route incidents to different services instead, set Map With Attribute to the attribute to route by using a placeholder. Then, map each value it can take to the service that should receive it.

      For example, to route by a region attribute sent in the payload, set Map With Attribute to {{ region }}, then map US to one service and EU to another, and so on.

      Incoming Webhook Services Tab
    2. Click Next to move on to the Authorization tab.
  6. Authorization (Optional)
    1. The Authorization tab allows a Bearer Token and an IP Allowlist be added if you would like to restrict who is able to send alerts to this integration. If you are unsure, this can be skipped.
  7. Once done, click Save.
  8. Copy the Integration Url that is issued for the integration. This will be used to set up the notification in AWS.

In AWS

  1. First, we have to set up a notification service to send alerts to TaskCall. Type SNS (Simple Notification Services) in the search bar up top. Once you are on the SNS page, go to Topics > Create topic.
  2. Set the topic type to Standard. Give it a name and a display name. Click Create topic.

    AWS CloudWatch Integration Step 1

  3. Once the topic is created, from the same page go to Subscriptions > Create subscription.
  4. For the Topic Arn select the topic you just created; set the protocol as HTTPS; paste the Integration Url you copied over from TaskCall in the Endpoint. Nothing else needs to be added. Click Create subscription.

    AWS CloudWatch Integration Step 2

    Once the subscription is created, if the "Status" shows as "Pending confirmation", then refresh the page. It will update the status to "Confirmed".
  5. Now you can add the SNS topic you created above to any CloudWatch Alarm and get notified.

If you have not created a CloudWatch Alarm before then please continue reading to understand how one can be configured to create incidents in TaskCall using the SNS topic you created.

Create a CloudWatch Alarm

  1. In the AWS console, search and select CloudWatch.
  2. From the navigation bar on the left, go to Alarms > All Alarms. Then click Create Alarm.
  3. Select the type of metric you would like to monitor. AWS offers a range of metrics that can be monitored across all component groups – EC2, RDS, S3, Elasticache, VPC, etc.
    CloudWatch Select Metric
  4. Set the conditions and thresholds based on which the alarms will be generated. Set the type of statistic (average, sum, maximum, etc) and the period of statistical consideration for the evaluation. Define the condition type (greater than, equal to, etc) and the threshold value for the evaluation. Once you are done with this step, click Next.
    CloudWatch Configure Conditions
  5. In the next step you will define the notifications that should be sent out for this CloudWatch alarm. We will define two notifications:
    • when the metric is In alarm
    • when the metric is Ok

    For each notification, set the TaskCall SNS topic you created earlier as the endpoint to send notifications to.
    CloudWatch Configure Actions
    You can additionally set up the metric to trigger when there is insufficient data as well. Click Next to continue.
  6. In the next step, you will give the alarm a name and description. Click Next to continue.
  7. Finally, preview your configurations and click Create alarm when you are done.

That’s it! Your integration should be ready at this point. Whenever the metric you defined goes beyond the acceptable threshold an incident will be created in TaskCall. When the metric falls back within its normal range, the incident will be automatically resolved in TaskCall as well.

You can refer to the AWS's documentation for creating CloudWatch alarms for more details.

On this page