az monitor log-analytics query-pack query
Command group 'az monitor log-analytics query-pack' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Manage the query of log analytics query pack.
Commands
Name | Description | Type | Status |
---|---|---|---|
az monitor log-analytics query-pack query create |
Create a specific query within a log analytics query pack. |
Core | Preview |
az monitor log-analytics query-pack query delete |
Delete a specific query defined within a log analytics query pack. |
Core | Preview |
az monitor log-analytics query-pack query list |
List queries defined within a log analytics query pack. |
Core | Preview |
az monitor log-analytics query-pack query search |
Search a list of queries defined within a log analytics query pack according to given search properties. |
Core | Preview |
az monitor log-analytics query-pack query show |
Show a specific query defined within a log analytics query pack. |
Core | Preview |
az monitor log-analytics query-pack query update |
Update a specific query within a log analytics query pack. |
Core | Preview |
az monitor log-analytics query-pack query create
Command group 'az monitor log-analytics query-pack query' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Create a specific query within a log analytics query pack.
az monitor log-analytics query-pack query create --body
--display-name
--name
--query-pack-name
--resource-group
[--categories]
[--description]
[--resource-types]
[--solutions]
[--tags]
Examples
Create a query in a query pack
az monitor log-analytics query-pack query create --query-id 112c6b1f-5a86-4f01-a2d7-efb8e31f930f --display-name queryName -g resourceGroupName --query-pack-name queryPackName --body "heartbeat | take 10" --description "some description" --categories "[network,monitor]" --resource-types "[microsoft.network/loadbalancers,microsoft.insights/autoscalesettings]" --solutions "[networkmonitoring]" --tags "{version:[v2022-01-01,v2021-12-01]}"
Required Parameters
Content of the query.
Unique display name for your query within the query pack.
The id name of a specific query defined in the log analytics query pack. It must be of type GUID.
The name of the log analytics query pack.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The related categories for the function. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Description of the query.
The related resource types for the function. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
The related Log Analytics solutions for the function. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Tags associated with the query. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az monitor log-analytics query-pack query delete
Command group 'az monitor log-analytics query-pack query' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Delete a specific query defined within a log analytics query pack.
az monitor log-analytics query-pack query delete [--ids]
[--name]
[--query-pack-name]
[--resource-group]
[--subscription]
[--yes]
Examples
Delete a query in a query pack
az monitor log-analytics query-pack query delete --query-id 112c6b1f-5a86-4f01-a2d7-efb8e31f930f -g resourceGroup --query-pack-name queryPackName
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The id name of a specific query defined in the log analytics query pack. It must be of type GUID.
The name of the log analytics query pack.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az monitor log-analytics query-pack query list
Command group 'az monitor log-analytics query-pack query' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
List queries defined within a log analytics query pack.
az monitor log-analytics query-pack query list --query-pack-name
--resource-group
[--include-body {0, 1, f, false, n, no, t, true, y, yes}]
Examples
List queries in a query pack
az monitor log-analytics query-pack query list -g resourceGroupName --query-pack-name queryPackName
List queries in a query pack without query body content
az monitor log-analytics query-pack query list -g resourceGroupName --query-pack-name queryPackName --include-body false
Required Parameters
The name of the log analytics query pack.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Whether or not to return the body of each applicable query. If false, only return the query information. Default: true.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az monitor log-analytics query-pack query search
Command group 'az monitor log-analytics query-pack query' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Search a list of queries defined within a log analytics query pack according to given search properties.
az monitor log-analytics query-pack query search [--categories]
[--ids]
[--include-body {0, 1, f, false, n, no, t, true, y, yes}]
[--query-pack-name]
[--resource-group]
[--resource-types]
[--solutions]
[--subscription]
[--tags]
Examples
Search queries in a query pack
az monitor log-analytics query-pack query search -g resourceGroupName --query-pack-name queryPackName --categories network --resource-types microsoft.insights/autoscalesettings --solutions networkmonitoring --tags version="[v2021-12-01]"
Search queries in a query pack without query body content
az monitor log-analytics query-pack query search -g resourceGroupName --query-pack-name queryPackName --categories network --resource-types microsoft.insights/autoscalesettings --solutions networkmonitoring --tags version="[v2021-12-01]" --include-body false
Optional Parameters
The related categories for the function. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Whether or not to return the body of each applicable query. If false, only return the query information. Default: true.
The name of the log analytics query pack.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The related resource types for the function. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
The related Log Analytics solutions for the function. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Tags associated with the query. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az monitor log-analytics query-pack query show
Command group 'az monitor log-analytics query-pack query' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Show a specific query defined within a log analytics query pack.
az monitor log-analytics query-pack query show [--ids]
[--name]
[--query-pack-name]
[--resource-group]
[--subscription]
Examples
Show a query in a query pack
az monitor log-analytics query-pack query show --query-id 112c6b1f-5a86-4f01-a2d7-efb8e31f930f -g resourceGroup --query-pack-name queryPackName
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The id name of a specific query defined in the log analytics query pack. It must be of type GUID.
The name of the log analytics query pack.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az monitor log-analytics query-pack query update
Command group 'az monitor log-analytics query-pack query' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Update a specific query within a log analytics query pack.
az monitor log-analytics query-pack query update [--add]
[--body]
[--categories]
[--description]
[--display-name]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--ids]
[--name]
[--query-pack-name]
[--remove]
[--resource-group]
[--resource-types]
[--set]
[--solutions]
[--subscription]
[--tags]
Examples
Update a query in a query pack
az monitor log-analytics query-pack query update --query-id 112c6b1f-5a86-4f01-a2d7-efb8e31f930f -g resourceGroup --query-pack-name queryPackName --body "heartbeat | take 20" --categories [2]=databases --tags version[0]=null
Optional Parameters
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>
.
Content of the query.
The related categories for the function. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Description of the query.
Unique display name for your query within the query pack.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The id name of a specific query defined in the log analytics query pack. It must be of type GUID.
The name of the log analytics query pack.
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The related resource types for the function. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
The related Log Analytics solutions for the function. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Tags associated with the query. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.