Skip to content

Websocker server

Panos Karkazis edited this page Jul 24, 2018 · 3 revisions

The implementation of WebSockets allows the user to collect streaming data from VNFs that have been deployed in the Service Platform. This is highly beneficial to the developers, as they would be able to monitor the performance of a new service in a real environment. Prior to the establishment of a new WebSocket, the user must be aware of the metrics collected per VNF, the VNFs comprising his deployed Network Services and other related information and this information is already provided by the existing Monitoring Manager API framework. After selecting the VNF and the respective metrics to be sent, the user requests the creation of a new WebSocket from the Monitoring Manager. After checking the validity of the request, the Monitoring Manager communicates with the WebSocket server that creates and sends new URL for the user in order to connect on in and consume real-time monitoring data.

WebSocket creation

Request:

curl -s -X POST http://<monitoring-manager-ip>:8000/api/v1/ws/new \
-d @{"metric":"cpu_util","filters":["resource_id='3b74a6cb-b002-497d-a843-179a3924bbd8'"]} \
-H "Accept: application/json" -H "Content-Type: application/json"

Responce:

{"status": "SUCCESS",
"metric": "cpu_util",
"ws_url": "ws://<ws_server>:8002/ws/74e1c6bcb16f4d6e805d661f2a49d874"
}
Clone this wiki locally