diff --git a/docs/sources/features/datasources/azuremonitor.md b/docs/sources/features/datasources/azuremonitor.md index ac1d2384b96..75174d7176e 100755 --- a/docs/sources/features/datasources/azuremonitor.md +++ b/docs/sources/features/datasources/azuremonitor.md @@ -263,11 +263,13 @@ You can also select additional number value columns (with, or without multiple d ```kusto Perf | where $__timeFilter(TimeGenerated) -| summarize Samples=count(), AvgValue=avg(CounterValue) +| summarize Samples=count(), ["Avg Value"]=avg(CounterValue) by bin(TimeGenerated, $__interval), Computer, CounterName, InstanceName | order by TimeGenerated asc ``` +> **Tip**: In the above query, the Kusto syntax `Samples=count()` and `["Avg Value"]=...` is used to rename those columns — the second syntax allowing for the space. This changes the name of the metric that Grafana uses, and as a result, things like series legends and table columns will match what you specify. Here `Samples` is displayed instead of `_count`. + {{< docs-imagebox img="/img/docs/azuremonitor/logs_multi-value_multi-dim.png" class="docs-image--no-shadow" caption="Azure Logs query with multiple values and multiple dimensions" >}} ### Table queries @@ -281,6 +283,14 @@ AzureActivity | order by TimeGenerated desc ``` +### Format the display name for Log Analytics + +The default display name format is: + +`metricName{dimensionName=dimensionValue,dimensionTwoName=DimensionTwoValue}` + +This can be customized by using the [display name field configuration option]({{< relref "../../panels/field-configuration-options.md#display-name" >}}). + ### Azure Log Analytics macros To make writing queries easier there are several Grafana macros that can be used in the where clause of a query: