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] 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