From e0b41846286f08c60207de658ec5c98734aacc24 Mon Sep 17 00:00:00 2001 From: Yasen Pramatarov Date: Mon, 24 Jun 2024 11:41:53 +0300 Subject: [PATCH] Adds bridge availability events --- CHANGELOG.md | 1 + jilo | 19 +++++++++++++++++++ log-regexps.md | 24 +++++++++++++++++++++++- 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b80f41e..9acbabe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ All notable changes to this project will be documented in this file. - Added jicofo starting, xmpp registering and started events - Added jvb added, removed and lost events - Added jvb health-check scheduled and stopped events +- Added "no operational bridges" and "no bridge available" events ### Changed diff --git a/jilo b/jilo index dc716af..08a6ab1 100755 --- a/jilo +++ b/jilo @@ -439,6 +439,25 @@ jitsi_log_parse() { db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "$jvb_id" "jvb region" "$jvb_region") db_query "$db_insert" + # WARNING no opertional bridges + elif [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*BridgeSelector\.selectBridge.*\ There\ are\ no\ operational\ bridges\. ]]; then + event_time="${BASH_REMATCH[1]}" + loglevel="${BASH_REMATCH[2]}" + + # add the event details + db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "" "no operational bridges" "") + db_query "$db_insert" + + # ERROR no bridge available + elif [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[room=([^ ]+)@.*\ meeting_id=([a-zA-Z0-9-]+).*:\ Can\ not\ invite\ participant,\ no\ bridge\ available\. ]]; then + event_time="${BASH_REMATCH[1]}" + loglevel="${BASH_REMATCH[2]}" + conference_id="${BASH_REMATCH[4]}" + + # add the event details + db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "$conference_id" "no bridge available" "") + db_query "$db_insert" + # locate conference starting event elif [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[room=([^ ]+)@(.*)\]\ JitsiMeetConferenceImpl\.joinTheRoom ]]; then event_time="${BASH_REMATCH[1]}" diff --git a/log-regexps.md b/log-regexps.md index d65ee6a..483b5c1 100644 --- a/log-regexps.md +++ b/log-regexps.md @@ -2,7 +2,7 @@ This is a reference of the log lines and the corresponding regexps that are used in Jilo for events tracking. -Work in progress: 2024.06.22 +Work in progress: 2024.06.24 ---- @@ -127,6 +127,28 @@ regex ```Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\JvbDoctor\.bridgeRemoved.*:\ Stopping\ health-check\ task\ for:\ Bridge\[jid=.*@.*\/(.*),\ version=(.*),\ .*\ region=(.*),``` +### Warning: no operational bridges +needed: *timestamp, loglevel* + +log + +```Jicofo 2024-06-25 10:44:18.727 WARNING: [2505] BridgeSelector.selectBridge#182: There are no operational bridges.``` + +regex + +```Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*BridgeSelector\.selectBridge.*\ There\ are\ no\ operational\ bridges\.``` + +### Severe: no bridge available +needed: *timestamp, loglevel, conferenceID* + +log + +```Jicofo 2024-06-25 10:44:18.727 SEVERE: [2505] [room=fewfewf-wfwegf@conference.meet.example.com meeting_id=750c7bcc-d9fb-4b8b-a085-dcf6b5c99546 participant=49e3837d] ParticipantInviteRunnable.doRun#218: Can not invite participant, no bridge available.``` + +regex + +```Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[room=([^ ]+)@.*\ meeting_id=([a-zA-Z0-9-]+).*:\ Can\ not\ invite\ participant,\ no\ bridge\ available\.``` + ### conference start needed: *timestamp, loglevel, conferenceName,* (**FIXME**: we don't have *conferenceID* here, it's good to have it)