-
Notifications
You must be signed in to change notification settings - Fork 73
How to Enable IoT Hub Metrics Charts for Simulations
Most Device Simulation deployments include a chart showing connected devices, created devices, and messages sent using metrics from IoT Hub. However, there are a few situations where this chart will not appear for your simulations.
When Device Simulation is deployed, a service principle is created. This service principle is used to access the IoT Hub APIs to fetch metrics. If the person deploying Device Simulation did not have Owner or Administrator permissions on the subscription used then this user principle will not have adequate permissions. Someone with Owner or Administrator permissions will need to manually grant Contributor permissions to service principle to enable the charts.
- Log into the Azure Portal
- Click "Resource Groups" in the left navigation
- Click on the resource group for your Device Simulation deployment
- Click on "Access Control"
- Click "Add"
- Choose the "Contributor" role
- Enter the name of the resource group in the search box
- Click on the service principle listed with the name matching your resource group
- Click "Save"
Device Simulation can only access IoT Hub statistics for the IoT Hub deployed as part of Device Simulation. At this time, the only way to enable this feature, if you didn't deploy a hub, is to re-deploy Device Simulation and ensure the box is checked to also deploy an IoT Hub.
Device Simulation can only access IoT Hub statistics for the IoT Hub deployed as part of Device Simulation. If you target the pre-provisioned IoT Hub you will be able to see the charts.