Azure Monitor: Docs update for multiple resources (#62454)

This commit is contained in:
Andres Martinez Gotor 2023-01-31 09:51:05 +01:00 committed by GitHub
parent 58c9618160
commit d3897b612f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 12 deletions

View File

@ -44,7 +44,7 @@ In contrast, Azure Monitor Logs can store a variety of data types, each with the
1. In a Grafana panel, select the **Azure Monitor** data source.
1. Select the **Metrics** service.
1. Select a resource from which to metrics by using the subscription, resource group, resource type, and resource fields.
1. Select a resource from which to query metrics by using the subscription, resource group, resource type, and resource fields. Multiple resources can also be selected as long as they belong to the same subscription, region and resource type. Note that only a limited amount of resource types support this feature.
1. To select a different namespace than the default—for instance, to select resources like storage accounts that are organized under multiple namespaces—use the **Namespace** option.
> **Note:** Not all metrics returned by the Azure Monitor Metrics API have values.
@ -110,7 +110,7 @@ You can also perform complex analysis of Logs data by using KQL.
1. In a Grafana panel, select the **Azure Monitor** data source.
1. Select the **Logs** service.
1. Select a resource to query.
1. Select a resource to query. Multiple resources can be selected as long as they are of the same type.
Alternatively, you can dynamically query all resources under a single resource group or subscription.

View File

@ -32,16 +32,17 @@ For an introduction to templating and template variables, refer to the [Templati
You can specify these Azure Monitor data source queries in the Variable edit view's **Query Type** field.
| Name | Description |
| ------------------- | -------------------------------------------------------------------------------------------- |
| **Subscriptions** | Returns subscriptions. |
| **Resource Groups** | Returns resource groups for a specified subscription. |
| **Namespaces** | Returns metric namespaces for the specified subscription and resource group. |
| **Resource Names** | Returns a list of resource names for a specified subscription, resource group and namespace. |
| **Metric Names** | Returns a list of metric names for a resource. |
| **Workspaces** | Returns a list of workspaces for the specified subscription. |
| **Logs** | Use a KQL query to return values. |
| **Resource Graph** | Use an ARG query to return values. |
| Name | Description |
| ------------------- | ------------------------------------------------------------------------------------------------------------------ |
| **Subscriptions** | Returns subscriptions. |
| **Resource Groups** | Returns resource groups for a specified. Supports multi-value. subscription. |
| **Namespaces** | Returns metric namespaces for the specified subscription and resource group. |
| **Regions** | Returns regions for the specified subscription |
| **Resource Names** | Returns a list of resource names for a specified subscription, resource group and namespace. Supports multi-value. |
| **Metric Names** | Returns a list of metric names for a resource. |
| **Workspaces** | Returns a list of workspaces for the specified subscription. |
| **Logs** | Use a KQL query to return values. |
| **Resource Graph** | Use an ARG query to return values. |
Any Log Analytics Kusto Query Language (KQL) query that returns a single list of values can also be used in the Query field.
For example:
@ -65,3 +66,13 @@ Perf
| summarize avg(CounterValue) by bin(TimeGenerated, $__interval), Computer
| order by TimeGenerated asc
```
### Multi-value variables
It is possible to select multiple values for **Resource Groups** and **Resource Names** and use a single metrics query pointing to those values as long as they:
- Belong to the same subscription.
- Are in the same region.
- Are of the same type (namespace).
Also, note that if a template variable pointing to multiple resource groups or names is used in another template variable as a parameter (e.g. to retrieve metric names), only the first value will be used. This means that the combination of the first resource group and name selected should be valid.