nerdexam
Microsoft

AZ-220 · Question #37

You have 10 IoT devices that connect to an Azure IoT hub named Hub1. From Azure Cloud Shell, you run az iot hub monitor-events --hub-name Hub1 and receive the following error message: "az iot hub…

The correct answer is D. az extension add -name azure-cli-iot-ext. Execute az extension add --name azure-cli-iot-ext once and try again. In order to read the telemetry from your hub by CLI, you have to enable IoT Extension with the following commands: Add: az extension add --name azure-cli-iot-ext…

Monitor, troubleshoot, and optimize IoT solutions

Question

You have 10 IoT devices that connect to an Azure IoT hub named Hub1. From Azure Cloud Shell, you run az iot hub monitor-events --hub-name Hub1 and receive the following error message: "az iot hub: 'monitor-events' is not in the 'az iot hub' command group. See 'az iot hub --help'." You need to ensure that you can run the command successfully. What should you run first?

Options

  • Aaz iot hub monitor-feedback --hub-name Hub1
  • Baz iot hub generate-sas-token --hub-name Hub1
  • Caz iot hub configuration list --hub-name Hub1
  • Daz extension add -name azure-cli-iot-ext

How the community answered

(28 responses)
  • A
    4% (1)
  • B
    4% (1)
  • C
    11% (3)
  • D
    82% (23)

Explanation

Execute az extension add --name azure-cli-iot-ext once and try again. In order to read the telemetry from your hub by CLI, you have to enable IoT Extension with the following commands: Add: az extension add --name azure-cli-iot-ext https://github.com/MicrosoftDocs/azure-docs/issues/20843

Topics

#Azure CLI#IoT extension#monitor-events#azure-cli-iot-ext

Community Discussion

No community discussion yet for this question.

Full AZ-220 Practice