Abnormal Data Target
Overview
When data is forwarded to other Huawei Cloud services or third-party applications, IoTDA stops message pushing if the target server is unreachable due to insufficient permissions or service unavailability. It checks the channel status every 3 minutes, and if the check result is normal, the channel will be restored. If you require real-time messages, you can configure abnormal data forwarding targets to obtain abnormal data. In this way, you can continue service processing and analyze failure causes, reducing the impact of single channel faults on services.
If the normal data target is unreachable within 24 hours, data is directly pushed to the configured abnormal data target. If the normal data target remains unreachable after 24 hours, the platform suspends data push.
Constraints
- If there is only 1 normal data target, 1 abnormal data target can be added.
- Up to five abnormal data targets can be created for each IoTDA instance.
- Supported rule data sources for abnormal data targets: device, device property, device message, device message status, device status, batch task, product, and device asynchronous command status.
- Configurable normal data targets for abnormal data forwarding: Data Ingestion Service (DIS), Distributed Message Service for Kafka, Object Storage Service (OBS), ROMA Connect, third-party application service (HTTP push), Distributed Message Service (DMS) for RocketMQ, FunctionGraph, GeminiDB Influx, Relational Database Service (RDS) for MySQL, MapReduce Service (MRS) Kafka, Blockchain Service (BCS), and Document Database Service (DDS).
- AMQP message queues can be used as abnormal data targets.
Data Format
The following is an example of the abnormal data forwarding format:
{ "request_id": "2131d048-234f-4564-9190-6030234678ad", "rule_id": "6519d048-3b7f-442b-9190-6030773879cc", "action_id": "f376ab9f-d060-4fbf-a383-3e52af98ae9d", "channel": "MYSQL_FORWARDING", "base64_original_payload": "ewogICAgInJlc291cmNlIjogImRldmljZS5tZXNzYWdlIiwKICAgICJldmVudCI6ICJyZXBvcnQiLAogICAgImV2ZW50X3RpbWUiOiAiMjAyNDA2MDFUMDAwMDAwWiIsCiAgICAiZXZlbnRfdGltZV9tcyI6ICIyMDI0LTA2LTAxVDAwOjAwOjAwLjAwMFoiLAogICAgInJlcXVlc3RfaWQiOiAiMjEzMWQwNDgtMjM0Zi00NTY0LTkxOTAtNjAzMDIzNDY3OGFkIiwKICAgICJub3RpZnlfZGF0YSI6IHsKICAgICAgICAiaGVhZGVyIjogewogICAgICAgICAgICAiYXBwX2lkIjogIjU4N2MyMzc3ZGRmYzQzMmI4OTMxZGNhYmNhODkyOTUyIiwKICAgICAgICAgICAgImRldmljZV9pZCI6ICIwMDAwMDAwMDAwMDAwMCIsCiAgICAgICAgICAgICJub2RlX2lkIjogIjIwMjAwNzExMTk5OTkxMDAwIiwKICAgICAgICAgICAgInByb2R1Y3RfaWQiOiAiMTIzNDU2Nzg5MDAiLAogICAgICAgICAgICAiZ2F0ZXdheV9pZCI6ICIyMDIwMDcxMTE5OTk5MTAwMCIKICAgICAgICB9LAogICAgICAgICJib2R5IjogewogICAgICAgICAgICAidG9waWMiOiAidGVzdFRvcGljIiwKICAgICAgICAgICAgImNvbnRlbnQiOiAiV2VsY29tZSB0byBIdWF3ZWkgQ2xvdWQgSW9UIERldmljZSBBY2Nlc3MoSW9UREEpIgogICAgICAgIH0KICAgIH0KfQo=", "error_message": "Push failed. Cause: Table 'xxx' doesn't exist. The iot platform will resume the push within 3 minutes after the channel is restored." }
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
ID of the message that fails to be pushed, which is specified by the device or generated by the platform and is used to trace the service process. |
rule_id |
String |
Unique ID of the rule triggering condition, which is allocated by the platform during rule creation. |
action_id |
String |
Unique ID of the data target to which a push exception occurs. The ID is allocated by the platform during forwarding target creation. |
channel |
String |
Type of the data target to which an exception occurs. |
base64_original_payload |
String |
Base64-encoded raw stream data. |
error_message |
String |
Error description. |
There may be additional fields during abnormal data forwarding. Ensure serialization compatibility when using the data format.
Procedure
- Access the IoTDA service page and click Access Console. Click the target instance card.
- In the navigation pane, choose Rules > Data Forwarding. On the displayed page, click Create Rule.
Figure 2 Creating a data forwarding rule
- On the displayed page, enter related information and click Create Rule.
Figure 3 Rules triggered by message reporting - forwarding data to Kafka
- Click the Set Forwarding Target tab and click Add to add a normal data target.
Figure 4 Adding a normal data target
- Click Add to add an abnormal data target.
Figure 5 Adding an abnormal data target
- Click Enable Rule.
Figure 6 Data forwarding - Enabling a rule
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot