Skip to main content

AWS CloudWatch

Oodle supports ingesting Amazon CloudWatch metrics and logs.

Setup​

  1. Open Settings -> Integrations page in Oodle UI.

  2. Choose Amazon Web Services integration tile.

  3. Select the appropriate API key from the dropdown at the top of the drawer

AWS tile API Key dropdown
  1. Add your AWS account by entering AWS account ID and launching the Cloudformation Stack. The Cloudformation stack creates an IAM role to provide Oodle access to your AWS account

    Add Account
  2. Configure metrics to be collected in the Metrics tab. You can filter for specific AWS services and also via tags to filter within a AWS service.

    Setup Metrics

    Oodle pre-configures dashboards for your selected services.

    Optional: in the Limit metrics step, select the metrics that Oodle pulls from each service. See Limit the metrics that Oodle pulls.

  3. Configure CloudWatch logs to be collected in the Logs tab by following the instructions.

    Setup Logs

Limit the metrics that Oodle pulls​

AWS bills each metric and statistic that Oodle requests with GetMetricData. To lower that cost, give each service a metric name filter in the Limit metrics step of the Metrics tab:

  • All: Oodle pulls every metric of the service. This is the default.
  • Include only: Oodle pulls only the metrics whose name matches a pattern.
  • Exclude: Oodle pulls all metrics except those whose name matches a pattern.

A pattern matches the full metric name that you see in Oodle, for example aws_ec2_cpuutilization_maximum. Each statistic of a CloudWatch metric is a different name in Oodle, so a filter can keep the maximum of a metric and drop its average. Oodle does not request the dropped statistics from AWS. * matches zero or more characters and ? matches one character. Case is ignored. Some examples:

  • aws_ec2_network* matches all statistics of NetworkIn and NetworkOut.
  • *_samplecount matches the SampleCount statistic of every metric.

All metric names of a service start with the same prefix, for example aws_ec2_ for EC2. Oodle refuses a pattern that cannot match a name of its service, such as a CloudWatch name (CPUUtilization) or a Datadog name (aws.ec2.network_in).

A change applies at the next scrape. Dashboards and alerts on the metrics that you drop show no new data.

You can also set the filters with the metric_name_filters attribute of the oodle_aws_integration Terraform resource, or with oodle integrations aws update --metric-filter 'AWS/EC2:include=aws_ec2_cpuutilization_maximum,aws_ec2_network*'.

Visualize CloudWatch metrics from API Integration​

After setting up the data source, you can visualize your CloudWatch metrics in Oodle. Under your AWS account - open the Metrics tab, go to Explore Metrics and choose your newly added CloudWatch data source. You should now be able to query and visualize your metrics.

Metrics Streaming Integration​

CloudWatch Metric Streams allows you to continually stream CloudWatch metrics to Oodle, with near-real-time delivery and low latency (3-5 minutes). This streaming integration is powered by Amazon CloudWatch Metric Streams and Amazon Kinesis Data Firehose.

Set up Metrics Streaming​

  1. We'll set up CloudWatch streaming and Amazon Kinesis Firehose using a CloudFormation template. Download the template from this link

  2. Each AWS service has its own namespace and set of metrics. Here are some common AWS services and their namespaces:

    • AWS/EC2: EC2 instance metrics like CPUUtilization, NetworkIn/Out, DiskReadOps/WriteOps
    • AWS/RDS: Database metrics including DatabaseConnections, ReadIOPS, WriteIOPS, CPUUtilization
    • AWS/ECS: Container metrics like CPUUtilization, MemoryUtilization, NetworkRxBytes/TxBytes
    • AWS/DynamoDB: Database metrics including ConsumedReadCapacityUnits, ConsumedWriteCapacityUnits
    • AWS/ApplicationELB: Load balancer metrics including RequestCount, TargetResponseTime, HTTPCode_Target_2XX_Count

    You can identify the namespaces you want to monitor using one of these methods:

    a. List all namespaces in your AWS account using the AWS CLI:

    aws cloudwatch list-metrics --output json | jq -r '.Metrics[].Namespace' | sort -u

    b. View specific namespaces by opening your All Metrics page in CloudWatch to see a list of all available namespaces for the services you are using

    Choose the namespaces based on the AWS services you want to monitor. The corresponding metrics for those namespaces will be streamed to Oodle.

    For more details on available metrics for each service, see Viewing available metrics in the AWS CloudWatch documentation.

  3. Once you have identified the namespaces, modify the template downloaded in step 1 to specify which CloudWatch namespaces you want to monitor by adding them to the MetricsStream.Properties.IncludeFilters array. Example:

MetricStream:
Type: AWS::CloudWatch::MetricStream
Properties:
.
.
.
IncludeFilters:
- Namespace: AWS/GlobalAccelerator
- Namespace: AWS/NetworkELB
- Namespace: AWS/ECS
- Namespace: AWS/DynamoDB
- Namespace: ECS/ContainerInsights
- Namespace: AWS/ElastiCache
- Namespace: AWS/ES

This example will stream metrics from Global Accelerator, Network Load Balancer, Amazon ECS, DynamoDB, ECS Container Insights, ElastiCache, and Elasticsearch Service to Oodle.

  1. To run the template, you will need two parameters:

    • OodleHttpEndpoint - The URL to send metrics to
    • OodleApiKey - The API key for authentication

    Navigate to the integrations page in your Oodle account and click the "View API Key" button in the top right to find the instance name and API key. You can use the following URL for OodleHttpEndpoint: https://{OODLE_INSTANCE}.collector.oodle.ai/v1/aws/${OODLE_INSTANCE}/metrics

  2. Deploy the CloudFormation template in your AWS account using the AWS Console, AWS CLI, or AWS SDK. Use the parameters from the previous step. For detailed instructions on creating a CloudFormation stack using the AWS Console, see Creating a stack on the AWS CloudFormation console.

Note: To add additional namespaces for monitoring later, you can modify the template directly through the AWS Console using Infrastructure Composer. For detailed instructions, see Working with AWS CloudFormation Templates.

Visualize CloudWatch Metrics from Metric Streaming​

After setting up metric streaming, you can visualize your CloudWatch metrics in Oodle:

  1. Go to Explore Metrics
  2. Choose Oodle data source
  3. Query and visualize your metrics

CloudWatch metrics are translated to Oodle metric names following this template: amazonaws_com_{namespace}_{metricName}_{aggregation} Note: Forward slashes (/) in the namespace are converted to underscores (_)

For example, the CloudWatch metric:

  • Namespace: AWS/ECS (becomes AWS_ECS)
  • Metric Name: CPUUtilization

Gets translated to these Oodle metrics:

  • amazonaws_com_AWS_ECS_CPUUtilization_sum - Sum aggregation
  • amazonaws_com_AWS_ECS_CPUUtilization_count - Count aggregation
  • amazonaws_com_AWS_ECS_CPUUtilization_quantile{quantile="0"} - Minimum value
  • amazonaws_com_AWS_ECS_CPUUtilization_quantile{quantile="1"} - Maximum value

Billing Considerations for Metric Streaming​

While Oodle does not charge extra for metric streaming, AWS pricing is based on metric updates and associated services. Each metric update includes four default statistics (Minimum, Maximum, Sample Count, and Sum). You will also incur Amazon Kinesis Data Firehose charges for data ingestion. For detailed pricing information, please refer to the "Metric streams" section under the Metrics tab on the CloudWatch pricing page.

Alerting on CloudWatch Metrics​

Oodle supports alerting on AWS CloudWatch metrics only when using the metric stream integration method.

To set up alerts on your CloudWatch metrics:

  1. Ensure you have configured the metric stream integration as described above
  2. Navigate to the Alerts section in Oodle
  3. Create a new alert using your streamed CloudWatch metrics

The alert will use the translated metric names described in the previous section. For example, to alert on average ECS CPU utilization, you would use the query amazonaws_com_AWS_ECS_CPUUtilization_sum/amazonaws_com_AWS_ECS_CPUUtilization_count .


Support

If you need assistance or have any questions, please reach out to us through: