IoT Platform supports the CloudMonitor service. You can configure alert rules to monitor the resource usage of IoT Platform and receive alert notifications after the rules are triggered. This article describes how to configure an alert rule.

Features

Different alert rules support different metrics. You can configure an alert rule based on the following table.

Feature Metrics Description
Threshold-triggered alerts If you set Product to IoT Platform when you create an alert rule, the following metrics are supported:
  • DeviceEventReportError, DevicePropertyReportError, DevicePropertySettingError, and DeviceServiceCallError
  • MessageCountForwardedThroughRuleEngine_REPUBLISH, MessageCountForwardedThroughRuleEngine_DATAHUB, MessageCountForwardedThroughRuleEngine_FC, MessageCountForwardedThroughRuleEngine_MNS, MessageCountForwardedThroughRuleEngine_MQ, MessageCountForwardedThroughRuleEngine_OTS, MessageCountForwardedThroughRuleEngine_RDS, and MessageCountForwardedThroughRuleEngine_TSDB
  • MessageCountSentFromIoT_MQTT and MessageCountSentFromIoT_LoRa
  • MessageCountSentToIoT_MQTT, MessageCountSentToIoT_CoAP, MessageCountSentToIoT_HTTP, and MessageCountSentToIoT_LoRa
  • OnlineDevicesCount_MQTT
  • MessageCountPerMinute
  • RuleEningeTransmitCountPerMinute
  • DeviceCount_Product
If the resource usage of IoT Platform or the number of failed operations exceeds a specified threshold within a specified time period, CloudMonitor sends an alert notification based on the alert rule.

For more information, see Alert notifications.

If you set Product to IoT Platform-Instance when you create an alert rule, the following metrics are supported:
  • DeviceNum_instance
  • MessageWatermarkTps_instance
  • RuleEngineWatermarkTps_instance
If you set Product to IoT Platform-Server subscription when you create an alert rule, the following metrics are supported:
  • AMQP_Msg_Accumulate
  • AMQP_Msg_Consume_rate
Event-triggered alerts
  • Device_Connect_QPM_Limit
  • Device_Uplink_QPS_Limit
  • Device_Downlink_QPS_Limit
  • Account_Connect_QPS_Limit
  • Account_Uplink_QPS_Limit
  • Account_Downlink_QPS_Limit
  • Account_RuleEngine_DataForward_QPS_Limit

Create a threshold-triggered alert rule

  1. Log on to the IoT Platform console.
  2. In the left-side navigation pane, choose Maintenance > Real-time Monitoring.
  3. On the Real-time Monitoring page, click Alert Settings.
  4. On the Create Alert Rule page, set the parameters and then click Confirm.
    The following table describes the parameters in the Related Resource section. You can set other parameters based on actual scenarios.

    For more information, see Create a threshold-triggered alert rule.

    Parameter Description
    Product Select IoT Platform, IoT Platform-Instance, or IoT Platform-Server subscription.
    Resource Range Valid values:
    • All Resources
      • If Product is set to IoT Platform or IoT Platform-Instance, all IoT Platform instances are included.
      • If Product is set to IoT Platform-Server subscription, all consumer groups in IoT Platform instances are included.
    • Instance: An alert notification is sent only if a specified product or consumer group in a specified instance matches the alert rule.
    Region This parameter is available if Resource Range is set to Instance. This parameter specifies the region where the IoT Platform instance resides.
    Instance Select one or more IoT Platform instances and products to be monitored.
    Consumer Group The parameter is available if Product is set to IoT Platform-Server subscription and Resource Range is set to Instance.

    Select one or more consumer groups to be monitored.

    An alert notification is sent only if the number of accumulated messages or the consumption rate of a consumer group exceeds a specified threshold.

Create an event-triggered alert rule

  1. Log on to the IoT Platform console.In the left-side navigation pane, choose Maintenance > Real-time Monitoring.
  2. On the Real-time Monitoring page, click Alert Settings.
  3. On the Create Alert Rule page, click View the Detail in the Set Alert Rules section.
  4. On the Event Monitoring page, click Create Event Alert. In the Create / Modify Event Alert panel, configure the alert rule and click OK.
    Set Product Type to IoT Platform and set other parameters as needed.

    For more information, see Create an event-triggered alert rule.

    Event monitoring