az iot central diagnostics
Note
This reference is part of the azure-iot extension for the Azure CLI (version 2.46.0 or higher). The extension will automatically install the first time you run an az iot central diagnostics command. Learn more about extensions.
This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Perform application and device level diagnostics.
Commands
Name | Description | Type | Status |
---|---|---|---|
az iot central diagnostics monitor-events |
View device telemetry messages sent to the IoT Central app. |
Extension | Preview |
az iot central diagnostics monitor-properties |
View desired and reported properties sent to/from the IoT Central app. |
Extension | Preview |
az iot central diagnostics registration-summary |
View the registration summary of all the devices in an app. |
Extension | Preview |
az iot central diagnostics validate-messages |
Validate messages sent to the IoT Hub for an IoT Central app. |
Extension | Preview |
az iot central diagnostics validate-properties |
Validate reported properties sent to the IoT Central application. |
Extension | Preview |
az iot central diagnostics monitor-events
Command group 'iot central diagnostics' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
View device telemetry messages sent to the IoT Central app.
Shows the telemetry data sent to IoT Central application. By default, it shows all the data sent by all devices. Use the --device-id parameter to filter to a specific device.
az iot central diagnostics monitor-events --app-id
[--central-api-uri]
[--cg]
[--device-id]
[--enqueued-time]
[--module-id]
[--properties {all, anno, app, sys}]
[--repair {false, true}]
[--timeout]
[--token]
[--yes {false, true}]
Examples
Basic usage
az iot central diagnostics monitor-events --app-id {app_id}
Basic usage when filtering on target device
az iot central diagnostics monitor-events --app-id {app_id} -d {device_id}
Basic usage when filtering targeted devices with a wildcard in the ID
az iot central diagnostics monitor-events --app-id {app_id} -d Device*d
Basic usage when filtering on module.
az iot central diagnostics monitor-events --app-id {app_id} -m {module_id}
Basic usage when filtering targeted modules with a wildcard in the ID
az iot central diagnostics monitor-events --app-id {app_id} -m Module*
Filter device and specify an Event Hub consumer group to bind to.
az iot central diagnostics monitor-events --app-id {app_id} -d {device_id} --cg {consumer_group_name}
Receive message annotations (message headers)
az iot central diagnostics monitor-events --app-id {app_id} -d {device_id} --properties anno
Receive message annotations + system properties. Never time out.
az iot central diagnostics monitor-events --app-id {app_id} -d {device_id} --properties anno sys --timeout 0
Receive all message attributes from all device messages
az iot central diagnostics monitor-events --app-id {app_id} --props all
Receive all messages and parse message payload as JSON
az iot central diagnostics monitor-events --app-id {app_id} --output json
Required Parameters
The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.
Optional Parameters
The IoT Central DNS suffix associated with your application.
Specify the consumer group to use when connecting to event hub endpoint.
The device ID of the target device.You can find the device ID by, clicking on the Connect button on the Device Details page.
Indicates the time that should be used as a starting point to read messages from the partitions. Units are milliseconds since unix epoch. If no time is indicated "now" is used.
The IoT Edge Module ID if the device type is IoT Edge.
Indicate key message properties to output. sys = system properties, app = application properties, anno = annotations.
Reinstall uamqp dependency compatible with extension version. Default: false.
Maximum seconds to maintain connection without receiving message. Use 0 for infinity.
If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.
Skip user prompts. Indicates acceptance of action. Used primarily for automation scenarios. Default: false.
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 iot central diagnostics monitor-properties
Command group 'iot central diagnostics' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
View desired and reported properties sent to/from the IoT Central app.
Polls device-twin from central and compares it to the last device-twin Parses out properties from device-twin, and detects if changes were made Prints subset of properties that were changed within the polling interval.
az iot central diagnostics monitor-properties --app-id
--device-id
[--central-api-uri]
[--token]
Examples
Basic usage
az iot central diagnostics monitor-properties --app-id {app_id} -d {device_id}
Required Parameters
The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.
The device ID of the target device.You can find the device ID by, clicking on the Connect button on the Device Details page.
Optional Parameters
The IoT Central DNS suffix associated with your application.
If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.
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 iot central diagnostics registration-summary
Command group 'iot central diagnostics' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
View the registration summary of all the devices in an app.
Note: This command can take a significant amount of time to return if your app contains a lot of devices.
az iot central diagnostics registration-summary --app-id
[--api-version {2022-06-30-preview, 2022-07-31}]
[--central-api-uri]
[--token]
Examples
Registration summary
az iot central diagnostics registration-summary --app-id {appid}
Required Parameters
The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.
Optional Parameters
Argument 'api_version' has been deprecated and will be removed in a future release.
This command parameter has been deprecated and will be ignored.In the future release, we will only support IoT Central APIs from latest GA version.If any API is not GA yet, we will call latest preview version.
The IoT Central DNS suffix associated with your application.
If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.
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 iot central diagnostics validate-messages
Command group 'iot central diagnostics' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Validate messages sent to the IoT Hub for an IoT Central app.
Performs validations on the telemetry messages and reports back data that is not modeled in the device template or data where the data type doesn’t match what is defined in the device template.
az iot central diagnostics validate-messages --app-id
[--central-api-uri]
[--cg]
[--device-id]
[--dr]
[--enqueued-time]
[--max-messages]
[--minimum-severity {error, info, warning}]
[--module-id]
[--properties {all, anno, app, sys}]
[--repair {false, true}]
[--style {csv, json, scroll}]
[--timeout]
[--token]
[--yes {false, true}]
Examples
Basic usage
az iot central diagnostics validate-messages --app-id {app_id}
Output errors as they are detected
az iot central diagnostics validate-messages --app-id {app_id} --style scroll
Basic usage when filtering on target device
az iot central diagnostics validate-messages --app-id {app_id} -d {device_id}
Basic usage when filtering targeted devices with a wildcard in the ID
az iot central diagnostics validate-messages --app-id {app_id} -d Device*
Basic usage when filtering on module.
az iot central diagnostics validate-messages --app-id {app_id} -m {module_id}
Basic usage when filtering targeted modules with a wildcard in the ID
az iot central diagnostics validate-messages --app-id {app_id} -m Module*
Filter device and specify an Event Hub consumer group to bind to.
az iot central diagnostics validate-messages --app-id {app_id} -d {device_id} --cg {consumer_group_name}
Required Parameters
The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.
Optional Parameters
The IoT Central DNS suffix associated with your application.
Specify the consumer group to use when connecting to event hub endpoint.
The device ID of the target device.You can find the device ID by, clicking on the Connect button on the Device Details page.
Maximum duration to receive messages from target device before terminating connection.Use 0 for infinity.
Indicates the time that should be used as a starting point to read messages from the partitions. Units are milliseconds since unix epoch. If no time is indicated "now" is used.
Maximum number of messages to recieve from target device before terminating connection.Use 0 for infinity.
Minimum severity of issue required for reporting.
The IoT Edge Module ID if the device type is IoT Edge.
Indicate key message properties to output. sys = system properties, app = application properties, anno = annotations.
Reinstall uamqp dependency compatible with extension version. Default: false.
Indicate output stylescroll = deliver errors as they arrive, json = summarize results as json, csv = summarize results as csv.
Maximum seconds to maintain connection without receiving message. Use 0 for infinity.
If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.
Skip user prompts. Indicates acceptance of action. Used primarily for automation scenarios. Default: false.
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 iot central diagnostics validate-properties
Command group 'iot central diagnostics' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Validate reported properties sent to the IoT Central application.
Performs validations on reported property updates:
- Warning - Properties sent by device that are not modeled in central.
- Warning - Properties with same name declared in multiple interfaces should have interface name included as part of the property update.
az iot central diagnostics validate-properties --app-id
--device-id
[--central-api-uri]
[--minimum-severity {error, info, warning}]
[--token]
Examples
Basic usage
az iot central diagnostics validate-properties --app-id {app_id} -d {device_id}
Required Parameters
The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.
The device ID of the target device.You can find the device ID by, clicking on the Connect button on the Device Details page.
Optional Parameters
The IoT Central DNS suffix associated with your application.
Minimum severity of issue required for reporting.
If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.
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.