Detailed session monitoring


OpenVidu Pro brings the power of Elastic Stack. Events and monitoring stats are sent to Elasticsearch and can be visualized through Kibana.

OpenVidu Sessions dashboard 🔗

This dashboard presents a summary of your video sessions and the server resources usage. That includes:

  • CPU and memory usage of the server
  • The number of session per day
  • The location of your users
  • The number of publishers and subscribers you have at any time
  • The total streamed minutes over time
  • Some low-level interesting stats related to the media connections

The last point includes things like the average time to select a pair candidate during the negotiation process, the average milliseconds your clients take to complete the ICE gathering process with OpenVidu Server, the ratio of successful and failed connections, and some WebRTC stats for your published and subscribed streams (Jitter, packet loss, Round-Trip-Time, target bitrate...)

All in all, this information will help you understand better the behavior and performance of your sessions.



OpenVidu Recordings dashboard 🔗

This dashboard presents at a glance the status of your recordings. It includes information such as:

  • The total number of recordings per day
  • Average duration and size of your recorded files
  • The distributions of you recordings by duration and size
  • The ratio of recordings according to their output mode (COMPOSED or INDIVIDUAL recordings) and their recorded tracks (audio/video recordings)



OpenVidu Clustering dashboard 🔗

This dashboard is aimed to show all of the information related to the cluster status and behavior over time. Right now it allows you to inspect the CPU load of each one of your Media Nodes over time.


Reviewing logs 🔗

Reviewing logs 🔗

Many of OpenVidu processes send their logs to Elasticsearch, so you can review their logs directly from Kibana. All the indices which have logs from services are:

  • filebeat-kurento*: Kurento Media Server logs.
  • filebeat-coturn*: Coturn(TURN/STUN server) logs.
  • filebeat-redis*: Redis logs (This service is used to store TURN credentials).
  • openvidu-logs*: OpenVidu Server logs.

To search for logs you need to:

First of all, go to the Logs section of Kibana.

Go to settings, and configure from which index you want to search logs. In this particular example, we're searching Kurento Media Server logs by setting Log indices to: filebeat-kurento*.

Add to Log Columns the attributes of the index you want to see in your logs stream. In this example we're adding the attribute log_level to see the type of log (INFO, WARN, ERROR, etc...). The attributes may change depending of the index you're reading. For example, in OpenVidu Server Pro, the log level is in the attribute severity for openvidu-logs* indices.

Enter what you want to search. You can search for literals, attribute values, etc...

Searching Examples 🔗

  • Search for a literal in Kurento Media Server logs and see the context:
  • Search by log level in OpenVidu Server Pro logs:
  • Search for logs of one specific Media Node IP:



Accessing Kibana 🔗

OpenVidu Pro serves Kibana through path /kibana. So, if you have deployed OpenVidu Pro with domain my.domain.com, you will be able to access OpenVidu Inspector through https://my.domain.com/inspector and Kibana through https://my.domain.com/kibana

This path is secured with Basic Auth, so when connecting to it for the first time you will have to enter the user and password specified when deploying OpenVidu Pro.



Creating your own visualizations and dashboards 🔗

The dashboards presented above, by default included in OpenVidu Pro, are just an example of what can be done thanks to Kibana. You can create your own visualizations, and set up your very own dashboards with them. To do so, you have available multiple events that OpenVidu Pro periodically stores in Elasticsearch, and you can then use them in Kibana to compose different types of graphs and other useful visual representations.

Each one of these events stored by OpenVidu Pro in Elasticsearch has an elastic_type field to identify the specific type of event. This field may be:

  • cdr: event of CDR/Webhook. Can take multiple forms according to the type of event (see OpenVidu CDR)
  • kms: Kurento Media Server event. These events are always associated to one WebRTC endpoint (a publisher or a subscriber). Can take multiple forms according to the type of event (see Kurento docs)
  • monitoringStats: event of CPU, memory and network statistics usage of OpenVidu Sever Pro Node
  • webrtcStats: event of WebRTC statistics for each media endpoint established in Media Nodes
  • sessionSummary: summary of a session, stored once it is closed
  • recordingSummary: summary of a recording, stored once its session is closed
  • userSummary: summary of a user, stored once its session is closed
  • connectionSummary: summary of a connection, stored once its session is closed
  • publisherSummary: summary of a publisher, stored once its session is closed
  • subscriberSummary: summary of a subscriber, stored once its session is closed
{
  "sessionId": "TestSession",
  "timestamp": 1582277160836,
  "streamId": "str_CAM_AOIa_con_XZvrQOF5Du",
  "participantId": "con_XZvrQOF5Du",
  "connection": "OUTBOUND",
  "videoSource": "CAMERA",
  "videoFramerate": 30,
  "videoDimensions": "{\"width\":640,\"height\":480}",
  "audioEnabled": true,
  "videoEnabled": true,
  "event": "webrtcConnectionCreated",
  "elastic_type": "cdr"
}


NOTE 1: sessionSummary contains all the information available in the rest of summary documents, including an array of recordingSummary and an array of userSummary. In turn userSummary contains an array of connectionSummary, that finally contains an array of publisherSummary and other of subscriberSummary. To sum up, this is just a denormalization of the sessionSummary document, so Elasticsearch requests and Kibana visualizations are more flexible and easier to accomplish


NOTE 2: recordingSummary events may not contain the final information of the actual recordings (specifically properties size and duration). This is so because recordingSummary event is generated just after its session is closed, but since release 2.11.0 recordings may need a post-processing phase before being available for download and having these properties properly defined. To overcome this limitation, you can simply use the cdr event of type recordingStatusChanged and status ready corresponding to this recording (see event in CDR docs). There you will have all properties of the recording well defined


You can create powerful visualizations and dashboards by using these documents. Let's see a quick example. Imagine that you are interested in knowing how many users are connected to your OpenVidu sessions over time.

First thing is navigating to Visualize section in Kibana and clicking on the button to add a new visualization

Then we have to choose a visualization type. In this case a vertical bar graph might be a pretty good choice

We select openvidu index, because that's the index of every OpenVidu Pro event stored in Elasticsearch

The visualization page will be shown. Now we have to filter the desired events. In this case, we just want the userSummary event, as it gathers all the information about the final users connecting to our sessions. So, we make sure that field elastic_type.keyword is userSummary

Finally we have to configure the data passed to our graph. The metric we want (Y-axis) is simply Count, because there is one "userSummary" event for each final user connecting to a session. And as Bucket (X-axis) we configure a Date Histogram by using timestamp field of the event

To store the new visualization just click on Save button in the upper menu and give it a meaningful name

The example above is a very simple visualization, but you can apply any metric to any property (or set of properties) of any event (or set of events). You can explore pre-existing visualizations included by default in OpenVidu Pro, and for further info visit Kibana docs