Alarms REST interface
Get all alarms
Retrieve the 20 most recent alarms.
Definition
| GET /api/alarm?source=SOURCE&limit=LIMIT&tags=LISTOFTAGS
|
Example request
| curl -X GET "http://127.0.0.1:8080/api/alarm?tags=dev,op"
|
Example response
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 | {
"alarms": [
{
"alarmId": "system_memory_high_watermark",
"alarmType": null,
"src": {
"nodeId": "3fa56f92-3195-401b-93a8-7bc43e54d66f",
"nodeName": "wo_test_1@127.0.0.1",
"custom": "node_level",
"elarmServer": "wombat"
},
"eventTime": 1406873289000,
"eventId": "{1406,873289,745642}",
"severity": "indeterminate",
"probableCause": "",
"proposedRepairAction": "",
"description": "",
"additionalInformation": "<<\"High total memory usage of all OS processes\">>",
"correlatedEvents": "[]",
"comments": [],
"trend": null,
"threshold": null,
"state": "new",
"ackInfo": null,
"rawSrc": "{wo_alarm_source,\"3fa56f92-3195-401b-93a8-7bc43e54d66f\",'wo_test_1@127.0.0.1',\n node_level,wombat}"
},
{...},
{...}
]
}
|
Arguments
Argument |
Description |
source |
Optional. The src.custom field used for filtering alarms. |
limit |
Optional. Specifies the maximum number of alarms in the response. By default, it is 20. |
tags |
Optional. A comma separated list of tags that overrides the tags set for the user. |
Returns
An array of alarm objects that are tagged with any of the active tags. The
value of eventId can be used to retrieve details of specific alarms.
Get all alarms from a specified ID
Retrieve the 20 most recent alarms for a specified event.
Definition
| GET /api/alarm/previous/all?eid=EVENT_ID&source=SOURCE&limit=LIMIT&tags=LISTOFTAGS
|
Example request
| curl -X GET "http://127.0.0.1:8080/api/alarm/previous/all?eid=%7B1406,873289,745642%7D"
|
Example response
See "Get all alarms", above.
Arguments
Argument |
Description |
eid |
Required. The event's identifier (including curly brackets). |
source |
Optional. The src.custom field used for filtering alarms. |
limit |
Optional. Specifies the maximum number of alarms in the response. By default, it is 20. |
tags |
Optional. A comma separated list of tags that overrides the tags set for the user. |
Returns
See "Get all alarms", above.
Get alarms for a node
Retrieve the 20 most recent alarms for a specified node.
Definition
| GET /api/alarm/node/NODE_ID?source=SOURCE&limit=LIMIT&tags=LISTOFTAGS
|
Example request
| curl -X GET "http://127.0.0.1:8080/api/alarm/node/3fa56f92-3195-401b-93a8-7bc43e54d66f"
|
Example response
See "Get all alarms", above.
Arguments
Argument |
Description |
node id |
Required. The node's identifier |
source |
Optional. The src.custom field used for filtering alarms. |
limit |
Optional. Specifies the maximum number of alarms in the response. By default, it is 20. |
tags |
Optional. A comma separated list of tags that overrides the tags set for the user. |
Returns
See "Get all alarms", above.
Get alarms for a node from a specified ID
Retrieve the 20 most recent alarms for a specified event on a node.
Definition
| GET /api/alarm/previous/node/NODE_ID?eid=EVENT_ID&source=SOURCE&limit=LIMIT&tags=LISTOFTAGS
|
Example request
| curl -X GET "http://127.0.0.1:8080/api/alarm/previous/node/5b16ec55-56a3-4430-b174-c996897ccd14?eid=%7B1406,873289,745642%7D"
|
Example response
See "Get all alarms", above.
Arguments
Argument |
Description |
node id |
Required. The node's identifier |
eid |
Required. The event's identifier (including curly brackets). |
source |
Optional. The src.custom field used for filtering alarms. |
limit |
Optional. Specifies the maximum number of alarms in the response. By default, it is 20. |
tags |
Optional. A comma separated list of tags that overrides the tags set for the user. |
Returns
See "Get all alarms", above.
Get alarms for a node family
Retrieve the 20 most recent alarms for all the nodes in a specified node family.
Definition
| GET /api/alarm/node-family/NODE_FAMILY_ID?source=SOURCE&limit=LIMIT&tags=LISTOFTAGS
|
Example request
| curl -X GET "http://127.0.0.1:8080/api/alarm/node-family/93be4f01-dae6-49b0-9608-4552f841a720"
|
Example response
See "Get all alarms", above.
Arguments
Argument |
Description |
node family id |
Required. The node family's identifier |
source |
Optional. The src.custom field used for filtering alarms. |
limit |
Optional. Specifies the maximum number of alarms in the response. By default, it is 20. |
tags |
Optional. A comma separated list of tags that overrides the tags set for the user. |
Returns
See "Get all alarms", above.
Get alarms for a node family from a specified ID
Retrieve the 20 most recent alarms for a specified event on the nodes in a
node family.
Definition
| GET /api/alarm/previous/node-family/NODE_FAMILY_ID?eid=EVENT_ID&source=SOURCE&limit=LIMIT&tags=LISTOFTAGS
|
Example request
| curl -X GET "http://127.0.0.1:8080/api/alarm/previous/node-family/93be4f01-dae6-49b0-9608-4552f841a720?eid=%7B1406,873289,745642%7D"
|
Example response
See "Get all alarms", above.
Arguments
Argument |
Description |
node family id |
Required. The node family's identifier |
eid |
Required. The event's identifier (including curly brackets). |
source |
Optional. The src.custom field used for filtering alarms. |
limit |
Optional. Specifies the maximum number of alarms in the response. By default, it is 20. |
tags |
Optional. A comma separated list of tags that overrides the tags set for the user. |
Returns
See "Get all alarms", above.
Get all alarm sources
Retrieve all alarm sources that can be used for filtering alarms.
Definition
Example request
| curl -X GET "http://127.0.0.1:8080/api/alarm/source"
|
Example response
| {
"sources" : [
"node_level"
]
}
|
Arguments
None.
Returns
An array of alarm sources. These are the same values that may turn up
in the src.custom
field of alarm objects.
Limitations
Except for the default "node_level"
source in the current version of
WombatOAM alarm sources are not returned if they don't have any active
alarms.
Get alarm sources for a node
Retrieve alarm sources for a node that can be used for filtering
alarms.
Definition
| GET /api/alarm/source/node/NODE_ID
|
Example request
| curl -X GET "http://127.0.0.1:8080/api/alarm/source/node/5b16ec55-56a3-4430-b174-c996897ccd14"
|
Example response
See "Get all alarm sources" above.
Arguments
Argument |
Description |
node id |
Required. The node's identifier |
Returns
See "Get all alarm sources" above.
Limitations
See "Get all alarm sources" above.
Get alarm sources for a node family
Retrieve alarm sources for a node family that can be used for
filtering alarms.
Definition
| GET /api/alarm/source/node-family/NODE_FAMILY_ID
|
Example request
| curl -X GET "http://127.0.0.1:8080/api/alarm/source/node-family/93be4f01-dae6-49b0-9608-4552f841a720"
|
Example response
See "Get all alarm sources" above.
Arguments
Argument |
Description |
node family id |
Required. The node family's identifier |
Returns
See "Get all alarm sources" above.
Limitations
See "Get all alarm sources" above.
Send acknowledge for an alarm
Provide acknowledgement of an alarm.
Definition
| POST /api/alarm/acknowledge
|
Data
| {
"userId": "USER_ID",
"alarmId": "ALARM_ID",
"alarmSrc": "RAW_SRC"
}
|
Example request
| curl -X POST "http://127.0.0.1:8080/api/alarm/acknowledge" \
-H "Content-Type: application/json" \
-d "{\"userId\":\"administrator\", \"alarmId\":\"system_memory_high_watermark\", \"alarmSrc\":\"{wo_alarm_source,\\\"5b16ec55-56a3-4430-b174-c996897ccd14\\\",'wo_test_2@127.0.0.1',\\n node_level,wombat}\"}"
|
Example response
Arguments
Argument |
Description |
userId |
Required. The identifier of the user sending the acknowledgement |
alarmId |
Required. The value of alarmId in the alarm object. |
alarmSrc |
Required. The value of rawSrc in the alarm object. |
Returns
An empty object. If successful, the HTTP response is 200 OK. In the alarm
object, state changes to "acknowledged", and ackInfo is updated
with user and time.
Send unacknowledge for an alarm
Remove the acknowledgement for an alarm, so that it is shown as new.
Definition
| POST /api/alarm/unacknowledge
|
Data
| {
"userId": "USER_ID",
"alarmId": "ALARM_ID",
"alarmSrc": "RAW_SRC"
}
|
Example request
| curl -X POST "http://127.0.0.1:8080/api/alarm/unacknowledge" \
-H "Content-Type: application/json" \
-d "{\"userId\":\"administrator1\",\"alarmId\":\"system_memory_high_watermark\",\"alarmSrc\":\"{wo_alarm_source,\\\"5b16ec55-56a3-4430-b174-c996897ccd14\\\",'wo_test_2@127.0.0.1',\\n node_level,wombat
|
Example response
Arguments
Argument |
Description |
userId |
Required. The identifier of the user sending the acknowledgement |
alarmId |
Required. The value of alarmId in the alarm object. |
alarmSrc |
Required. The value of rawSrc in the alarm object. |
Returns
An empty object. If successful, the HTTP response is 200 OK. In the alarm
object, state changes to "new".
Send clear for an alarm
Clear an alarm, removing it from the list of alarms.
Definition
Data
| {
"userId": "USER_ID",
"alarmId": "ALARM_ID",
"alarmSrc": "RAW_SRC"
}
|
Example request
| curl -X POST "http://127.0.0.1:8080/api/alarm/clear" \
-H "Content-Type: application/json" \
-d "{\"userId\":\"administrator1\",\"alarmId\":\"system_memory_high_watermark\",\"alarmSrc\":\"{wo_alarm_source,\\\"5b16ec55-56a3-4430-b174-c996897ccd14\\\",'wo_test_2@127.0.0.1',\\n node_level,wombat}\"}"
|
Example response
Arguments
Argument |
Description |
userId |
Required. The identifier of the user sending the acknowledgement |
alarmId |
Required. The value of alarmId in the alarm object. |
alarmSrc |
Required. The value of rawSrc in the alarm object. |
Returns
An empty object. If successful, the HTTP response is 200 OK.
Add a comment to the details of a specified alarm.
Definition
Data
| {
"userId": "USER_ID",
"alarmId": "ALARM_ID",
"alarmSrc": "RAW_SRC",
"comment": "MESSAGE"
}
|
Example request
| curl -X POST "http://127.0.0.1:8080/api/alarm/comment" \
-H "Content-Type: application/json" \
-d "{\"userId\": \"administrator\", \"alarmId\": \"system_memory_high_watermark\", \"alarmSrc\": \"{wo_alarm_source,\\\"298548c9-f5f8-464d-9a2c-07d494c3ecd4\\\",'wombat@127.0.0.1',\\n node_level,wombat}\", \"comment\": \"Support has been notified.\"}"
|
Example response
Arguments
Argument |
Description |
userId |
Required. The identifier of the user sending the acknowledgement |
alarmId |
Required. The value of alarmId in the alarm object. |
alarmSrc |
Required. The value of rawSrc in the alarm object. |
comment |
Required. The text that will be included as a comment. |
Returns
An empty object. In the alarm object, an item is added to comments, with the properties user, time, and text.