Amazon CloudWatch data source
Amazon CloudWatch is the AWS native monitoring and observability service that collects, aggregates, and stores metrics, logs, and events from AWS resources, applications, and services. CloudWatch enables you to visualize performance data, track system health, and set up automated alerts based on defined thresholds. The Amazon CloudWatch data source in Grafana extends these capabilities by allowing you to query CloudWatch data and create rich, interactive visualizations that can be correlated with data from other systems within unified dashboards.
Grafana includes native support for the Amazon CloudWatch plugin, so there’s no need to install a plugin.
The following documents will help you get started working with the CloudWatch data source:
- Configure the CloudWatch data source
- CloudWatch query editor
- Templates and variables
- Configure AWS authentication
Import pre-configured dashboards
The CloudWatch data source includes curated, pre-configured dashboards for five popular AWS services:
- Amazon Elastic Compute Cloud:
Amazon EC2
- Amazon Elastic Block Store:
Amazon EBS
- AWS Lambda:
AWS Lambda
- Amazon CloudWatch Logs:
Amazon CloudWatch Logs
- Amazon Relational Database Service:
Amazon RDS
To import curated dashboards:
Navigate to the data source’s configuration page.
Click the Dashboards tab.
This displays the curated selection of importable dashboards.
Click Import for each dashboard you want to import.
CloudWatch pre-configured dashboards
To customize one of these dashboards, Grafana recommends saving it under a different name; otherwise, Grafana upgrades will overwrite your customizations with the new version.
Get the most out of the data source
After installing and configuring the Amazon CloudWatch data source, you can:
- Create a wide variety of visualizations
- Configure and use templates and variables
- Add transformations
- Add annotations
- Set up alerting
- Optimize performance with query caching
Control pricing
The Amazon CloudWatch data source for Grafana uses ListMetrics
and GetMetricData
CloudWatch API calls to list and retrieve metrics.
Pricing for CloudWatch Logs is based on the amount of data ingested, archived, and analyzed via CloudWatch Logs Insights queries.
Each time you select a dimension in the query editor, Grafana issues a ListMetrics
API request.
Each time you change queries in the query editor, Grafana issues a new request to the GetMetricData
API.
Note
Grafana now uses the
GetMetricData
API instead ofGetMetricStatistics
for CloudWatch queries. This change improves support for CloudWatch metric math and allows Grafana to automatically generate search expressions when you use wildcards or disable theMatch Exact
option.Unlike
GetMetricStatistics
requests,GetMetricData
requests do not qualify for the CloudWatch API free tier.
For more information, refer to the CloudWatch pricing page.
Manage service quotas
AWS defines quotas, or limits, for resources, actions, and items in your AWS account. Depending on the number of queries in your dashboard and the number of users accessing the dashboard, you might reach the usage limits for various CloudWatch and CloudWatch Logs resources. Quotas are defined per account and per region.
If you use multiple regions or have configured more than one CloudWatch data source to query against multiple accounts, you must request a quota increase for each account and region in which you reach the limit.
To request a quota increase, visit the AWS Service Quotas console. For more information, refer to the AWS documentation for Service Quotas and CloudWatch limits.
Cross-account observability
The CloudWatch plugin enables you to monitor and troubleshoot applications across multiple regional accounts. Using cross-account observability, you can seamlessly search, visualize and analyze metrics and logs without worrying about account boundaries.
To use this feature, configure a monitoring and source account in the AWS console under CloudWatch Settings, and then add the necessary IAM permissions as described above.