OpsRamp integration with Amazon CloudWatch Metric Streams provides a way to ingest AWS metrics without periodically polling AWS APIs.

To continuously deliver metric data from each AWS account to OpsRamp, create:

  • A Kinesis Data Firehose delivery stream that delivers metrics to OpsRamp.
  • A CloudWatch Metric Stream linked to the delivery stream.

After these resources are created, OpsRamp receives the streamed metrics. Resource and metric identification is based on labels sent from AWS and their mapping to resources in OpsRamp. Templates are used to configure alerts and resource availability; they are not required to map streamed metric data.

Enable AWS Metric Streaming

  1. From All Clients, select a client.

  2. Go to Setup > Integrations and Apps.

  3. Under Options, select Enable Metric Streaming. This option is available when installing a new AWS integration or editing an existing integration. The existing screenshot is retained.

    Enable Metric Streaming option
  4. Click Save.

  5. Go to Installed Integrations and select the integration for which you enabled metric streaming.

  6. From the Actions menu, click Edit.

    Edit AWS integration
  7. Go to the Perform Actions tab and copy the metric streaming URL. You need this URL when configuring metric streaming in AWS.

    AWS metric streaming URL

Configure AWS Metric Streaming in AWS Console

OpsRamp provides a CloudFormation template that provisions the resources required for metric streaming in your AWS account:

  • A Kinesis Data Firehose delivery stream that delivers metrics to the OpsRamp HTTP endpoint.
  • A CloudWatch Metric Stream linked to the delivery stream.
  • The IAM roles required by Firehose and the metric stream.

This is the recommended approach because it creates and configures these resources for you.

Download the CloudFormation template

  1. From All Clients, select a client.

  2. Go to Setup > Integrations and Apps.

  3. Under Options, ensure that Enable Metric Streaming is selected.

  4. Open the integration’s Options tab.

  5. Next to the Enable Metric Streaming URL, click Download CloudFormation Template.
    The CloudFormation template is downloaded as a .yaml file.

    Download CloudFormation template for AWS metric streaming

Deploy the template in AWS

  1. Sign in to the AWS Management Console and open CloudFormation in the AWS account and Region where you want to stream metrics.

  2. Select Create stack > With new resources (standard).

  3. Under Specify template, select Upload a template file.

  4. Select the downloaded .yaml template, and then click Next.

    Upload the metric streaming CloudFormation template
  5. Enter a name for the stack.

  6. Under Parameters, review or provide the required values:

    • Existing integration: If metric streaming is already enabled, the endpoint URL is prepopulated.
    • New integration: Enter the required parameters, such as OpsRampMetricStreamUrl, using the URL available on the integration’s Options tab.
    Configure metric streaming parameters in CloudFormation
  7. Click Next and review the stack configuration.

  8. Acknowledge that AWS CloudFormation might create IAM resources, and then create the stack.

  9. Wait until the stack status changes to CREATE_COMPLETE.

Repeat these steps for each AWS account and Region from which you want to stream metrics.

Configure AWS Metric Streaming manually

If you prefer not to use the CloudFormation template, create the Kinesis Data Firehose delivery stream and CloudWatch Metric Stream manually.

Create a delivery stream in Kinesis Data Firehose

  1. In the AWS Console, go to Amazon Kinesis > Delivery streams > Create delivery stream.

  2. Create a delivery stream with the following settings:

    • Source: Direct PUT.
    • Destination: HTTP Endpoint.
  3. Enter a delivery stream name.

    Create a Kinesis Data Firehose delivery stream
  4. Under Destination settings, enter the URL copied from the OpsRamp AWS integration in the HTTP endpoint URL field.

  5. Set Retry duration to 60 seconds. The allowed range is 0 to 7200 seconds. This is the length of time Firehose retries delivery after a failure, including the first attempt.

    Set the Firehose retry duration
  6. Under Buffer hints, set Buffer size to 1 MiB.

    Set the Firehose buffer size
  7. Choose the S3 backup bucket to receive data that cannot be delivered to the HTTP endpoint.

    Choose an S3 backup bucket
  8. Click Create Delivery stream. The delivery stream is created.

    Kinesis Data Firehose delivery stream created

Create a metric stream in CloudWatch

  1. In CloudWatch, go to Metrics > Streams.

  2. Select All metrics to stream monitoring data for all resources onboarded in AWS.

  3. Under Configuration, select the delivery stream you created earlier.

    Select the Kinesis Data Firehose delivery stream
  4. Set the output format to JSON.

    Set the CloudWatch metric stream output format
  5. Enter a name in the Metric stream name field.

    Name the CloudWatch metric stream
  6. Click Create metric stream. The metric stream is created.

Validate

After the CloudFormation stack is created or manual configuration is complete, wait for OpsRamp to recognize the change. Go to the Metrics section in OpsRamp and verify that streamed metrics are populating for the specified AWS account.