Monitoring Athena usage metrics - Amazon Athena
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Monitoring Athena usage metrics

You can use CloudWatch usage metrics to provide visibility into your how your account uses resources by displaying your current service usage on CloudWatch graphs and dashboards.

For Athena, usage availability metrics correspond to Amazon Web Service quotas for Athena. You can configure alarms that alert you when your usage approaches a service quota. For more information about Athena service quotas, see Service Quotas. For more information about Amazon usage metrics, see Amazon usage metrics in the Amazon CloudWatch User Guide.

Athena publishes the following metrics in the Amazon/Usage namespace.

Metric name

Description

ResourceCount

The sum of all queued and executing queries per Amazon Web Services Region per account, separated by query type (DML or DDL). Maximum is the only useful statistic for this metric.

This metric publishes periodically every minute. If you are not running any queries, the metric reports nothing (not even 0). The metric publishes only if active queries are running at the time the metric is taken.

The following dimensions are used to refine the usage metrics that are published by Athena.

Dimension

Description

Service

The name of the Amazon Web Service containing the resource. For Athena, the value for this dimension is Athena.

Resource

The type of resource that is running. The resource value for Athena query usage is ActiveQueryCount.

Type

The type of entity that's being reported. Currently, the only valid value for Athena usage metrics is Resource.

Class

The class of resource being tracked. For Athena, Class can be DML or DDL.

Viewing Athena resource usage metrics in the CloudWatch console

You can use the CloudWatch console to see a graph of Athena usage metrics and configure alarms that alert you when your usage approaches a service quota.

To view Athena resource usage metrics
  1. Open the CloudWatch console at https://console.amazonaws.cn/cloudwatch/.

  2. In the navigation pane, choose Metrics, All metrics.

  3. Choose Usage, and then choose By Amazon Resource.

    The list of service quota usage metrics appears.

  4. Select the check box that is next to Athena and ActiveQueryCount.

  5. Choose the Graphed metrics tab.

    The graph above displays your current usage of the Amazon resource.

For information about adding service quotas to the graph and setting an alarm that notifies you if you approach the service quota, see Visualizing your service quotas and setting alarms in the Amazon CloudWatch User Guide. For information about setting usage limits per workgroup, see Setting data usage control limits.