How to use IBM App Connect with Amazon CloudWatch

Amazon CloudWatch is a monitoring and management service that offers data and useful insights for on-premises, hybrid, and AWS resources and applications that run on AWS in real time. Amazon CloudWatch can be used to collect and track metrics, which are the variables used to measure resources and applications.

Availability:
  • App Connect Enterprise as a Service connector
  • A local connector in a Designer instance of IBM App Connect in containers (Continuous Delivery release)Local connector in containers (Continuous Delivery release) 12.0.7.0-r1 or later
  • A local connector in a Designer instance of IBM App Connect in containers (Support Cycle 2)Local connector in containers (Long Term Support Cycle-2 release)

Connecting to Amazon CloudWatch

Complete the connection fields that you see in the App Connect Designer Catalog page or flow editor. If necessary, work with your Amazon CloudWatch administrator to obtain these values.

Amazon CloudWatch connection fields:
Table 1. Connection fields and their description
Connection field Description
Secret access key The secret access key of your Amazon CloudWatch account. Get the secret access key from the Security Credentials page in the AWS Management Console.
Access key ID The access key ID of your Amazon CloudWatch account. Get the access key ID from the Security Credentials page in the AWS Management Console.
Region The region of your Amazon CloudWatch instance, for example, us-east-1.
Tip: For more information, see AWS service endpoints on the AWS documentation page.
To obtain the connection values (Secret access key and Access key ID) for Amazon CloudWatch and to connect to App Connect, do the following steps:
  1. Log in to your AWS account.
    Note: You can choose between Root user or IAM user based on your role.
    • Root user: Account owner that performs tasks requiring unrestricted access.
    • IAM user: User within an account that performs daily tasks.
    Note: AWS recommends using identity-based managed policies to attach permission sets and roles to an identity, and grant only the permissions the user needs. These policies control what actions that identity can perform, on which resources, and under what conditions. While setting the permissions for an identity in IAM, you can decide whether to use an AWS-managed policy, a customer-managed policy, or an inline policy.

    An AWS-managed policy is a standalone policy that is created and administered by AWS. The following are some examples of AWS-managed policies that are specific to Amazon CloudWatch:

    • CloudWatchApplicationInsightsFullAccess policy provides full access to Amazon CloudWatch service and all connector operations are accessible.
    • CloudWatchApplicationInsightsReadOnlyAccess policy gives limited read-only access, and few connector operations are accessible.
    • CloudwatchApplicationInsightsServiceLinkedRole policy is attached to a service-linked role that allows Application Insights to monitor customer resources.
    For more information about AWS-managed policies that are specific to Amazon CloudWatch, see AWS managed policies for Amazon CloudWatch Application Insights on the AWS documentation page.
  2. On the navigation menu, click Users.
  3. Select your applicable user name or account name.
  4. Click the Security credentials tab, and then click Create access key.
  5. To view the new access key, click Show.
    Note: You can retrieve the secret access key only when you create the key pair for the first time.
  6. For more information, see AWS Account and Access Keys on the AWS documentation page.

To connect to a Amazon CloudWatch endpoint from the App Connect Designer Catalog page for the first time, expand Amazon CloudWatch, then click Connect. For more information, see Managing accounts.

Tip:

Before you use the account that is created in App Connect in a flow, rename the account to something meaningful that helps you to identify it. To rename the account on the Catalog page, select the account, open its options menu (⋮), then click Rename Account.

General considerations

Before you use App Connect Designer with Amazon CloudWatch, take note of the following considerations:

  • (General consideration) You can see lists of the trigger events and actions that are available on the Catalog page of the App Connect Designer.

    For some applications, the events and actions in the catalog depend on the environment and whether the connector supports configurable events and dynamic discovery of actions. If the application supports configurable events, you see a Show more configurable events link under the events list. If the application supports dynamic discovery of actions, you see a Show more link under the actions list.

  • (General consideration) If you are using multiple accounts for an application, the set of fields that is displayed when you select an action for that application can vary for different accounts. In the flow editor, some applications always provide a curated set of static fields for an action. Other applications use dynamic discovery to retrieve the set of fields that are configured on the instance that you are connected to. For example, if you have two accounts for two instances of an application, the first account might use settings that are ready for immediate use. However, the second account might be configured with extra custom fields.

Events and actions

Amazon CloudWatch events

These events are for changes in this application that trigger a flow to start completing the actions in the flow.

Note: Events are not available for changes in this application. You can trigger a flow in other ways, such as at a scheduled interval or at specific dates and times.

Amazon CloudWatch actions

Your flow completes these actions on this application.

Composite alarms
Retrieve composite alarms
Update or create composite alarm
Enable composite alarm
Disable composite alarm
Export tasks
Retrieve export tasks
Create export task
Log events
Retrieve log events
Retrieve filtered log events
Create multiple log events
Log groups
Create log group
Retrieve log groups
Delete log group
Log streams
Create log stream
Retrieve log streams
Delete log stream
Metric alarms
Update or create metric alarm
Retrieve metric alarms
Delete metric alarm
Enable metric alarm
Disable metric alarm
Metric streams
Retrieve metric streams
Update or create metric stream
Delete metric stream
Start metric stream
Stop metric stream
Metrics
Retrieve metrics
Publish custom metric data

Examples

Dashboard tile for a template that uses Amazon CloudWatch
Dashboard tile for a template that uses Amazon CloudWatch
Dashboard tile for a template that uses Amazon CloudWatch

Use templates to quickly create flows for Amazon CloudWatch

Learn how to use App Connect templates to quickly create flows that perform actions on Amazon CloudWatch.For example, open the Templates gallery, and then search for Amazon CloudWatch.

Amazon CloudWatch flow in detailed view

Use IBM® App Connect to build flows that integrate with Amazon CloudWatch.

Read the blog in the IBM Community to learn how to trigger an alarm whenever the threshold is violated based on the Amazon CloudWatch published metric data. Click Read the blog to go to the blog.