Skip to content

Commit

Permalink
Update prometheus.exporter.cloudwatch docs (#5195)
Browse files Browse the repository at this point in the history
* Update prometheus.exporter.cloudwatch docs

* Move period and length section and remove backticks from header

---------

Co-authored-by: Clayton Cornell <[email protected]>
(cherry picked from commit 5db01d9)
  • Loading branch information
spartan0x117 authored and clayton-cornell committed Sep 14, 2023
1 parent 37cf7f5 commit 580cf97
Showing 1 changed file with 26 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,9 @@ job.
[metric]: #metric-block

[role]: #role-block
[decoupled_scraping]: #decoupled_scraping-block

[decoupled_scraping]: #decoupled-scraping-block

## discovery block
### discovery block

The `discovery` block allows the component to scrape CloudWatch metrics with only the AWS service and a list of metrics
under that service/namespace.
Expand Down Expand Up @@ -206,7 +205,7 @@ different `search_tags`.

[supported-services]: #supported-services-in-discovery-jobs

## static block
### static block

The `static` block configures the component to scrape a specific set of CloudWatch metrics. The metrics need to be fully
qualified with the following specifications:
Expand Down Expand Up @@ -263,7 +262,7 @@ require `Resource`, `Service`, `Class`, and `Type` dimensions to be specified. T
metrics,
all dimensions attached to a metric when saved in CloudWatch are required.

## metric block
### metric block

Represents an AWS Metrics to scrape. To see available metrics, AWS does not keep a documentation page with all available
metrics.
Expand All @@ -279,26 +278,7 @@ on how to explore metrics, to easily pick the ones you need.

[period]: #period-and-length

## role block

Represents an [AWS IAM Role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html). If omitted, the AWS role
that corresponds to the credentials configured in the environment will be used.

Multiple roles can be useful when scraping metrics from different AWS accounts with a single pair of credentials. In
this case, a different role
is configured for the agent to assume before calling AWS APIs. Therefore, the credentials configured in the system need
permission to assume the target role.
See [Granting a user permissions to switch roles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_permissions-to-switch.html)
in the AWS IAM documentation for more information about how to configure this.

| Name | Type | Description | Default | Required |
|---------------|----------|-----------------------------------------------------------------------|---------|----------|
| `role_arn` | `string` | AWS IAM Role ARN the exporter should assume to perform AWS API calls. | | yes |
| `external_id` | `string` | External ID used when calling STS AssumeRole API. See [details][]. | `""` | no |

[details]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html

## period and length
#### period and length

`period` controls primarily the width of the time bucket used for aggregating metrics collected from
CloudWatch. `length`
Expand Down Expand Up @@ -330,9 +310,28 @@ is exported to CloudWatch.

![](https://grafana.com/media/docs/agent/cloudwatch-multiple-period-time-model.png)

## decoupled scraping block
### role block

Represents an [AWS IAM Role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html). If omitted, the AWS role
that corresponds to the credentials configured in the environment will be used.

Multiple roles can be useful when scraping metrics from different AWS accounts with a single pair of credentials. In
this case, a different role
is configured for the agent to assume before calling AWS APIs. Therefore, the credentials configured in the system need
permission to assume the target role.
See [Granting a user permissions to switch roles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_permissions-to-switch.html)
in the AWS IAM documentation for more information about how to configure this.

| Name | Type | Description | Default | Required |
| ------------- | -------- | --------------------------------------------------------------------- | ------- | -------- |
| `role_arn` | `string` | AWS IAM Role ARN the exporter should assume to perform AWS API calls. | | yes |
| `external_id` | `string` | External ID used when calling STS AssumeRole API. See [details][]. | `""` | no |

[details]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html

### decoupled_scraping block

The decoupled scraping block configures an optional feature that scrapes CloudWatch metrics in the background on a
The `decoupled_scraping` block configures an optional feature that scrapes CloudWatch metrics in the background on a
scheduled interval. When this feature is enabled, CloudWatch metrics are gathered asynchronously at the scheduled interval instead
of synchronously when the CloudWatch component is scraped.

Expand Down

0 comments on commit 580cf97

Please sign in to comment.