監視 Azure IoT 中樞 裝置布建服務數據參考
如需收集和分析 Azure IoT 中樞 裝置布建服務監視數據的詳細資訊,請參閱監視IoT中樞裝置布建服務 (DPS)。
計量
本節列出針對 DPS 收集的所有自動收集平台計量。
資源提供者和類型: Microsoft.Devices/provisioningServices。
計量 | 可透過診斷 設定 匯出? | 計量顯示名稱 | Unit | 彙總類型 | 描述 | 維度 |
---|---|---|---|---|---|---|
證明Attempts | Yes | 證明嘗試 | 計數 | 總數 | 嘗試的裝置證明數目 | ProvisioningServiceName,狀態,通訊協定 |
DeviceAssignments | Yes | 指派的裝置 | 計數 | 總數 | 指派給IoT中樞的裝置數目 | ProvisioningServiceName、IotHubName |
RegistrationAttempts | Yes | 註冊嘗試 | 計數 | 總數 | 嘗試的裝置註冊數目 | ProvisioningServiceName、IotHubName、Status |
如需詳細資訊,請參閱 Azure 監視器中支援的所有平臺計量清單。
計量維度
DPS 具有與其計量相關聯的下列維度。
維度名稱 | 描述 |
---|---|
IotHubName | 目標IoT中樞的名稱。 |
通訊協定 | 使用的裝置或服務通訊協定。 |
ProvisioningServiceName | DPS 實例的名稱。 |
狀態 | 作業的狀態。 |
如需計量維度的詳細資訊,請參閱 多維度計量。
資源記錄
本節列出您可以針對 DPS 收集的資源記錄類型。
資源提供者和類型: Microsoft.Devices/provisioningServices。
類別 | 描述 |
---|---|
DeviceOperations | 與裝置證明事件相關的記錄。 請參閱計費服務作業和定價中列出的裝置 API。 |
ServiceOperations | 與 DPS 服務事件相關的記錄。 請參閱計費服務作業和定價中列出的 DPS 服務 API。 |
如需參考,請參閱 Azure 監視器中支援的所有資源記錄類別類型清單。
DPS 會使用 AzureDiagnostics 數據表來儲存資源記錄資訊。 下列數據行是相關的。
屬性 | 資料類型 | 描述 |
---|---|---|
ApplicationID | GUID | 持有人授權中使用的應用程式識別碼。 |
CallerIpAddress | String | 事件的遮罩來源 IP 位址。 |
類別 | String | 作業類型,即 ServiceOperations 或 DeviceOperations。 |
CorrelationId | GUID | 事件的唯一識別碼。 |
DurationMs | String | 執行事件所花費的時間 (以毫秒為單位)。 |
層級 | int | 事件的記錄嚴重性。 例如,資訊或錯誤。 |
OperationName | String | 事件期間執行的動作類型。 例如:Query、Get、Upsert 等等。 |
OperationVersion | String | 事件期間使用的 API 版本。 |
資源 | String | 發生事件之資源的名稱。 例如,“MYEXAMPLEDPS”。 |
ResourceGroup | String | 資源所在的資源組名。 |
ResourceId | String | 發生事件所在資源的 Azure Resource Manager 資源識別碼。 |
ResourceProvider | String | 事件的資源提供者。 例如,“MICROSOFT。DEVICES”。 |
ResourceType | String | 事件的資源類型。 例如,“PROVISIONINGSERVICES”。 |
ResultDescription | String | 如果事件失敗,則為錯誤詳細數據。 |
ResultSignature | String | 如果事件不成功,則為事件的 HTTP 狀態代碼。 |
ResultType | String | 事件的結果:Success、Failure、ClientError 等等。 |
SubscriptionId | GUID | 資源所在的 Azure 訂用帳戶訂用帳戶標識碼。 |
TenantId | GUID | 資源所在 Azure 租使用者的租用戶標識碼。 |
TimeGenerated | Datetime | 發生此事件的日期和時間,以 UTC 時區表示。 |
location_s | String | 事件發生所在的 Azure 區域。 |
properties_s | JSON | 事件的其他資訊詳細數據。 |
DeviceOperations
下列 JSON 是裝置成功證明嘗試的範例。 裝置的註冊標識碼會在 屬性中 properties_s
識別。
{
"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
下列 JSON 是成功新增 (Upsert
) 個別註冊作業的範例。 註冊的註冊標識碼和註冊類型會在 屬性中 properties_s
識別。
{
"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 監視器記錄數據表
本節是指與 DPS 相關的所有 Azure 監視器記錄 Kusto 數據表,並可供 Log Analytics 查詢。 如需這些數據表的清單,以及 DPS 資源類型詳細信息的連結,請參閱 Azure 監視器記錄資料表參考中的裝置布建服務 。
如需所有 Azure 監視器記錄/Log Analytics 數據表的參考,請參閱 Azure 監視器記錄數據表參考。
活動記錄檔
如需活動記錄項目架構的詳細資訊,請參閱 活動記錄架構。
另請參閱
如需監視 Azure IoT 中樞 裝置布建服務的描述,請參閱監視 Azure IoT 中樞 裝置布建服務。
如需監視 Azure 資源的詳細資訊,請參閱使用 Azure 監視器來監視 Azure 資源。