You can use CloudMonitor to monitor IoT resources based on events and thresholds. Event monitoring and alerting are performed based on the throttling rules of IoT Platform. Threshold monitoring and alerting are performed based on the metric values that you have specified.

Background information

Scenario

A total of 5,000 temperature sensors are deployed in an area that is designed to store hazardous goods. These devices communicate with IoT Platform by using the MQTT protocol. Every time the temperature fluctuates by 0.1°C, the temperature sensor sends the real-time temperature to IoT Platform. When the temperature exceeds 25°C, IoT Platform forwards the temperature data to Function Compute for subsequent processing.

Temperature data is an important factor that must be constantly monitored to ensure the safety of the storage area. The control room needs to obtain the temperature fluctuation data at each detection point in real time and respond in a timely manner. Therefore, the temperature sensors must be online 24 hours a day. If a large number of devices are offline at the same time, or the devices are unstable (repeatedly switching between online and offline), repair the devices and networks. A quick rise in temperature may pose a significant number of security risks that require an immediate response.

The temperature sensors at each detection point must be online 24 hours a day. Make sure that the data reported by the sensors can reach Function Compute and monitor the usage of IoT Platform resources under the current account. This helps to prevent throttling and ensure that IoT Platform can receive temperature data in a timely manner.

Project design

Before using CloudMonitor to monitor IoT Platform resources, create alert rules for IoT Platform in the CloudMonitor console.

Set the following events to trigger alerts:

  • The number of connection requests that a device sends per minute reaches the maximum limit.
  • The number of connection requests that the current account sends to IoT Platform per second reaches the maximum limit.
  • The number of requests that the current account publishes per second reaches the maximum limit.
  • The number of messages that a device sends per second reaches the maximum limit.
  • The number of requests that the current account sends to the rules engine per second reaches the maximum limit.

Set the following thresholds to trigger alerts:

  • The number of online devices (The MQTT protocol is used to connect the devices to IoT Platform).
  • The number of property reporting failures.
  • The number of messages that the rule engine forwards to Function Compute (FC).

Procedure for configuring alert rules

Create products and devices

Configure alert contacts

Create event-triggered alert rules

Create threshold-triggered alert rules