Enable monitoring

Overview

Monitoring your application’s performance is crucial for maintaining its reliability and efficiency. F5 Application Delivery Service for AWS (ADS) integrates with Amazon CloudWatch so you can collect, correlate, and analyze metrics for a thorough understanding of your application’s health and behavior.

F5 ADS exports metrics using the Amazon CloudWatch Embedded Metric Format (EMF). When you enable metric export, F5 ADS writes EMF records to a CloudWatch Logs log group (the Metric Group) in a log stream named metrics. CloudWatch automatically extracts these records into metrics under the F5 Application Delivery Service namespace, where you can chart and query them like any other CloudWatch metric.

Before you begin

  • Configure a Role ARN in the Identity section of your deployment. F5 ADS uses this IAM role to export metrics to CloudWatch. See Identity and access management for how to create the role and attach the Policy for CloudWatch Logs.

  • Grant the IAM role the permissions required to export metrics:

    • logs:CreateLogStream and logs:PutLogEvents: required for F5 ADS to write EMF records to the metric log group.
    • logs:CreateLogGroup: required only if you want F5 ADS to create the log group for you. If you pre-create the log group yourself, you can omit this permission.

    See AWS’s documentation on controlling access to CloudWatch Logs with IAM for more information.

  • To view metrics in the CloudWatch console, your own AWS identity needs read access such as cloudwatch:GetMetricData and cloudwatch:ListMetrics. This is separate from the deployment’s IAM role. See AWS’s documentation on identity and access management for Amazon CloudWatch for more information.

  • Configure the status_zone directive in your server blocks and the zone directive in your upstream blocks to collect HTTP request and response statistics, stream connection metrics, upstream statistics, and memory statistics. See the Metrics Catalog for configuration requirements.

Export F5 Application Delivery Service metrics to CloudWatch

To enable exporting metrics, turn on the Export Metrics to CloudWatch toggle when creating or updating a deployment. To create a deployment, see our documentation on creating an F5 ADS deployment for a step-by-step guide. To update an existing deployment, in the F5 ADS console,

  1. On the navigation menu, select Deployments.
  2. Select the deployment you want to update and select Edit.
  3. In the Identity section, make sure the Role ARN field is populated with an IAM role that has the required permissions. Metric export fails without it.
  4. In the Observability section, turn on the Export Metrics to CloudWatch toggle.
  5. In the Metric Group Name field, enter the name of the CloudWatch Logs log group you want to receive exported metrics. If you leave this field at its default, F5 ADS uses a log group named after the deployment object ID.
  6. Select Update.

Within the metric log group, F5 ADS writes EMF records to a log stream named metrics. CloudWatch extracts these records into metrics under the F5 Application Delivery Service namespace.

View F5 Application Delivery Service metrics in Amazon CloudWatch

See the Metrics Catalog for a full list of metrics F5 ADS provides.

CloudWatch Metrics Explorer

Log in to the AWS Management Console,

  1. Go to the CloudWatch console.
  2. Select Classic Metrics and then select the F5 Application Delivery Service tile in the Custom Namespaces section.

Refer to the AWS’s CloudWatch Metrics Explorer documentation to learn how you can create charts and queries.

Metrics can take a few minutes to appear after you enable export, because CloudWatch must first ingest the EMF records and extract them into the F5 Application Delivery Service namespace. To inspect the raw EMF records, open the metrics log stream in your metric log group with CloudWatch Logs Insights.

Disable F5 Application Delivery Service metric export to CloudWatch

To stop exporting metrics, update your F5 ADS deployment to turn off the metric export toggle. To update the deployment, in the F5 ADS console,

  1. On the navigation menu, select Deployments.
  2. Select the deployment you want to update and select Edit.
  3. In the Observability section, turn off the Export Metrics to CloudWatch toggle.
  4. Select Update.

Troubleshooting

If Amazon CloudWatch is not showing any metrics, check for Failed Metric Export to CloudWatch events from your F5 ADS deployment.

In the F5 ADS console:

  1. On the navigation menu, select Events.
  2. Select Add Filter.
  3. Select Affected Object and the name of your F5 ADS deployment.

Events are deleted after 14 days.

What’s next