CloudWatch alarms integration via Events API

Prev Next

Amazon CloudWatch monitors your Amazon Web Services (AWS) resources and the applications you run on AWS in real-time. You can use CloudWatch to collect and track metrics, which are variables you can measure for your resources and applications. You can create alarms that watch metrics and send notifications or automatically make changes to the resources you are monitoring when a threshold is breached.

In this integration, we are sending CloudWatch alarms into Catchpoint via Events API so that users can:

  • Have a single pane of glass to view DEM alerts and backend alerts.
  • Correlate front end alerts to the backend events.
  • Assess the impact on end-user performance caused by backend issues.

Integration architecture:

  • CloudWatch alarm triggers are setup for AWS resources such as EC2, ECS, CloudFront, RDS, etc.
  • CloudWatch will publish alarms to AWS SNS service.
  • Lambda function that is subscribed to the AWS SNS service gets triggered.
  • Lambda receives the SNS notification, parses and pushes it to Catchpoint via Events API.

Pic_1.png

Step 1 – SNS setup

Create the SNS topic as shown below. This new topic will act as the bridge between CloudWatch and Lambda as detailed in the next 2 steps.

Pic_2.png

Step 2 – CloudWatch alarm setup

The notification will be sent to the SNS topic created in Step 1.

Pic_3.png

Step 3 – Setup Lambda Function

Lambda function can be created from a blueprint – SNS message (nodeJS). SNS topic created on Step-1 will be the trigger of this Lambda function.

Pic_4.png

Node JS code attached (Alarms.js).

Step 4 - Catchpoint setup

Reach out to CSM if Events API is not enabled in your account. You can find it under Settings > API.

Assuming ‘Events API’ is enabled, please copy the following two items and add them to the index.js

  • ID value: in the POST request body for the field ‘s’
  • Secret value: in the HTTP header ‘CP-Secret’

Any time an alarm is triggered in AWS CloudWatch, it will be made available in the Catchpoint UI and can be viewed on either the default Overview dashboards or on Smartboard.

Pic_5.png pic21.png