2015-10-26 08:21:38 -05:00
|
|
|
----
|
|
|
|
page_title: Cloudwatch
|
|
|
|
page_description: Cloudwatch grafana datasource documentation
|
|
|
|
page_keywords: Cloudwatch, grafana, documentation, datasource, docs
|
|
|
|
---
|
|
|
|
|
2015-10-26 09:41:08 -05:00
|
|
|
# CloudWatch
|
2015-10-26 08:21:38 -05:00
|
|
|
|
2015-10-26 09:41:08 -05:00
|
|
|
Grafana ships with built in support for CloudWatch. You just have to add it as a data source and you will
|
|
|
|
be ready to build dashboards for you CloudWatch metrics.
|
2015-10-26 08:21:38 -05:00
|
|
|
|
|
|
|
## Adding the data source
|
2015-10-26 09:41:08 -05:00
|
|
|
![](/img/cloudwatch/cloudwatch_add.png)
|
2015-10-26 08:21:38 -05:00
|
|
|
|
|
|
|
1. Open the side menu by clicking the the Grafana icon in the top header.
|
|
|
|
2. In the side menu under the `Dashboards` link you should find a link named `Data Sources`.
|
|
|
|
|
|
|
|
> NOTE: If this link is missing in the side menu it means that your current user does not have the `Admin` role for the current organization.
|
|
|
|
|
|
|
|
3. Click the `Add new` link in the top header.
|
2015-10-26 09:41:08 -05:00
|
|
|
4. Select `CloudWatch` from the dropdown.
|
2015-10-26 08:21:38 -05:00
|
|
|
|
|
|
|
Name | Description
|
|
|
|
------------ | -------------
|
|
|
|
Name | The data source name, important that this is the same as in Grafana v1.x if you plan to import old dashboards.
|
|
|
|
Default | Default data source means that it will be pre-selected for new panels.
|
2015-10-26 09:41:08 -05:00
|
|
|
Default-Region | Used in query editor to set region (can be changed on per query basis)
|
2015-10-26 08:21:38 -05:00
|
|
|
|
2015-10-26 09:41:08 -05:00
|
|
|
## Authentication
|
|
|
|
|
|
|
|
### IAM Roles
|
|
|
|
|
2015-10-26 23:02:04 -05:00
|
|
|
Currently all access to CloudWatch is done server side by the Grafana backend using the official AWS SDK. If you grafana
|
2015-10-26 09:41:08 -05:00
|
|
|
server is running on AWS you can use IAM Roles and authentication will be handled automatically.
|
|
|
|
|
|
|
|
Checkout AWS docs on [IAM Roles]](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html)
|
|
|
|
|
|
|
|
### AWS credentials file
|
|
|
|
|
|
|
|
Create a file at `~/.aws/credentials`. That is the `HOME` path for user running grafana-server.
|
|
|
|
|
|
|
|
Example content:
|
|
|
|
|
|
|
|
[default]
|
|
|
|
aws_access_key_id = asdsadasdasdasd
|
|
|
|
aws_secret_access_key = dasdasdsadasdasdasdsa
|
|
|
|
region = us-west-2
|
|
|
|
|
|
|
|
|
2015-10-26 09:51:34 -05:00
|
|
|
## Metric Query Editor
|
2015-10-26 09:41:08 -05:00
|
|
|
|
|
|
|
![](/img/cloudwatch/query_editor.png)
|
|
|
|
|
|
|
|
You need to specify a namespace, metric, at least one stat, and at least one dimension.
|
|
|
|
|
|
|
|
|
2015-10-26 09:51:34 -05:00
|
|
|
## Cost
|
2015-10-26 09:41:08 -05:00
|
|
|
|
|
|
|
It's worth to mention that Amazon will charge you for CloudWatch API usage. CloudWatch costs
|
|
|
|
$0.01 per 1,000 GetMetricStatistics or ListMetrics requests. For each query Grafana will
|
2015-10-26 23:02:04 -05:00
|
|
|
issue a GetMetricStatistics request and every time you pick a dimension in the query editor
|
2015-10-26 09:41:08 -05:00
|
|
|
Grafana will issue a ListMetrics request.
|
2015-10-26 08:21:38 -05:00
|
|
|
|
|
|
|
|