From b1809f0d1d8c93a4a5a84d4f7b8b96704b8fcffd Mon Sep 17 00:00:00 2001 From: louis Date: Sun, 20 Feb 2022 12:28:49 +0100 Subject: [PATCH] :bug: Fix exporter crashing during json parsing --- main.go | 8 ++++---- main_test.go | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/main.go b/main.go index 07f9324..cc4aca9 100644 --- a/main.go +++ b/main.go @@ -48,10 +48,10 @@ type videoBridgeStats struct { 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"` + OctoReceiveBitrate float64 `json:"octo_receive_bitrate"` + OctoReceivePacketRate float64 `json:"octo_receive_packet_rate"` + OctoSendBitrate float64 `json:"octo_send_bitrate"` + OctoSendPacketRate float64 `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"` diff --git a/main_test.go b/main_test.go index 6935293..f4e9ccb 100644 --- a/main_test.go +++ b/main_test.go @@ -190,9 +190,9 @@ jitsi_conference_sizes{conference_size="21"} 0 "loss_rate_upload": 0.5, "octo_conferences": 0, "octo_endpoints": 0, - "octo_receive_bitrate": 0, + "octo_receive_bitrate": 0.0, "octo_receive_packet_rate": 0, - "octo_send_bitrate": 0, + "octo_send_bitrate": 0.0, "octo_send_packet_rate": 0, "octo_version": 1, "packet_rate_download": 0,