Share via


az monitor log-analytics query-pack

This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage Azure log analytics query pack.

Commands

Name Description Type Status
az monitor log-analytics query-pack create

Create a log analytics query pack.

Core Preview
az monitor log-analytics query-pack delete

Delete a log analytics query pack.

Core Preview
az monitor log-analytics query-pack list

List of all log analytics query packs.

Core Preview
az monitor log-analytics query-pack query

Manage the query of log analytics query pack.

Core Preview
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 show

Show a log analytics query pack.

Core Preview
az monitor log-analytics query-pack update

Update a log analytics query pack.

Core Preview

az monitor log-analytics query-pack create

Preview

Command group 'az monitor log-analytics query-pack' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Create a log analytics query pack.

az monitor log-analytics query-pack create --name
                                           --resource-group
                                           [--location]
                                           [--tags]

Examples

Create a query pack

az monitor log-analytics query-pack create -g resourceGroup -n queryPackName --location eastus2

Required Parameters

--name --query-pack-name -n

The name of the log analytics query pack.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--location -l

Resource location When not specified, the location of the resource group will be used.

--tags

Resource tags Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az monitor log-analytics query-pack delete

Preview

Command group 'az monitor log-analytics query-pack' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Delete a log analytics query pack.

az monitor log-analytics query-pack delete [--ids]
                                           [--name]
                                           [--resource-group]
                                           [--subscription]
                                           [--yes]

Examples

Delete a query pack

az monitor log-analytics query-pack delete-g resourceGroup -n queryPackName

Optional Parameters

--ids

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.

--name --query-pack-name -n

The name of the log analytics query pack.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az monitor log-analytics query-pack list

Preview

Command group 'az monitor log-analytics query-pack' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List of all log analytics query packs.

az monitor log-analytics query-pack list [--resource-group]

Examples

List query packs in a specific subscription

az monitor log-analytics query-pack list

List query packs in a specific resource group

az monitor log-analytics query-pack list -g resourceGroup

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az monitor log-analytics query-pack show

Preview

Command group 'az monitor log-analytics query-pack' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Show a log analytics query pack.

az monitor log-analytics query-pack show [--ids]
                                         [--name]
                                         [--resource-group]
                                         [--subscription]

Examples

Show a query pack

az monitor log-analytics query-pack show -g resourceGroup -n queryPackName

Optional Parameters

--ids

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.

--name --query-pack-name -n

The name of the log analytics query pack.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az monitor log-analytics query-pack update

Preview

Command group 'az monitor log-analytics query-pack' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update a log analytics query pack.

az monitor log-analytics query-pack update [--add]
                                           [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                                           [--ids]
                                           [--name]
                                           [--remove]
                                           [--resource-group]
                                           [--set]
                                           [--subscription]
                                           [--tags]

Examples

Update a query pack

az monitor log-analytics query-pack update -g resourceGroupName -n queryPackName --tags label1=value1

Optional Parameters

--add

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>.

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--ids

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.

--name --query-pack-name -n

The name of the log analytics query pack.

--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--tags

Resource tags Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.