AWS CloudWatch integration

Moogsoft can collect both time series metrics and alarms from AWS CloudWatch. Moogsoft performs anomaly detection on all metrics and generates events for these anomalies before ingestion. See also AWS CloudWatch API.

Note

AWS CloudWatch is a paid service. Before you enable this integration, you should review Amazon's pricing policies to avoid unexpected charges. For more information, go to the AWS documentation and search for "CloudWatch pricing."

Note

It is good practice to create only one integration per AWS account.

Before You Begin

This integration was validated with AWS CloudWatch on May 14, 2020. Before you start to set up your integration, ensure you have met the following requirements:

  • You have an active AWS account.

  • You have the necessary permissions to create permissions and roles in AWS.

Managing CloudWatch Costs

This integration uses the AWS CloudWatch API, which is a paid service. You might get charged for using this API, depending on the number of metrics you ingest and the number of AWS regions you monitor.

Moogsoft polls the AWS CloudWatch API every once per minute, and uses batching to collect up to 500 metrics per request. CloudWatch allows a certain number of free API requests per month and then charges when you reach this limit.

Moogsoft recommends the following practices to avoid excessive CloudWatch costs:

  • Install and run the Collectors on your EC2 instances and disable EC2 CloudWatch monitoring. This avoids the costs of collecting EC2 instance metrics using the CloudWatch API.

  • In the AWS Integration page, enable monitoring only for metrics and regions of interest.

Here's a simplified example of how you can estimate your monthly costs for an individual resource. You have met your allotted number of free API calls for the month. Your integration is configured to monitor about 400 resources in one region and 200 resources in another region. The integration sends 2 calls per minute, for a total of 2880 per day. Suppose AWS charges you $.01 (one cent) for every 1,000 API calls and you get charged for 20 days of calls. The resulting charge would be:

  • 2880 calls per day

  • 57,600 calls over 20 days

  • $0.576 = 57,600 / 1,000 * $.01

For detailed pricing information and examples, see Amazon CloudWatch pricing.

AWS Setup: Create a new policy and role

  1. Open the Credentials Store in Moogsoft:

    1. Open a browser window and log in to the Moogsoft UI.

    2. Choose Settings > Credentials Store.

    3. Click Add Credentials and choose AWS IAM. Leave this page open for now.

  2. Open a separate browser window. Then log in to the AWS Console and go to Services > IAM.

    Leave both the Moogsoft Credentials Store and the AWS Console browser windows open until you finish this workflow. You will need to copy/paste information between the two windows.

  3. In the AWS Console, go to Policies and define a new permissions policy as follows:

    1. Click Create Policy and click the JSON tab.

    2. For the JSON policy, copy and paste the policy from the Moogsoft Credentials Store (click Show required AWS policy).

      Note

      This policy includes the iam:SimulatePrincipalPolicy action, which Moogsoft uses to test the integration with your AWS CloudWatch estate. You can remove this action if desired, but this will disable the integration testing functionality.

    3. Click Review Policy, enter a policy name, and then click Create Policy.

  4. Go to Roles and create a new role as follows:

    1. Click Create Role.

    2. Under Select type of trusted entity, choose Another AWS account.

    3. For Account ID, copy and paste the Moogsoft AWS account number shown in the Moogsoft Credentials Store.

      This is the Moogsoft account that will receive data from CloudWatch.

    4. Under Options, enable Require external ID.

    5. Copy and paste the External ID from the Moogsoft Credentials Store. Click Generate External ID if necessary.

    6. Do not enable Require MFA.

    7. Click Next: Permissions and add the policy you created previously.

    8. Proceed through the remaining steps of the Create Role wizard, accepting the default settings. In the Review page, enter a role name and click Create Role

Moogsoft setup

To configure the AWS CloudWatch integration:

  1. Return to the Moogsoft Credentials Store window and define your AWS IAM credentials as follows:

    • AWS Account Number — In the AWS Console, go to My Security Credentials. Then copy and paste the AWS account ID.

    • IAM Role — Enter the role you defined previously.

    • External ID — Do not change or update this ID. It must be the same ID you used when you created your role.

  2. Click Save to save your IAM credentials.

  3. Choose Ingestion Services > AWS CloudWatch and create a new integration.

  4. Select the AWS credentials you defined previously.

  5. Click Test to verify that Moogsoft can connect to your AWS account.

  6. Specify the other CloudWatch integration settings as follows:

    • Region — Select the AWS regions to observe.

    • AWS Services — Select the AWS services to observe.

    • Collect CloudWatch Alarms — Enable this option if you want to collect alarms in addition to standard CloudWatch metrics. Moogsoft ingests alarms as events and converts them to alerts.

    • Collect Custom Metrics — Enable this option if you want to send any custom metrics you are collecting to AWS CloudWatch.

    Note

    It is generally good practice to collect only the metrics and alarms that you want Moogsoft to observe.

  7. Enter an integration name and click Save.

  8. Optionally, you can go to the Configuration tab and edit anomaly detection settings for individual metrics.

Watch how to Integrate Moogsoft with AWS Cloudwatch.