Azure IoT Hub Device Provisioning Service monitoring data reference

This article contains all the monitoring reference information for this service.

See Monitor Azure IoT Hub Device Provisioning Service for details on the data you can collect for IoT Hub Device Provisioning Service and how to use it.

Metrics

This section lists all the automatically collected platform metrics for this service. These metrics are also part of the global list of all platform metrics supported in Azure Monitor.

For information on metric retention, see Azure Monitor Metrics overview.

Supported metrics for Microsoft.Devices/provisioningServices

The following table lists the metrics available for the Microsoft.Devices/provisioningServices resource type.

  • All columns might not be present in every table.
  • Some columns might be beyond the viewing area of the page. Select Expand table to view all available columns.

Table headings

  • Category - The metrics group or classification.
  • Metric - The metric display name as it appears in the Azure portal.
  • Name in REST API - The metric name as referred to in the REST API.
  • Unit - Unit of measure.
  • Aggregation - The default aggregation type. Valid values: Average (Avg), Minimum (Min), Maximum (Max), Total (Sum), Count.
  • Dimensions - Dimensions available for the metric.
  • Time Grains - Intervals at which the metric is sampled. For example, PT1M indicates that the metric is sampled every minute, PT30M every 30 minutes, PT1H every hour, and so on.
  • DS Export- Whether the metric is exportable to Azure Monitor Logs via diagnostic settings. For information on exporting metrics, see Create diagnostic settings in Azure Monitor.
Metric Name in REST API Unit Aggregation Dimensions Time Grains DS Export
Attestation attempts

Number of device attestations attempted
AttestationAttempts Count Total ProvisioningServiceName, Status, Protocol PT1M Yes
Devices assigned

Number of devices assigned to an IoT hub
DeviceAssignments Count Total ProvisioningServiceName, IotHubName PT1M Yes
Registration attempts

Number of device registrations attempted
RegistrationAttempts Count Total ProvisioningServiceName, IotHubName, Status PT1M Yes

Metric dimensions

For information about what metric dimensions are, see Multi-dimensional metrics.

This service has the following dimensions associated with its metrics.

Dimension Name Description
IotHubName The name of the target IoT hub.
Protocol The device or service protocol used.
ProvisioningServiceName The name of the DPS instance.
Status The status of the operation.

For more information on what metric dimensions are, see Multi-dimensional metrics.

Resource logs

This section lists the types of resource logs you can collect for this service. The section pulls from the list of all resource logs category types supported in Azure Monitor.

Supported resource logs for Microsoft.Devices/provisioningServices

Category Category display name Log table Supports basic log plan Supports ingestion-time transformation Example queries Costs to export
DeviceOperations Device Operations AzureDiagnostics

Logs from multiple Azure resources.

No No Queries No
ServiceOperations Service Operations AzureDiagnostics

Logs from multiple Azure resources.

No No Queries No

The following list provides additional information about the preceding logs:

For reference, see a list of all resource logs category types supported in Azure Monitor.

DPS uses the AzureDiagnostics table to store resource log information. The following columns are relevant.

Property Data type Description
ApplicationId GUID Application ID used in bearer authorization.
CallerIpAddress String A masked source IP address for the event.
Category String Type of operation, either ServiceOperations or DeviceOperations.
CorrelationId GUID Unique identifier for the event.
DurationMs String How long it took to perform the event in milliseconds.
Level Int The logging severity of the event. For example, Information or Error.
OperationName String The type of action performed during the event. For example: Query, Get, Upsert, and so on.
OperationVersion String The API Version used during the event.
Resource String The name forOF the resource where the event took place. For example, MYEXAMPLEDPS.
ResourceGroup String The name of the resource group where the resource is located.
ResourceId String The Azure Resource Manager Resource ID for the resource where the event took place.
ResourceProvider String The resource provider for the event. For example, MICROSOFT.DEVICES.
ResourceType String The resource type for the event. For example, PROVISIONINGSERVICES.
ResultDescription String Error details for the event if unsuccessful.
ResultSignature String HTTP status code for the event if unsuccessful.
ResultType String Outcome of the event: Success, Failure, ClientError, and so on.
SubscriptionId GUID The subscription ID of the Azure subscription where the resource is located.
TenantId GUID The tenant ID for the Azure tenant where the resource is located.
TimeGenerated DateTime The date and time that this event occurred, in UTC.
location_s String The Azure region where the event took place.
properties_s JSON Additional information details for the event.

DeviceOperations

The following JSON is an example of a successful attestation attempt from a device. The registration ID for the device is identified in the properties_s property.

  {
    "CallerIPAddress": "24.18.226.XXX",
    "Category": "DeviceOperations",
    "CorrelationId": "68952383-80c0-436f-a2e3-f8ae9a41c69d",
    "DurationMs": "226",
    "Level": "Information",
    "OperationName": "AttestationAttempt",
    "OperationVersion": "March2019",
    "Resource": "MYEXAMPLEDPS",
    "ResourceGroup": "MYRESOURCEGROUP",
    "ResourceId": "/SUBSCRIPTIONS/747F1067-xxx-xxx-xxxx-9DEAA894152F/RESOURCEGROUPS/MYRESOURCEGROUP/PROVIDERS/MICROSOFT.DEVICES/PROVISIONINGSERVICES/MYEXAMPLEDPS",
    "ResourceProvider": "MICROSOFT.DEVICES",
    "ResourceType": "PROVISIONINGSERVICES",
    "ResultDescription": "",
    "ResultSignature": "",
    "ResultType": "Success",
    "SourceSystem": "Azure",
    "SubscriptionId": "747F1067-xxx-xxx-xxxx-9DEAA894152F",
    "TenantId": "37dcb621-xxxx-xxxx-xxxx-e8c8addbc4e5",
    "TimeGenerated": "2022-04-02T00:05:51Z",
    "Type": "AzureDiagnostics",
    "_ResourceId": "/subscriptions/747F1067-xxx-xxx-xxxx-9DEAA894152F/resourcegroups/myresourcegroup/providers/microsoft.devices/provisioningservices/myexampledps",
    "location_s": "centralus",
    "properties_s": "{\"id\":\"my-device-1\",\"type\":\"Registration\",\"protocol\":\"Mqtt\"}",
  }

ServiceOperations

The following JSON is an example of a successful add (Upsert) individual enrollment operation. The registration ID for the enrollment and the type of enrollment are identified in the properties_s property.

  {
    "CallerIPAddress": "13.91.244.XXX",
    "Category": "ServiceOperations",
    "CorrelationId": "23bd419d-d294-452b-9b1b-520afef5ef52",
    "DurationMs": "98",
    "Level": "Information",
    "OperationName": "Upsert",
    "OperationVersion": "October2021",
    "Resource": "MYEXAMPLEDPS",
    "ResourceGroup": "MYRESOURCEGROUP",
    "ResourceId": "/SUBSCRIPTIONS/747F1067-xxxx-xxxx-xxxx-9DEAA894152F/RESOURCEGROUPS/MYRESOURCEGROUP/PROVIDERS/MICROSOFT.DEVICES/PROVISIONINGSERVICES/MYEXAMPLEDPS",
    "ResourceProvider": "MICROSOFT.DEVICES",
    "ResourceType": "PROVISIONINGSERVICES",
    "ResultDescription": "",
    "ResultSignature": "",
    "ResultType": "Success",
    "SourceSystem": "Azure",
    "SubscriptionId": "747f1067-xxxx-xxxx-xxxx-9deaa894152f",
    "TenantId": "37dcb621-xxxx-xxxx-xxxx-e8c8addbc4e5",
    "TimeGenerated": "2022-04-01T00:52:00Z",
    "Type": "AzureDiagnostics",
    "_ResourceId": "/subscriptions/747F1067-xxxx-xxxx-xxxx-9DEAA894152F/resourcegroups/myresourcegroup/providers/microsoft.devices/provisioningservices/myexampledps",
    "location_s": "centralus",
    "properties_s": "{\"id\":\"my-device-1\",\"type\":\"IndividualEnrollment\",\"protocol\":\"Http\"}",
  }

Azure Monitor Logs tables

This section lists the Azure Monitor Logs tables relevant to this service, which are available for query by Log Analytics using Kusto queries. The tables contain resource log data and possibly more depending on what is collected and routed to them.

IoT Hub Device Provisioning Service Microsoft.Devices/ProvisioningServices

Activity log

The linked table lists the operations that can be recorded in the activity log for this service. These operations are a subset of all the possible resource provider operations in the activity log.

For more information on the schema of activity log entries, see Activity Log schema.