Docs/fix cross account section in cloudwatch doc (#65572)

* fixed headings

* added Cross-account observability section back

* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* broke out to 2 steps

* changed headings under Configure AWS aut

* changed headings, added link to IAM

* changed headings

* updated link

* formatting fixes

* more formatting fixes

* made requested change

* cleaned up wording

* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* removed new

---------

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
This commit is contained in:
lwandz13 2023-04-06 15:35:37 -05:00 committed by GitHub
parent 38482c90bf
commit 13e097f3e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 11 deletions

View File

@ -50,7 +50,7 @@ For authentication options and configuration details, refer to [AWS authenticati
To read CloudWatch metrics and EC2 tags, instances, regions, and alarms, you must grant Grafana permissions via IAM.
You can attach these permissions to the IAM role or IAM user you configured in [AWS authentication]({{< relref "./aws-authentication/" >}}).
**Metrics-only:**
##### Metrics-only permissions
```json
{
@ -85,7 +85,7 @@ You can attach these permissions to the IAM role or IAM user you configured in [
}
```
**Logs-only:**
##### Logs-only permissions
```json
{
@ -120,7 +120,7 @@ You can attach these permissions to the IAM role or IAM user you configured in [
}
```
**Metrics and Logs:**
##### Metrics and logs permissions
```json
{
@ -168,7 +168,7 @@ You can attach these permissions to the IAM role or IAM user you configured in [
}
```
**Cross-account observability: (see below) **
##### Cross-account observability permissions
```json
{
@ -235,7 +235,7 @@ For more information about provisioning, and for available configuration options
#### Provisioning examples
**Using AWS SDK (default):**
##### Using AWS SDK (default)
```yaml
apiVersion: 1
@ -247,7 +247,7 @@ datasources:
defaultRegion: eu-west-2
```
**Using credentials' profile name (non-default):**
##### Using credentials' profile name (non-default)
```yaml
apiVersion: 1
@ -262,7 +262,7 @@ datasources:
profile: secondary
```
**Using accessKey and secretKey:**
##### Using accessKey and secretKey
```yaml
apiVersion: 1
@ -278,7 +278,7 @@ datasources:
secretKey: '<your secret key>'
```
**Using AWS SDK Default and ARN of IAM Role to Assume:**
##### Using AWS SDK Default and ARN of IAM Role to Assume
```yaml
apiVersion: 1

View File

@ -92,7 +92,7 @@ For example, to apply arithmetic operations to a metric, apply a unique string i
> **Note:** If you use the expression field to reference another query, like `queryA * 2`, you can't create an alert rule based on that query.
##### Period macro
#### Period macro
If you're using a CloudWatch [`SEARCH`](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/search-expression-syntax.html) expression, you may want to use the `$__period_auto` macro rather than specifying a period explicitly. The `$__period_auto` macro will resolve to a [CloudWatch period](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html) that is suitable for the chosen time range.
@ -218,9 +218,17 @@ When making `stats` queries in [Explore]({{< relref "../../../explore/" >}}), ma
{{< figure src="/static/img/docs/v70/explore-mode-switcher.png" max-width="500px" class="docs-image--right" caption="Explore mode switcher" >}}
### Getting started
## Cross-account observability
To enable cross-account observability, first enable it in CloudWatch using the official [CloudWatch docs](http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html), then add [two new API actions]({{< relref "../#cross-account-observability" >}}) to the IAM policy attached to the role/user running the plugin.
The CloudWatch plugin allows monitoring and troubleshooting applications that span multiple accounts within a region. Using cross-account observability, you can seamlessly search, visualize, and analyze metrics and logs without worrying about account boundaries.
### Get started
To enable cross-account observability, complete the following steps:
1. Go to the [Amazon CloudWatch docs](http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html) and follow the instructions on enabling cross-account observability.
1. Add [two API actions](/docs/grafana/latest/datasources/aws-cloudwatch/#cross-account-observability-permissions) to the IAM policy attached to the role/user running the plugin.
Cross-account querying is available in the plugin through the `Logs` mode and the `Metric search` mode. Once you have it configured correctly, you'll see a "Monitoring account" badge displayed in the query editor header.