It is possible to obtain metric value changes in realtime, when metric value has exceeded or dropped below specified threshold. This is done using alarms which can be obtained via STOMP over Websocket by /alarm event subscription
A new alarm can be created with REST API query /api/alarm/create
https://hostname:8090/api/alarm/create { "type":"0", "name":"testalarm", "value":"500000", "metric":"4", "node":"15", "time":"5000" } |
Where
In the example above, the alarm was created that triggers if the video bitrate of the stream drops below 500 kbps for more than 5 seconds.
If node Id is not set, the alarm applies to all the nodes on backend server.
Alarm parameters can be changed with REST API query /api/alarm/update
https://hostname:8090/api/alarm/update { "id": "17", "type":"0", "name":"testalarm", "value":"500000", "metric":"4", "node":"15", "time":"5000" } |
Where:
Alarm can be deleted with REST API query /api/alarm/delete
https://hostname:8090/api/alarm/delete { "id": "17" } |
Where:
STOMP messages about the alarm triggering stop when alarm is deleted.
Alarm information can be obtained with REST API query /api/alarm/list
https://hostname:8090/api/alarm/list { "id": "17" } |
Where:
If alarm Id is set, the response will contain this alarm information only. If alarm Ids is not set, the response will contain all the alarms list on backend server.
The response contains the same fields for every alarm as /api/alarm/update query.