Configuring Amazon CloudWatch as a third-party data source
You can integrate IBM® NS1 Connect® with CloudWatch to publish messages from an Amazon Simple Notification Service (SNS) topic to your NS1 Connect data feed.
CloudWatch monitors the the status of Amazon Web Services (AWS) cloud resources. When integrated with NS1 Connect, CloudWatch sends monitoring data to NS1 Connect. Leveraging this data, NS1 Connect steers traffic around down or deprecated resources.
Integrating NS1 Connect with CloudWatch is a multi-step process that you complete in NS1 Connect, SNS, and CloudWatch. First, you create a data feed URL in NS1 Connect. Then you create a topic in SNS and an alarm in CloudWatch. Finally, in NS1 Connect, you add the data feed to an Up filter of a record.
Create a third-party data feed in NS1 Connect
The first task in configuring CloudWatch as a data source is to create a third-party data feed in NS1 Connect.
Complete this task in NS1 Connect.
- Navigate to the Integrations page from the main navigation.
- Under , click the icon corresponding to the data source.
- Enter a name for the data source for internal reference.
- Click Save data source. After the data source is saved, select Create a new feed with this data source?
- Enter a Name and an Alarm name for the data feed in their respective fields.
Note: Make note of the name. You must use this same name for the alarm that you create in CloudWatch.
- Click Save feed.
NS1 Connect creates a feed with a URL and displays it on the Feeds tab.
Note: Make note of the URL so that you can enter it in SNS.
Create a topic in SNS
The second task in configuring CloudWatch as a data source is to create a topic in SNS.
Complete this task in SNS.
- Create a topic.
- Click the link to the right of the new topic to modify its details.
- Click Create subscription and change the protocol to HTTPS.
- In Endpoint text, enter the URL of the feed that NS1 Connect created.
Create an alarm in CloudWatch
The third task in configuring CloudWatch as a data source is to create an alarm in CloudWatch.
You must create an alarm with the exact alarm name that you created for the data feed in NS1 Connect.
Complete this task in CloudWatch.
- In Create Alarm, select the metric.
- Click Next.
- Enter the same alarm name that you entered when you created a data feed in NS1 Connect.
- Define the passing or failing criteria.
- Add a notification to correspond to the status change from
AlerttoOK.This is required because by default AWS sends only a
POSTnotification to the webhook URL when an alert moves to anAlertstate, but not when a failing alarm has recovered back to anOKstate. Both are required so that the NS1 Connect data feed can keep its state consistent with AWS. - Click Create Alarm.
Refer to Using Amazon CloudWatch alarms for additional information.
The following example shows an alarm that is used to monitor CPU usage above 95% for a period longer than 5 minutes.
Create a Filter Chain
The final task in configuring CloudWatch as a data source is to create a Filter Chain.
Refer to Creating a Filter Chain and Common configurations for details.
Complete this task in NS1 Connect.
- Create a Filter Chain and set the Up filter on the record.
- Click the Feed icon to locate the data feed that you created.
When the alert status in CloudWatch changes state, the data feed is updated to reflect the change.