Reporting Hardware Alarms/Events
When an alarm is generated on the edge side, the current generated or cleared alarm information is proactively reported. When a rearm message is received, all the alarms that are not cleared are reported.
Message instance
{
"header": {
"msg_id": "741aec66-99b2-4d97-aaf2-63d27f53bbc5",
"parent_msg_id": "",
"timestamp": 1550107087319,
"sync": false
},
"route": {
"source": "hardware",
"group": "hub",
"operation": "update",
"resource": "websocket/alarm"
},
"content": {
}
}
Parameter description
The content message is described as follows:
{
"alarm": [{
"type": "alarm",
"alarmId": "0x00010002",
"alarmName": "emmc temperature up anomaly",
"resource": "EMMC0",
"perceivedSeverity": "MINOR",
"timestamp": "2018-11-08T21:57:21+08:00",
"sn": "1",
"notificationType ": "alarm",
"detailedInformation": "EMMC temperature abnormal",
"suggestion": "alarm handle suggestion",
"reason": "alarm reason",
"impact": "alarm impact"
}]
}
The definition of the alarm ID is to be determined.
Elements are defined as follows:
Level-1 Resource Name |
Level-2 Resource Name |
Description |
Type |
Value Range |
|---|---|---|---|---|
alarm |
type |
Alarm Type |
string |
The value can be alarm or event. |
alarmId |
Alarm ID |
string |
The fixed format is 0x00010002, in which the most significant bit is 0 by default. That is, the value ranges from 0x00000000 to 0x0fffffff. |
|
alarmName |
Alarm name |
string |
[a-z0-9A-Z- _]{1,64} |
|
resource |
Alarm resource name |
string |
[a-z0-9A-Z- _]{1,256} |
|
perceivedSeverity |
Alarm severity |
string |
The value can be MINOR, MAJOR, or CRITICAL. |
|
timestamp |
Time when an alarm is generated |
string |
64 bytes |
|
sn |
Alarm serial number |
string |
- |
|
notificationType |
Alarm type |
String |
Whether an alarm is generated or cleared. The value can be alarm or clear. If type is set to event, this parameter is left blank. |
|
detailedInformation |
Alarm description |
string |
256 bytes |
|
suggestion |
Alarm clearance suggestion |
string |
4096 bytes |
|
reason |
Alarm cause |
string |
256 bytes |
|
impact |
Alarm impact |
string |
256 bytes |