Commit 5166ffca by Erik Sundell Committed by GitHub

Docs: Update CloudWatch and Stackdriver docs for 6.6 (#21679)

* Add info about meta data labels

* Add part about auto period calculations in cloudwatch

* Minor adjustments

* Updates after feedback

* Add more context

* Clarify what a metadata label is
parent 18788727
...@@ -146,6 +146,12 @@ As an example, if you want to apply arithmetic operations on a metric, you can d ...@@ -146,6 +146,12 @@ As an example, if you want to apply arithmetic operations on a metric, you can d
Please note that in the case you use the expression field to reference another query, like `queryA * 2`, it will not be possible to create an alert rule based on that query. Please note that in the case you use the expression field to reference another query, like `queryA * 2`, it will not be possible to create an alert rule based on that query.
### Period
A period is the length of time associated with a specific Amazon CloudWatch statistic. Periods are defined in numbers of seconds, and valid values for period are 1, 5, 10, 30, or any multiple of 60.
If the period field is left blank or set to `auto`, then it calculates automatically based on the time range. 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]`. By clicking `Show Query Preview` in the query editor, you can see what period Grafana used.
### Deep linking from Grafana panels to the CloudWatch console ### Deep linking from Grafana panels to the CloudWatch console
> Only available in Grafana v6.5+. > Only available in Grafana v6.5+.
......
...@@ -131,6 +131,12 @@ It is also possible to choose fixed time intervals to group by, like `1h` or `1d ...@@ -131,6 +131,12 @@ It is also possible to choose fixed time intervals to group by, like `1h` or `1d
Group by resource or metric labels to reduce the number of time series and to aggregate the results by a group by. E.g. Group by instance_name to see an aggregated metric for a Compute instance. Group by resource or metric labels to reduce the number of time series and to aggregate the results by a group by. E.g. Group by instance_name to see an aggregated metric for a Compute instance.
#### Metadata labels
Resource metadata labels contains information to uniquely identify a resource in Google cloud. Metadata labels are only returned in the time series response if they're part of the **Group By** segment in the time series request. There's no API for retrieving metadata labels, so it's not possible to populate the group by dropdown with the metadata labels that are available for the selected service and metric. However, the **Group By** field dropdown comes with a pre-defined list of common system labels.
User labels cannot be pre-defined, but it's possible to enter them manually in the **Group By** field. If a metadata label, user label or system label is included in the **Group By** segment, then you can create filters based on it and expand its value on the **Alias** field.
### Alias Patterns ### Alias Patterns
The Alias By field allows you to control the format of the legend keys. The default is to show the metric name and labels. This can be long and hard to read. Using the following patterns in the alias field, you can format the legend key the way you want it. The Alias By field allows you to control the format of the legend keys. The default is to show the metric name and labels. This can be long and hard to read. Using the following patterns in the alias field, you can format the legend key the way you want it.
...@@ -151,6 +157,8 @@ In the Group By dropdown, you can see a list of metric and resource labels for a ...@@ -151,6 +157,8 @@ In the Group By dropdown, you can see a list of metric and resource labels for a
| ------------------------ | -------------------------------- | -------------------------------- | ---------------- | | ------------------------ | -------------------------------- | -------------------------------- | ---------------- |
| `{{metric.label.xxx}}` | returns the metric label value | `{{metric.label.instance_name}}` | `grafana-1-prod` | | `{{metric.label.xxx}}` | returns the metric label value | `{{metric.label.instance_name}}` | `grafana-1-prod` |
| `{{resource.label.xxx}}` | returns the resource label value | `{{resource.label.zone}}` | `us-east1-b` | | `{{resource.label.xxx}}` | returns the resource label value | `{{resource.label.zone}}` | `us-east1-b` |
| `{{metadata.system_labels.xxx}}` | returns the meta data system label value | `{{metadata.system_labels.name}}` | `grafana` |
| `{{metadata.user_labels.xxx}}` | returns the meta data user label value | `{{metadata.user_labels.tag}}` | `production` |
Example Alias By: `{{metric.type}} - {{metric.labels.instance_name}}` Example Alias By: `{{metric.type}} - {{metric.labels.instance_name}}`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment