From 5932a22996edf6d13b00416e1b060a13bf4bb323 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Tue, 7 Jun 2022 11:08:12 +0200 Subject: [PATCH] CloudWatch: Dynamic label documentation (#49463) * dynamic label documentation * Update docs/sources/datasources/aws-cloudwatch/_index.md Co-authored-by: JitaC <70489351+achatterjee-grafana@users.noreply.github.com> * Update docs/sources/datasources/aws-cloudwatch/_index.md Co-authored-by: JitaC <70489351+achatterjee-grafana@users.noreply.github.com> * formatting Co-authored-by: JitaC <70489351+achatterjee-grafana@users.noreply.github.com> --- .../sources/datasources/aws-cloudwatch/_index.md | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/docs/sources/datasources/aws-cloudwatch/_index.md b/docs/sources/datasources/aws-cloudwatch/_index.md index 4151ac80cea..cdea036a9ce 100644 --- a/docs/sources/datasources/aws-cloudwatch/_index.md +++ b/docs/sources/datasources/aws-cloudwatch/_index.md @@ -293,21 +293,13 @@ A period is the length of time associated with a specific Amazon CloudWatch stat If the period field is left blank or set to `auto`, then it calculates automatically based on the time range and [cloudwatch's retention policy](https://aws.amazon.com/about-aws/whats-new/2016/11/cloudwatch-extends-metrics-retention-and-new-user-interface/). The formula used is `time range in seconds / 2000`, and then it snaps to the next higher value in an array of predefined periods `[60, 300, 900, 3600, 21600, 86400]` after removing periods based on retention. By clicking `Show Query Preview` in the query editor, you can see what period Grafana used. -#### Alias +#### Label -The alias field allows you to override the default name of the metric legend. +The label field allows you to override the default name of the metric legend using CloudWatch dynamic labels. If you're using a time-based dynamic label such as `${MIN_MAX_TIME_RANGE}`, then the legend value is derived from the current timezone specified in the time range picker. To see the full list of label patterns and the dynamic label limitations, refer to the [CloudWatch dynamic labels](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html) documentation. -##### Alias patterns +**Alias pattern deprecation:** In Grafana 9, dynamic labels have replaced alias patterns in the CloudWatch data source. Any existing alias pattern will get migrated to a corresponding dynamic label pattern. If you wish to use alias patterns instead of dynamic labels, set the feature toggle `cloudWatchDynamicLabels` to `false` in the Grafana configuration file. It will revert to the alias pattern system and use the previous alias formatting logic. -| Alias Pattern | Description | Example Result | -| ---------------------- | ------------------------------------------------------------- | ---------------- | -| `{{region}}` | returns the region | `us-east-1` | -| `{{period}}` | returns the period | `3000` | -| `{{metric}}` | returns the metric | `CPUUtilization` | -| `{{label}}` | returns the label returned by the API (only in Metric Search) | `i-01343` | -| `{{namespace}}` | returns the namespace (only in Metric Search) | `AWS/EC2` | -| `{{stat}}` | returns the statistic (only in Metric Search) | `Average` | -| `{{[dimension name]}}` | returns the dimension name (only in Metric Search) | `i-01343` | +The alias field will be deprecated and removed in a release. During this interim period, we won’t fix bugs related to the alias pattern system. For details on why we're doing this change, refer to [issue 48434](https://github.com/grafana/grafana/issues/48434). ## Using the Logs query editor