grafana/public/app/plugins/datasource/azuremonitor/query_help.md
Andreas Christou d7f7cd1e61
Schema: Initial Azure Monitor query schema (#62018)
* Initial schema

- Add types based off of current frontend

* Rename and field-level comments

* Update report and regenerate files

* Rename frontend Azure folder

- Doing this for consistency and to ensure code-generation works
- Update betterer results due to file renames

* Remove default and add back enum vals that I deleted

* Set workspace prop as optional

* Replace template variable types

* Connect frontend query types

- Keep properties optional for now to avoid major changes
- Rename AzureMetricResource
- Correctly use ResultFormat

* Add TSVeneer decorator

* Update schema

* Update type

* Update CODEOWNERS

* Fix gen-cue issue

* Fix backend test

* Fix e2e test

* Update code coverage

* Remove references to old Azure Monitor path

* Review

* Regen files
2023-02-03 16:06:54 +00:00

1.3 KiB

Format the legend keys any way you want by using alias patterns.

  • Example for Azure Monitor: dimension: {{dimensionvalue}}
  • Example for Application Insights: server: {{groupbyvalue}}

Alias Patterns for Application Insights

  • {{groupbyvalue}} = replaced with the value of the group by
  • {{groupbyname}} = replaced with the name/label of the group by
  • {{metric}} = replaced with metric name (e.g. requests/count)

Alias Patterns for Azure Monitor

  • {{resourcegroup}} = replaced with the value of the Resource Group
  • {{namespace}} = replaced with the value of the Namespace (e.g. Microsoft.Compute/virtualMachines)
  • {{resourcename}} = replaced with the value of the Resource Name
  • {{metric}} = replaced with metric name (e.g. Percentage CPU)
  • {{dimensionname}} = replaced with dimension key/label (e.g. blobtype)
  • {{dimensionvalue}} = replaced with dimension value (e.g. BlockBlob)

Filter Expressions for Application Insights

The filter field takes an OData filter expression.

Examples:

  • client/city eq 'Boydton'
  • client/city ne 'Boydton'
  • client/city ne 'Boydton' and client/city ne 'Dublin'
  • client/city eq 'Boydton' or client/city eq 'Dublin'

Writing Queries for Template Variables

See the docs for details and examples.