parent
e528c50d5b
commit
9822717c69
2 changed files with 132 additions and 0 deletions
48
main.go
48
main.go
|
@ -45,6 +45,18 @@ type videoBridgeStats struct {
|
|||
TotalColibriWebSocketMessagesReceived int `json:"total_colibri_web_socket_messages_received"`
|
||||
TotalColibriWebSocketMessagesSent int `json:"total_colibri_web_socket_messages_sent"`
|
||||
TotalParticipants int `json:"total_participants"`
|
||||
OctoVersion int `json:"octo_version"`
|
||||
OctoConferences int `json:"octo_conferences"`
|
||||
OctoEndpoints int `json:"octo_endpoints"`
|
||||
OctoReceiveBitrate int `json:"octo_receive_bitrate"`
|
||||
OctoReceivePacketRate int `json:"octo_receive_packet_rate"`
|
||||
OctoSendBitrate int `json:"octo_send_bitrate"`
|
||||
OctoSendPacketRate int `json:"octo_send_packet_rate"`
|
||||
TotalBytesReceivedOcto int `json:"total_bytes_received_octo"`
|
||||
TotalBytesSentOcto int `json:"total_bytes_sent_octo"`
|
||||
TotalPacketsDroppedOcto int `json:"total_packets_dropped_octo"`
|
||||
TotalPacketsReceivedOcto int `json:"total_packets_received_octo"`
|
||||
TotalPacketsSentOcto int `json:"total_packets_sent_octo"`
|
||||
}
|
||||
|
||||
var tpl = template.Must(template.New("stats").Parse(`# HELP jitsi_threads The number of Java threads that the video bridge is using.
|
||||
|
@ -134,6 +146,42 @@ jitsi_total_colibri_web_socket_messages_received {{.TotalColibriWebSocketMessage
|
|||
# HELP jitsi_total_colibri_web_socket_messages_sent The total number messages sent through COLIBRI web sockets.
|
||||
# TYPE jitsi_total_colibri_web_socket_messages_sent counter
|
||||
jitsi_total_colibri_web_socket_messages_sent {{.TotalColibriWebSocketMessagesSent}}
|
||||
# HELP jitsi_octo_version The current running OCTO version
|
||||
# TYPE jitsi_octo_version gauge
|
||||
jitsi_octo_version {{.OctoVersion}}
|
||||
# HELP jitsi_octo_conferences The current number of OCTO conferences.
|
||||
# TYPE jitsi_octo_conferences gauge
|
||||
jitsi_octo_conferences {{.OctoConferences}}
|
||||
# HELP jitsi_octo_endpoints The current number of OCTO endpoints.
|
||||
# TYPE jitsi_octo_endpoints gauge
|
||||
jitsi_octo_endpoints {{.OctoEndpoints}}
|
||||
# HELP jitsi_octo_receive_bitrate The total receiving bitrate for the OCTO video bridge in kilobits per second.
|
||||
# TYPE jitsi_octo_receive_bitrate gauge
|
||||
jitsi_octo_receive_bitrate {{.OctoReceiveBitrate}}
|
||||
# HELP jitsi_octo_send_bitrate The total outgoing bitrate for the OCTO video bridge in kilobits per second.
|
||||
# TYPE jitsi_octo_send_bitrate gauge
|
||||
jitsi_octo_send_bitrate {{.OctoSendBitrate}}
|
||||
# HELP jitsi_octo_receive_packet_rate The total incoming packet rate for the OCTO video bridge in packets per second.
|
||||
# TYPE jitsi_octo_receive_packet_rate gauge
|
||||
jitsi_octo_receive_packet_rate {{.OctoReceivePacketRate}}
|
||||
# HELP jitsi_octo_send_packet_rate The total outgoing packet rate for the OCTO video bridge in packets per second.
|
||||
# TYPE jitsi_octo_send_packet_rate gauge
|
||||
jitsi_octo_send_packet_rate {{.OctoSendPacketRate}}
|
||||
# HELP jitsi_total_bytes_received_octo The total incoming bit rate for the OCTO video bridge in bytes per second.
|
||||
# TYPE jitsi_total_bytes_received_octo gauge
|
||||
jitsi_total_bytes_received_octo {{.TotalBytesReceivedOcto}}
|
||||
# HELP jitsi_total_bytes_sent_octo The total outgoing bit rate for the OCTO video bridge in bytes per second.
|
||||
# TYPE jitsi_total_bytes_sent_octo gauge
|
||||
jitsi_total_bytes_sent_octo {{.TotalBytesSentOcto}}
|
||||
# HELP jitsi_total_packets_dropped_octo The total of dropped packets handled by the OCTO video bridge.
|
||||
# TYPE jitsi_total_packets_dropped_octo gauge
|
||||
jitsi_total_packets_dropped_octo {{.TotalPacketsDroppedOcto}}
|
||||
# HELP jitsi_total_packets_received_octo The total of incoming dropped packets handled by the OCTO video bridge.
|
||||
# TYPE jitsi_total_packets_received_octo gauge
|
||||
jitsi_total_packets_received_octo {{.TotalPacketsReceivedOcto}}
|
||||
# HELP jitsi_total_packets_sent_octo The total of sent dropped packets handled by the OCTO video bridge.
|
||||
# TYPE jitsi_total_packets_sent_octo gauge
|
||||
jitsi_total_packets_sent_octo {{.TotalPacketsSentOcto}}
|
||||
`))
|
||||
|
||||
type handler struct {
|
||||
|
|
84
main_test.go
84
main_test.go
|
@ -110,6 +110,42 @@ jitsi_total_colibri_web_socket_messages_received 0
|
|||
# HELP jitsi_total_colibri_web_socket_messages_sent The total number messages sent through COLIBRI web sockets.
|
||||
# TYPE jitsi_total_colibri_web_socket_messages_sent counter
|
||||
jitsi_total_colibri_web_socket_messages_sent 0
|
||||
# HELP jitsi_octo_version The current running OCTO version
|
||||
# TYPE jitsi_octo_version gauge
|
||||
jitsi_octo_version 0
|
||||
# HELP jitsi_octo_conferences The current number of OCTO conferences.
|
||||
# TYPE jitsi_octo_conferences gauge
|
||||
jitsi_octo_conferences 0
|
||||
# HELP jitsi_octo_endpoints The current number of OCTO endpoints.
|
||||
# TYPE jitsi_octo_endpoints gauge
|
||||
jitsi_octo_endpoints 0
|
||||
# HELP jitsi_octo_receive_bitrate The total receiving bitrate for the OCTO video bridge in kilobits per second.
|
||||
# TYPE jitsi_octo_receive_bitrate gauge
|
||||
jitsi_octo_receive_bitrate 0
|
||||
# HELP jitsi_octo_send_bitrate The total outgoing bitrate for the OCTO video bridge in kilobits per second.
|
||||
# TYPE jitsi_octo_send_bitrate gauge
|
||||
jitsi_octo_send_bitrate 0
|
||||
# HELP jitsi_octo_receive_packet_rate The total incoming packet rate for the OCTO video bridge in packets per second.
|
||||
# TYPE jitsi_octo_receive_packet_rate gauge
|
||||
jitsi_octo_receive_packet_rate 0
|
||||
# HELP jitsi_octo_send_packet_rate The total outgoing packet rate for the OCTO video bridge in packets per second.
|
||||
# TYPE jitsi_octo_send_packet_rate gauge
|
||||
jitsi_octo_send_packet_rate 0
|
||||
# HELP jitsi_total_bytes_received_octo The total incoming bit rate for the OCTO video bridge in bytes per second.
|
||||
# TYPE jitsi_total_bytes_received_octo gauge
|
||||
jitsi_total_bytes_received_octo 0
|
||||
# HELP jitsi_total_bytes_sent_octo The total outgoing bit rate for the OCTO video bridge in bytes per second.
|
||||
# TYPE jitsi_total_bytes_sent_octo gauge
|
||||
jitsi_total_bytes_sent_octo 0
|
||||
# HELP jitsi_total_packets_dropped_octo The total of dropped packets handled by the OCTO video bridge.
|
||||
# TYPE jitsi_total_packets_dropped_octo gauge
|
||||
jitsi_total_packets_dropped_octo 0
|
||||
# HELP jitsi_total_packets_received_octo The total of incoming dropped packets handled by the OCTO video bridge.
|
||||
# TYPE jitsi_total_packets_received_octo gauge
|
||||
jitsi_total_packets_received_octo 0
|
||||
# HELP jitsi_total_packets_sent_octo The total of sent dropped packets handled by the OCTO video bridge.
|
||||
# TYPE jitsi_total_packets_sent_octo gauge
|
||||
jitsi_total_packets_sent_octo 0
|
||||
`,
|
||||
},
|
||||
{
|
||||
|
@ -125,6 +161,13 @@ jitsi_total_colibri_web_socket_messages_sent 0
|
|||
"largest_conference": 0,
|
||||
"loss_rate_download": 0.5,
|
||||
"loss_rate_upload": 0.5,
|
||||
"octo_conferences": 0,
|
||||
"octo_endpoints": 0,
|
||||
"octo_receive_bitrate": 0,
|
||||
"octo_receive_packet_rate": 0,
|
||||
"octo_send_bitrate": 0,
|
||||
"octo_send_packet_rate": 0,
|
||||
"octo_version": 1,
|
||||
"packet_rate_download": 0,
|
||||
"packet_rate_upload": 0,
|
||||
"participants": 0,
|
||||
|
@ -136,8 +179,10 @@ jitsi_total_colibri_web_socket_messages_sent 0
|
|||
"threads": 59,
|
||||
"total_bytes_received": 257628359,
|
||||
"total_bytes_received_octo": 0,
|
||||
"total_bytes_received_octo": 0,
|
||||
"total_bytes_sent": 257754048,
|
||||
"total_bytes_sent_octo": 0,
|
||||
"total_bytes_sent_octo": 0,
|
||||
"total_colibri_web_socket_messages_received": 0,
|
||||
"total_colibri_web_socket_messages_sent": 0,
|
||||
"total_conference_seconds": 470,
|
||||
|
@ -153,10 +198,13 @@ jitsi_total_colibri_web_socket_messages_sent 0
|
|||
"total_loss_degraded_participant_seconds": 1,
|
||||
"total_loss_limited_participant_seconds": 0,
|
||||
"total_packets_dropped_octo": 0,
|
||||
"total_packets_dropped_octo": 0,
|
||||
"total_packets_received": 266644,
|
||||
"total_packets_received_octo": 0,
|
||||
"total_packets_received_octo": 0,
|
||||
"total_packets_sent": 266556,
|
||||
"total_packets_sent_octo": 0,
|
||||
"total_packets_sent_octo": 0,
|
||||
"total_partially_failed_conferences": 0,
|
||||
"total_participants": 2,
|
||||
"videochannels": 0,
|
||||
|
@ -249,6 +297,42 @@ jitsi_total_colibri_web_socket_messages_received 0
|
|||
# HELP jitsi_total_colibri_web_socket_messages_sent The total number messages sent through COLIBRI web sockets.
|
||||
# TYPE jitsi_total_colibri_web_socket_messages_sent counter
|
||||
jitsi_total_colibri_web_socket_messages_sent 0
|
||||
# HELP jitsi_octo_version The current running OCTO version
|
||||
# TYPE jitsi_octo_version gauge
|
||||
jitsi_octo_version 1
|
||||
# HELP jitsi_octo_conferences The current number of OCTO conferences.
|
||||
# TYPE jitsi_octo_conferences gauge
|
||||
jitsi_octo_conferences 0
|
||||
# HELP jitsi_octo_endpoints The current number of OCTO endpoints.
|
||||
# TYPE jitsi_octo_endpoints gauge
|
||||
jitsi_octo_endpoints 0
|
||||
# HELP jitsi_octo_receive_bitrate The total receiving bitrate for the OCTO video bridge in kilobits per second.
|
||||
# TYPE jitsi_octo_receive_bitrate gauge
|
||||
jitsi_octo_receive_bitrate 0
|
||||
# HELP jitsi_octo_send_bitrate The total outgoing bitrate for the OCTO video bridge in kilobits per second.
|
||||
# TYPE jitsi_octo_send_bitrate gauge
|
||||
jitsi_octo_send_bitrate 0
|
||||
# HELP jitsi_octo_receive_packet_rate The total incoming packet rate for the OCTO video bridge in packets per second.
|
||||
# TYPE jitsi_octo_receive_packet_rate gauge
|
||||
jitsi_octo_receive_packet_rate 0
|
||||
# HELP jitsi_octo_send_packet_rate The total outgoing packet rate for the OCTO video bridge in packets per second.
|
||||
# TYPE jitsi_octo_send_packet_rate gauge
|
||||
jitsi_octo_send_packet_rate 0
|
||||
# HELP jitsi_total_bytes_received_octo The total incoming bit rate for the OCTO video bridge in bytes per second.
|
||||
# TYPE jitsi_total_bytes_received_octo gauge
|
||||
jitsi_total_bytes_received_octo 0
|
||||
# HELP jitsi_total_bytes_sent_octo The total outgoing bit rate for the OCTO video bridge in bytes per second.
|
||||
# TYPE jitsi_total_bytes_sent_octo gauge
|
||||
jitsi_total_bytes_sent_octo 0
|
||||
# HELP jitsi_total_packets_dropped_octo The total of dropped packets handled by the OCTO video bridge.
|
||||
# TYPE jitsi_total_packets_dropped_octo gauge
|
||||
jitsi_total_packets_dropped_octo 0
|
||||
# HELP jitsi_total_packets_received_octo The total of incoming dropped packets handled by the OCTO video bridge.
|
||||
# TYPE jitsi_total_packets_received_octo gauge
|
||||
jitsi_total_packets_received_octo 0
|
||||
# HELP jitsi_total_packets_sent_octo The total of sent dropped packets handled by the OCTO video bridge.
|
||||
# TYPE jitsi_total_packets_sent_octo gauge
|
||||
jitsi_total_packets_sent_octo 0
|
||||
`,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue