From cc9dc1650f2e66612957303ab5d267460de97cdb Mon Sep 17 00:00:00 2001 From: murmel <63870352+murme1@users.noreply.github.com> Date: Wed, 17 Feb 2021 22:22:09 +0100 Subject: [PATCH 1/2] add stress_level metric --- main.go | 4 ++++ main_test.go | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/main.go b/main.go index 2896ff1..49ba973 100644 --- a/main.go +++ b/main.go @@ -31,6 +31,7 @@ type videoBridgeStats struct { P2PConferences int `json:"p2p_conferences"` Participants int `json:"participants"` Videostreams int `json:"videostreams"` + StressLevel float64 `json:"stress_level"` TotalLossControlledParticipantSeconds int `json:"total_loss_controlled_participant_seconds"` TotalLossLimitedParticipantSeconds int `json:"total_loss_limited_participant_seconds"` TotalLossDegradedParticipantSeconds int `json:"total_loss_degraded_participant_seconds"` @@ -94,6 +95,9 @@ jitsi_participants {{.Participants}} # HELP jitsi_videostreams An estimation of the number of current video streams forwarded by the bridge. # TYPE jitsi_videostreams gauge jitsi_videostreams {{.Videostreams}} +# HELP jitsi_stress_level Stress Level reported to Jicofo by the videobridge. +# TYPE jitsi_stress_level gauge +jitsi_stress_level {{.StressLevel}} # HELP jitsi_total_loss_controlled_participant_seconds The total number of participant-seconds that are loss-controlled. # TYPE jitsi_total_loss_controlled_participant_seconds counter jitsi_total_loss_controlled_participant_seconds {{.TotalLossControlledParticipantSeconds}} diff --git a/main_test.go b/main_test.go index 3a7aafb..8513f59 100644 --- a/main_test.go +++ b/main_test.go @@ -71,6 +71,9 @@ jitsi_participants 4 # HELP jitsi_videostreams An estimation of the number of current video streams forwarded by the bridge. # TYPE jitsi_videostreams gauge jitsi_videostreams 0 +# HELP jitsi_stress_level Stress Level reported to Jicofo by the videobridge. +# TYPE jitsi_stress_level gauge +jitsi_stress_level 0 # HELP jitsi_total_loss_controlled_participant_seconds The total number of participant-seconds that are loss-controlled. # TYPE jitsi_total_loss_controlled_participant_seconds counter jitsi_total_loss_controlled_participant_seconds 0 @@ -129,6 +132,7 @@ jitsi_total_colibri_web_socket_messages_sent 0 "relay_id": "10.0.0.5:4096", "rtp_loss": 0, "rtt_aggregate": 0, + "stress_level": 0.6, "threads": 59, "total_bytes_received": 257628359, "total_bytes_received_octo": 0, @@ -206,6 +210,9 @@ jitsi_participants 0 # HELP jitsi_videostreams An estimation of the number of current video streams forwarded by the bridge. # TYPE jitsi_videostreams gauge jitsi_videostreams 0 +# HELP jitsi_stress_level Stress Level reported to Jicofo by the videobridge. +# TYPE jitsi_stress_level gauge +jitsi_stress_level 0.6 # HELP jitsi_total_loss_controlled_participant_seconds The total number of participant-seconds that are loss-controlled. # TYPE jitsi_total_loss_controlled_participant_seconds counter jitsi_total_loss_controlled_participant_seconds 847 From 54fbedad4e4c605f72ad88fecf4c6d9df88eed1d Mon Sep 17 00:00:00 2001 From: murmel <63870352+murme1@users.noreply.github.com> Date: Wed, 17 Feb 2021 23:18:33 +0100 Subject: [PATCH 2/2] add stress level to system dashboard --- dashboards/jitsi-meet-system.json | 109 +++++++++++++++++++++++++++++- 1 file changed, 107 insertions(+), 2 deletions(-) diff --git a/dashboards/jitsi-meet-system.json b/dashboards/jitsi-meet-system.json index 4736e7f..cc90d99 100644 --- a/dashboards/jitsi-meet-system.json +++ b/dashboards/jitsi-meet-system.json @@ -59,7 +59,7 @@ "gnetId": 12282, "graphTooltip": 1, "id": null, - "iteration": 1612608833620, + "iteration": 1613598823724, "links": [], "panels": [ { @@ -2348,6 +2348,111 @@ "align": false, "alignLevel": null } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "description": "Stress Level reported to Jicofo by the videobridge.", + "fieldConfig": { + "defaults": { + "color": {}, + "custom": {}, + "thresholds": { + "mode": "absolute", + "steps": [] + }, + "unit": "short" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 67 + }, + "hiddenSeries": false, + "id": 51, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.4.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "jitsi_stress_level{instance=~\"$instance.*\"}", + "instant": false, + "interval": "", + "legendFormat": "stress level", + "queryType": "randomWalk", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Videobridge Stress Level", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } } ], "title": "Additional Metrics", @@ -2405,5 +2510,5 @@ "timezone": "", "title": "Jitsi Meet & System", "uid": "IJXK9Q6Wz", - "version": 4 + "version": 5 }