Register the send-alarm-to-server event and filter alarms to be sent with certain criteria.
/events
Query parameters | |
---|---|
type | Event type.
Integer type.Required. The value is 11. indicating the send-alarm-to-server event.
|
uuid | UUID.
String type.No default value. Uniquely identifies a client.
|
alarmLevel | Alarm level.
Integer type, supporting multiple elements. Optional. No default value. If this parameter is not set, then all levels of alarms will be forwarded. For the valid values, see Query Alarm Levels.
|
customView | Custom view ID.
Long integer type. Optional. No default value.
|
deviceIp | Device IP address.
String type, supporting multiple elements. Optional. No default value.
|
ipSegment | IP segment.
String type, supporting multiple elements. Optional. No default value. The IP range is expressed with a hyphen (-). For example, 192.168.0.1-192.168.0.254.
|
eventOid | Alarm event OID.
String type, supporting multiple elements. Optional. No default value.
|
HTTP/1.1 202 Accepted Content-Type: application/xml
id | Alarm ID, which uniquely identifies an alarm.
Long integer type.
|
OID | Alarm event OID.
String type.
|
originalType | Alarm source type.
Integer type. Optional. No default value. For the valid values, see Query Alarm Sources.
|
originalTypeDesc | Description of the alarm source type.
String type.
|
deviceId | Device ID.
Long integer type.
|
deviceIp | Device IP address.
String type.
|
deviceName | Device name.
String type.
|
alarmLevel | Alarm level.
Integer type, supporting multiple elements. Optional. No default value. For the valid values, see Query Alarm Levels.
|
alarmLevelDesc | Alarm level description.
String type.
|
alarmCategory | Alarm category.
Integer type. Optional. No default value.For the valid values, see Query Alarm Categories.
|
alarmCategoryDesc | Alarm category description.
String type.
|
faultTime | Time when the alarm occurred.
Long integer type.
|
faultTimeDesc | Detailed information about the time when the alarm occurred.
String type, in the format of yyyy-MM-dd HH:mm:ss.
|
recTime | Time when the alarm was recovered.
Long integer type.
|
recTimeDesc | Detailed information about the time when the alarm was recovered.
String type, in the format of yyyy-MM-dd HH:mm:ss.
|
recStatus | Alarm recovery status.
Integer type. Optional. No default value. For the valid values, see Query Alarm Recovery Status.
|
recStatusDesc | Alarm recovery description.
String type.
|
recUserName | User who recovered the alarm.
String type.
|
ackTime | Time when the alarm was acknowledged.
Long integer type.
|
ackTimeDesc | Detailed information about the time when the alarm was acknowledged.
String type, in the format of yyyy-MM-dd HH:mm:ss.
|
ackStatus | Alarm acknowledgement status.
Integer type. Optional. No default value. For the valid values, see Query Alarm Acknowledgement Status.
|
ackStatusDesc | Alarm acknowledgement status description.
String type.
|
ackUserName | User who acknowledged the alarm.
String type.
|
alarmDesc | Alarm description.
String type.
|
paras | Alarm parameters.
String type.
|
parentId | Parent ID of the alarm relation analysis.
Long integer type.
|
somState | Alarm distribution status.
Integer type. No default value. 0 for not undistributed. 1 for distributed.
|
isReceoverFault | Whether the alarm is recovered.
Integer(int)type. 0 for fault alarm, 1 for recovery alarm.
|
recoverFaultIdList | ID list of restored alarm (ID list of restored alarm when the alarm is a recovery alarm).
Set
|
Reregister the send-alarm-to-server event and send all alarms to the server.
GET http://host:8080/imcrs/events?uuid=025c4630-7e38-4a70-bb1c-b47c8d446764&type=11 accept: application/xml ...
HTTP/1.1 202 Accepted Content-Type: application/xml ...
Specifies whether the recoverable alarm OID list is returned together with the alarm instance.
GET http://host:8080/imcrs/events?uuid=025c4630-7e38-4a70-bb1c-b47c8d446764&type=11&sendRecovered=true accept: application/xml ...
The following result is pushed: (A)When sendRecovered is set to true <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <alarm> <id>1623</id> <OID>1.3.6.1.6.3.1.1.5.2.0</OID> <originalType>1</originalType> <originalTypeDesc>Trap</originalTypeDesc> <deviceId>23</deviceId> <deviceIp>10.153.88.121</deviceIp> <deviceName>121</deviceName> <alarmLevel>2</alarmLevel> <alarmLevelDesc>Major</alarmLevelDesc> <alarmCategory>1</alarmCategory> <alarmCategoryDesc>Other Alarms</alarmCategoryDesc> <faultTime>1396943880</faultTime> <faultTimeDesc>2014-04-08 15:58:00</faultTimeDesc> <recTime>0</recTime> <recTimeDesc></recTimeDesc> <recStatus>0</recStatus> <recStatusDesc>Unrecovered</recStatusDesc> <recUserName></recUserName> <ackTime>0</ackTime> <ackStatus>0</ackStatus> <alarmDesc>The interface interface is DOWN.</alarmDesc> <paras>*Interface Index=22;Interface Description=interface;Interface Admin Status=2;Interface Operate Status=1</paras> <parentId>0</parentId> <somState>0</somState> <nAction>Push</nAction> </alarm> <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <alarm> <id>1624</id> <OID>1.3.6.1.6.3.1.1.5.3.0</OID> <originalType>1</originalType> <originalTypeDesc>Trap</originalTypeDesc> <deviceId>23</deviceId> <deviceIp>10.153.88.121</deviceIp> <deviceName>121</deviceName> <alarmLevel>5</alarmLevel> <alarmLevelDesc>Informational</alarmLevelDesc> <alarmCategory>1</alarmCategory> <alarmCategoryDesc>Other Alarms</alarmCategoryDesc> <faultTime>1396943915</faultTime> <faultTimeDesc>2014-04-08 15:58:35</faultTimeDesc> <recTime>1396943915</recTime> <recTimeDesc>2014-04-08 15:58:35</recTimeDesc> <recStatus>1</recStatus> <recStatusDesc>Recovered</recStatusDesc> <recUserName>$SYSTEM</recUserName> <ackTime>0</ackTime> <ackStatus>0</ackStatus> <alarmDesc>The interface interface is UP.</alarmDesc> <paras>*Interface Index=22;Interface Description=interface;Interface Admin Status=2;Interface Operate Status=1</paras> <parentId>0</parentId> <somState>0</somState> <nAction>Push</nAction> <lstRecovered> <faultOid>1.3.6.1.4.1.11.2.14.11.15.4.1.1.2.6.8</faultOid> <faultOid>1.3.6.1.4.1.2011.10.4.1.1.2.6.8</faultOid> <faultOid>1.3.6.1.4.1.25506.4.1.1.2.6.8</faultOid> <faultOid>1.3.6.1.4.1.25506.4.2.10.2.6.10</faultOid> <faultOid>1.3.6.1.6.3.1.1.5.2.0</faultOid> </lstRecovered> </alarm> (B)When sendRecovered is set to false <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <alarm> <id>1620</id> <OID></OID> <originalType>0</originalType> <originalTypeDesc>All types</originalTypeDesc> <deviceId>0</deviceId> <deviceIp></deviceIp> <deviceName></deviceName> <alarmLevel>0</alarmLevel> <alarmLevelDesc></alarmLevelDesc> <alarmCategory>0</alarmCategory> <faultTime>0</faultTime> <faultTimeDesc>1970-01-01 08:00:00</faultTimeDesc> <recTime>0</recTime> <recTimeDesc></recTimeDesc> <recStatus>0</recStatus> <recStatusDesc>Unrecovered</recStatusDesc> <recUserName></recUserName> <ackTime>0</ackTime> <ackStatus>0</ackStatus> <alarmDesc></alarmDesc> <paras></paras> <parentId>0</parentId> <somState>0</somState> <nAction>Recover</nAction> </alarm>