az monitor log-analytics workspace table

Manage tables for log analytics workspace.

Commands

az monitor log-analytics workspace table create

Create a Log Analytics workspace microsoft/custom log table. The table name needs to end with '_CL'.

az monitor log-analytics workspace table delete

Delete a Log Analytics workspace table.

az monitor log-analytics workspace table list

List all the tables for the given Log Analytics workspace.

az monitor log-analytics workspace table migrate

Migrate a Log Analytics table from support of the Data Collector API and Custom Fields features to support of Data Collection Rule-based Custom Logs.

az monitor log-analytics workspace table restore

Manage tables for log analytics workspace restore logs table.

az monitor log-analytics workspace table restore create

Create a Log Analytics workspace restore logs table. The table name needs to end with '_RST'.

az monitor log-analytics workspace table search-job

Manage tables for log analytics workspace search results table.

az monitor log-analytics workspace table search-job create

Create a Log Analytics workspace search results table. The table name needs to end with '_SRCH'.

az monitor log-analytics workspace table show

Get a Log Analytics workspace table.

az monitor log-analytics workspace table update

Update the properties of a Log Analytics workspace table.

az monitor log-analytics workspace table wait

Place the CLI in a waiting state until a condition of the workspace table is met.

az monitor log-analytics workspace table create

Create a Log Analytics workspace microsoft/custom log table. The table name needs to end with '_CL'.

az monitor log-analytics workspace table create --name
                                                --resource-group
                                                --workspace-name
                                                [--columns]
                                                [--description]
                                                [--no-wait]
                                                [--plan {Analytics, Basic}]
                                                [--retention-time]
                                                [--total-retention-time]

Examples

Create a Log Analytics workspace custom log table.

az monitor log-analytics workspace table create --resource-group MyResourceGroup --workspace-name MyWorkspace -n MyTable_CL --retention-time 45 --columns MyColumn1=string TimeGenerated=datetime

Required Parameters

--name -n

Name of the table.

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

--columns

A list of table custom columns.Extracts multiple space-separated colunms in colunm_name=colunm_type format.

--description

Schema description.

--no-wait

Do not wait for the long-running operation to finish.

--plan

The table plan.

accepted values: Analytics, Basic
--retention-time

The data table data retention in days, between 30 and 730. Setting this property to null will default to the workspace.

--total-retention-time

The table data total retention in days, between 4 and 2555. Setting this property to null will default to table retention.

az monitor log-analytics workspace table delete

Delete a Log Analytics workspace table.

az monitor log-analytics workspace table delete --name
                                                --resource-group
                                                --workspace-name
                                                [--no-wait]
                                                [--yes]

Examples

Delete a Log Analytics workspace table.

az monitor log-analytics workspace table delete --resource-group MyResourceGroup --workspace-name MyWorkspace -n MyTable

Required Parameters

--name -n

Name of the table.

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

--no-wait

Do not wait for the long-running operation to finish.

--yes -y

Do not prompt for confirmation.

az monitor log-analytics workspace table list

List all the tables for the given Log Analytics workspace.

az monitor log-analytics workspace table list --resource-group
                                              --workspace-name

Examples

List all the tables for the given Log Analytics workspace

az monitor log-analytics workspace table list --resource-group MyResourceGroup --workspace-name MyWorkspace

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.

az monitor log-analytics workspace table migrate

Migrate a Log Analytics table from support of the Data Collector API and Custom Fields features to support of Data Collection Rule-based Custom Logs.

az monitor log-analytics workspace table migrate --name
                                                 --resource-group
                                                 --workspace-name

Examples

Migrate a Log Analytics workspace table.

az monitor log-analytics workspace table migrate --resource-group MyResourceGroup --workspace-name MyWorkspace -n MyTable_CL

Required Parameters

--name -n

Name of the table.

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

az monitor log-analytics workspace table show

Get a Log Analytics workspace table.

az monitor log-analytics workspace table show --name
                                              --resource-group
                                              --workspace-name

Examples

Get a Log Analytics workspace table

az monitor log-analytics workspace table show --resource-group MyResourceGroup --workspace-name MyWorkspace -n MyTable

Required Parameters

--name -n

Name of the table.

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

az monitor log-analytics workspace table update

Update the properties of a Log Analytics workspace table.

az monitor log-analytics workspace table update --name
                                                --resource-group
                                                --workspace-name
                                                [--columns]
                                                [--description]
                                                [--no-wait]
                                                [--plan {Analytics, Basic}]
                                                [--retention-time]
                                                [--total-retention-time]

Examples

Update the properties of a Log Analytics workspace table.

az monitor log-analytics workspace table update --resource-group MyResourceGroup --workspace-name MyWorkspace -n MyTable --retention-time 30

Required Parameters

--name -n

Name of the table.

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

--columns

A list of table custom columns.Extracts multiple space-separated colunms in colunm_name=colunm_type format.

--description

Table description.

--no-wait

Do not wait for the long-running operation to finish.

--plan

The table plan.

accepted values: Analytics, Basic
--retention-time

The data table data retention in days, between 30 and 730. Setting this property to null will default to the workspace.

--total-retention-time

The table data total retention in days, between 4 and 2555. Setting this property to null will default to table retention.

az monitor log-analytics workspace table wait

Place the CLI in a waiting state until a condition of the workspace table is met.

az monitor log-analytics workspace table wait --name
                                              --resource-group
                                              --workspace-name
                                              [--created]
                                              [--custom]
                                              [--deleted]
                                              [--exists]
                                              [--interval]
                                              [--timeout]
                                              [--updated]

Examples

Pause executing next line of CLI script until the workspace table is successfully provisioned.

az monitor log-analytics workspace table wait -n MyTable -g MyResourceGroup --workspace-name MyWorkspace --created

Required Parameters

--name -n

Name of the table.

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

--created

Wait until created with 'provisioningState' at 'Succeeded'.

--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

Wait until deleted.

--exists

Wait until the resource exists.

--interval

Polling interval in seconds.

default value: 30
--timeout

Maximum wait in seconds.

default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.