az monitor log-analytics workspace data-export

Manage data export ruls for log analytics workspace.

Commands

az monitor log-analytics workspace data-export create

Create a data export rule for a given workspace.

az monitor log-analytics workspace data-export delete

Delete a data export rule for a given workspace.

az monitor log-analytics workspace data-export list

List all data export ruleses for a given workspace.

az monitor log-analytics workspace data-export show

Show a data export rule for a given workspace.

az monitor log-analytics workspace data-export update

Update a data export rule for a given workspace.

az monitor log-analytics workspace data-export create

Create a data export rule for a given workspace.

az monitor log-analytics workspace data-export create --destination
                                                      --name
                                                      --resource-group
                                                      --workspace-name
                                                      [--all {false, true}]
                                                      [--enable {false, true}]
                                                      [--subscription]
                                                      [--tables]

Examples

Create a data export rule for a given workspace.

az monitor log-analytics workspace data-export create -g MyRG --workspace-name MyWS -n MyDataExport --destination {sa_id_1} --enable -t {table_name}

Create a data export rule for a given workspace with all tables.

az monitor log-analytics workspace data-export create -g MyRG --workspace-name MyWS -n MyDataExport --destination {sa_id_1} --enable --all

Required Parameters

--destination

The destination resource ID. It should be a storage account, an event hub namespace or an event hub. If event hub namespace is provided, event hub would be created for each table automatically.

--name -n

Name of the data export rule.

--resource-group -g

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

--workspace-name

Name of the Log Analytics Workspace.

Optional Parameters

--all --export-all-tables

All workspace's tables are exported when this is enabled.

accepted values: false, true
--enable

Enable this data export rule.

accepted values: false, true
--subscription

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

--tables -t

An array of tables to export. if --export-all-tables is true, this argument should not be provided.

az monitor log-analytics workspace data-export delete

Delete a data export rule for a given workspace.

az monitor log-analytics workspace data-export delete --name
                                                      --resource-group
                                                      --workspace-name
                                                      [--subscription]
                                                      [--yes]

Required Parameters

--name -n

Name of the data export rule.

--resource-group -g

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

--workspace-name

Name of the Log Analytics Workspace.

Optional Parameters

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

az monitor log-analytics workspace data-export list

List all data export ruleses for a given workspace.

az monitor log-analytics workspace data-export list --resource-group
                                                    --workspace-name
                                                    [--query-examples]
                                                    [--subscription]

Required Parameters

--resource-group -g

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

--workspace-name

Name of the Log Analytics Workspace.

Optional Parameters

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--subscription

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

az monitor log-analytics workspace data-export show

Show a data export rule for a given workspace.

az monitor log-analytics workspace data-export show --name
                                                    --resource-group
                                                    --workspace-name
                                                    [--query-examples]
                                                    [--subscription]

Required Parameters

--name -n

Name of the data export rule.

--resource-group -g

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

--workspace-name

Name of the Log Analytics Workspace.

Optional Parameters

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--subscription

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

az monitor log-analytics workspace data-export update

Update a data export rule for a given workspace.

az monitor log-analytics workspace data-export update --name
                                                      --resource-group
                                                      --workspace-name
                                                      [--add]
                                                      [--all {false, true}]
                                                      [--destination]
                                                      [--enable {false, true}]
                                                      [--force-string]
                                                      [--remove]
                                                      [--set]
                                                      [--subscription]
                                                      [--tables]

Examples

Update a data export rule for a given workspace.

az monitor log-analytics workspace data-export update -g MyRG --workspace-name MyWS -n MyDataExport --destination {namespace_id} --all --enable false

Required Parameters

--name -n

Name of the data export rule.

--resource-group -g

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

--workspace-name

Name of the Log Analytics Workspace.

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

--all --export-all-tables

All workspace's tables are exported when this is enabled.

accepted values: false, true
--destination

The destination resource ID. It should be a storage account, an event hub namespace or an event hub. If event hub namespace is provided, event hub would be created for each table automatically.

--enable

Enable this data export rule.

accepted values: false, true
--force-string

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

--remove

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

--set

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

--subscription

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

--tables -t

An array of tables to export. if --export-all-tables is true, this argument should not be provided.