如何管理 Azure Stack Hub 上的 IoT 中心How to manage IoT Hub on Azure Stack Hub

通过 IoT 中心管理体验,你可以可视化和管理总体状态、警报和容量。The IoT Hub management experience allows you to visualize and manage overall status, alerts, and capacity.

重要

Azure Stack Hub 上的 IoT 中心目前为预览版,在预览期间可免费使用。IoT Hub on Azure Stack Hub is currently in preview, and is provided free during the preview period.

IoT 中心管理仪表板IoT Hub management dashboard

若要访问 IoT 中心管理仪表板,请执行以下操作:To access the IoT Hub management dashboard:

  1. 登录到 Azure Stack Hub 管理员门户,选择左侧的“仪表板”视图,然后选择“IoT 中心”资源提供程序 :Sign in to the Azure Stack Hub administrator portal, select the Dashboard view on the left, then select the IoT Hub resource provider:

    操作员仪表板operator dashboard

  2. IoT 中心仪表板提供摘要视图,显示当前警报、在戳记上创建的配额以及订阅中的 IoT 中心群集总数:The IoT Hub dashboard provides a summary view, showing current alerts, quotas created on the stamp, and the total number of IoT Hub clusters in your subscription:

    IoT 中心仪表板 - 概览iot hub dashboard - overview

警报Alerts

IoT 中心资源提供程序支持以下警报:The IoT Hub resource provider supports the following alerts:

CategoryCategory 警报Alert 类型Type 说明Description
性能Performance IoT 中心 CPU 使用情况需要引起注意。IoT Hub CPU usage needs attention. 警告Warning 在过去 6 小时内,IoT 中心资源提供程序的 CPU 使用量百分比平均超过 75%。The average of % CPU usage of IoT Hub resource provider in the last 6 hours is over 75%.
性能Performance IoT 中心内存使用情况需要引起注意。IoT Hub memory usage needs attention. 警告Warning 过去 6 小时内 IoT 中心资源提供程序的剩余内存使用量小于 1024 MB。The remaining memory usage of IoT Hub resource provider in the last 6 hours is less than 1024 MB.
性能Performance 用于 IoT 中心资源提供程序的磁盘空间不足。Low disk space for IoT Hub resource provider. 警告Warning 剩余磁盘空间少于10%。The remaining disk space is less than 10%.
资源Resource 创建或更新 IoT 中心资源失败。Creating or updating IoT Hub resource failed. 警告Warning IoT 中心资源提供程序创建或更新 IoT 中心故障计数在 15 分钟内不少于 1。IoT Hub Resource Provider Create or Update IoT Hub Failure Count is no less than 1 in 15 minutes.
服务Service IoT 中心资源提供程序日志错误需要引起注意。IoT Hub resource provider log errors needs attention. 警告Warning IoT 中心资源提供程序每个角色实例的日志失败计数在 15 分钟内超过 3。IoT Hub resource provider log failure count per role instance is more than 3 in 15 minutes.
服务Service IoTHub-SU-InternalErrorIoTHub-SU-InternalError 警告Warning IoTHub SU 内部故障和超时计数过去 30 分钟内不少于 5。IoTHub SU Internal Failure and Timeout Count is no less than 5 in the last 30 minutes.
服务Service IoT 中心数据平面备份失败。IoT Hub data plane backup failure occurred. 警告Warning IoT 中心数据平面在过去 15 分钟内出现备份失败。IoT Hub data plane had backup failures during the past 15 minutes. 设备数据将不受保护。Device data will not be protected.
服务Service IoT 中心数据平面已发生连续备份失败。IoT Hub data plane consecutive backup failure has occurred. 警告Warning IoT 中心数据平面在过去 15 分钟内出现连续的备份故障。IoT Hub data plane had consecutive backup failures during the past 15 minutes. 设备数据将不受保护。Device data will not be protected.
服务Service IoT 中心数据平面未成功备份。IoT Hub data plane no success backup failure occurred. 警告Warning IoT 中心在过去 3 小时内未成功备份。IoT Hub has no successful backup in last 3 hours. 设备数据将不受保护。Your device data may not be protected.
服务Service IoT 中心数据平面还原失败。IoT Hub data plane restore failed. 警告Warning IoT 中心设备信息还原失败。IoT Hub device information restore failed. IotHubPerformanceMetrics 在过去 15 分钟内超过阈值。IotHubPerformanceMetrics exceeds threshold for the past 15 minutes.
服务Service IoT 中心网关出现故障。IoT Hub gateway failure occurred. 警告Warning IoT 中心网关出现故障。IoT Hub gateway failure occurred. 设备遥测功能可能会受到影响。Device telemetry functionality may be impacted.
服务Service IoT 中心容器出现故障。IoT Hub Container failure occurred. 警告Warning IoT 中心容器出现故障。IoT Hub container failure has occurred. 设备身份验证可能失败。Device authentication may fail.
服务Service IoT 中心设备管理容器出现故障。IoT Hub device management container failure occurred. 警告Warning IoT 中心设备管理容器出现故障。IoT Hub device management container failure has occurred. 设备孪生、直接方法功能可能会降级。Device twin, direct method functionalities may be degraded.

监视警报和配额:To monitor alerts and quotas:

  1. 选择“警报”以查看警报历史记录:Select Alerts to view the alert history:

    IoT 中心仪表板 - 警报iot hub dashboard - alerts

  2. 选择“配额”以查看有效配额列表:Select Quotas to see the list of quotas in effect:

    备注

    在预览期间,禁用“创建”功能并提供无限制的默认配额。During preview, the Create feature is disabled and an unlimited default quota is provided. 正式发布版将启用“创建”。Create will be enabled for GA.

    中心仪表板 - 配额iot hub dashboard - quotas

容量管理Capacity management

作为操作员,你可以采用与任何云操作员相同的方式管理和操作 Azure Stack Hub 实例。As an operator, you manage and operate your Azure Stack Hub instance in the same manner as any cloud operator. 确保软件安装正确、配置正确且安全,并一致有效运行,实现高可用性 (HA)。You make sure software is installed properly, configured correctly and securely, and operated for high availability (HA), coherently and efficiently. 在操作 Azure Stack Hub 实例和 IoT 中心资源提供程序时,需要应用容量管理原则。You'll need to apply capacity management principles in operating both the Azure Stack Hub instance and the IoT Hub resource provider.

Azure Stack Hub 容量管理Azure Stack Hub capacity management

若要确定 IoT 中心所需的容量,需要估计工作负载,主要是设备数量和消息吞吐量。To determine the required capacity for IoT Hub, you'll need to estimate the workload, mainly the number of devices and the message throughput. 为了协助规划,我们在 4 节点 Azure Stack Hub 环境中进行了以下测试以供参考:To assist with planning, we have conducted the following tests on a 4-node Azure Stack Hub environment for reference:

方案Scenario VMVMs VcoresVcores 设备数/中心Devices/ hub 中心版本Hub edition 中心Hubs 单位数/中心Units/ hub 设备总数Total devices 总中心单位Total hub units 数百万条消息/天Millions of messages/ day
默认Default 55 2020 300,000300,000 S2S2 44 200200 1,200,0001,200,000 800800 4,8004,800
12 个 VM12 VMs 1212 4848 500,000500,000 S2S2 44 200200 2,000,0002,000,000 800800 4,8004,800
18 个 VM18 VMs 1818 7272 400,000400,000 S3S3 44 1010 1,600,0001,600,000 4040 12,00012,000

有关详细信息,请参阅 Azure Stack Hub Capacity PlannerRefer to Azure Stack Hub Capacity Planner for more details.

IoT 中心容量管理IoT Hub capacity management

由于 Azure Stack Hub 部署在资源有限的本地数据中心中,因此在 Azure Stack Hub 上运行的所有服务都将共享相同的资源池并为之竞争。Because Azure Stack Hub is deployed in an on-premises data center with limited resources, all services running on Azure Stack Hub share and compete for the same resource pool. 操作员需要根据业务需求规划和管理容量。Operators need to plan and manage the capacity based on the business needs. IoT 中心资源提供程序使操作员能够管理服务的容量要求。The IoT Hub resource provider gives operators the ability to manage the capacity requirements for the service.

IoT 中心只有一个 VM 类型。IoT Hub has a single VM type. 在 IoT 中心的部署过程中,系统会在 Azure Stack Hub 上提供一组这样的 VM。As part of IoT Hub deployment, the system provisions a set of these VMs on Azure Stack Hub. VM 可以支持一定数量的设备和消息吞吐量。The VMs can support a certain number of devices and message throughput. 默认设置应满足大多数需求。The default setting should meet most requirements. 但是,如果你需要更多设备或更高的消息吞吐量,可以使用管理员门户、CLI 或 PowerShell 增加容量。However, if you need more devices or higher message throughput, you can increase the capacity using the administrator portal, CLI, or PowerShell.

监视和更改容量设置:To monitor and change capacity settings:

  1. 选择左侧的“容量”视图。Select the Capacity view on the left. 你将看到容量状态,包括 IoT 中心群集中预配的 VM 数量及其资源利用率。You'll see capacity status, including the number of VMs provisioned in an IoT Hub cluster and their resource utilization. 显示的节点数是分配给 IoT 中心当前的节点数。The number of nodes shown is the current number of nodes allocated to IoT Hub.

  2. 若要增加容量,请选择 IoT 中心群集名称,更改节点数,然后选择“更新缩放”。To increase capacity, select the IoT Hub cluster name, change the number of nodes, then select Update Scale. 可以通过添加可用资源允许的尽可能多的 VM 来增加容量。You can increase capacity by adding as many VMs as available resources allow.

    重要

    IoT 中心群集横向扩展(从小到大)仅支持预览。Only IoT Hub cluster scale-out (smaller-to-larger) is supported for preview. IoT 中心的正式发布 (GA) 版本将支持横向缩减(从大到小)。Scale-in (larger-to-smaller) will be supported in the General Availability (GA) version of IoT Hub.

    中心仪表板 - 容量iot hub dashboard - capacity

后续步骤Next steps

有关以下内容的详细信息:For more information on:

Azure Stack Hub 监视功能(包括警报),请参阅监视运行状况和警报Azure Stack Hub monitoring capabilities, including alerting, refer to Monitor Health and Alerts.

Azure Stack Hub 日志收集,请参阅 Azure Stack 诊断日志收集概述Azure Stack Hub log collection, see Overview of Azure Stack diagnostic log collection.