Share via


az iot du device log

Note

This reference is part of the azure-iot extension for the Azure CLI (version 2.59.0 or higher). The extension will automatically install the first time you run an az iot du device log command. Learn more about extensions.

Instance log collection management.

Commands

Name Description Type Status
az iot du device log collect

Configure a device diagnostics log collection operation on specified devices.

Extension GA
az iot du device log list

List instance diagnostic log collection operations.

Extension GA
az iot du device log show

Show a specific instance diagnostic log collection operation.

Extension GA

az iot du device log collect

Configure a device diagnostics log collection operation on specified devices.

az iot du device log collect --account
                             --agent-id
                             --instance
                             --lcid --log-collection-id
                             [--description]
                             [--resource-group]

Examples

Configure diagnostics log collection for two devices d0 and d1.

az iot du device log collect -n {account_name} -i {instance_name} --log-collection-id {log_collection_id} --description "North-wing device diagnostics" --agent-id deviceId=d0 --agent-id deviceId=d1

Configure diagnostics log collection for a module m0 deployed on device d0.

az iot du device log collect -n {account_name} -i {instance_name} --log-collection-id {log_collection_id} --description "ML module diagnostics" --agent-id deviceId=d0 moduleId=m0

Required Parameters

--account -n

Device Update account name. You can configure the default account name using az config set defaults.adu_account={name}.

Property Value
Parameter group: Account Identifier Arguments
--agent-id

Space-separated key=value pairs corresponding to device update agent identifier properties. The key of deviceId is required, while moduleId is optional. --agent-id can be used 1 or more times.

--instance -i

Device Update instance name. You can configure the default instance name using az config set defaults.adu_instance={name}.

Property Value
Parameter group: Account Identifier Arguments
--lcid --log-collection-id

Log collection Id.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--description

Description for the log collection operation.

--resource-group -g

Device Update account resource group name. You can configure the default group using az config set defaults.adu_group={name}.

Property Value
Parameter group: Account Identifier Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az iot du device log list

List instance diagnostic log collection operations.

az iot du device log list --account
                          --instance
                          [--resource-group]

Examples

List diagnostic log collection operations.

az iot du device log list -n {account_name} -i {instance_name}

Required Parameters

--account -n

Device Update account name. You can configure the default account name using az config set defaults.adu_account={name}.

Property Value
Parameter group: Account Identifier Arguments
--instance -i

Device Update instance name. You can configure the default instance name using az config set defaults.adu_instance={name}.

Property Value
Parameter group: Account Identifier Arguments

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--resource-group -g

Device Update account resource group name. You can configure the default group using az config set defaults.adu_group={name}.

Property Value
Parameter group: Account Identifier Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az iot du device log show

Show a specific instance diagnostic log collection operation.

az iot du device log show --account
                          --instance
                          --lcid --log-collection-id
                          [--detailed {false, true}]
                          [--resource-group]

Examples

Show a diagnostic log collection operation.

az iot du device log show -n {account_name} -i {instance_name} --log-collection-id {log_collection_id}

Required Parameters

--account -n

Device Update account name. You can configure the default account name using az config set defaults.adu_account={name}.

Property Value
Parameter group: Account Identifier Arguments
--instance -i

Device Update instance name. You can configure the default instance name using az config set defaults.adu_instance={name}.

Property Value
Parameter group: Account Identifier Arguments
--lcid --log-collection-id

Log collection Id.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--detailed

Flag indicating whether the command should fetch the detailed status of a log collection operation.

Property Value
Accepted values: false, true
--resource-group -g

Device Update account resource group name. You can configure the default group using az config set defaults.adu_group={name}.

Property Value
Parameter group: Account Identifier Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False