Compare commits

...

2 Commits

Author SHA1 Message Date
Yasen Pramatarov c9eedf7814 Updates CHANGELOG 2024-06-21 12:28:34 +03:00
Yasen Pramatarov 72ab3560b9 Adds JVB added, removed and lost events. 2024-06-21 12:27:56 +03:00
2 changed files with 31 additions and 0 deletions

View File

@ -15,6 +15,7 @@ All notable changes to this project will be documented in this file.
### Added ### Added
- Added 'jitsi_components' table to handle events related to the platform health - Added 'jitsi_components' table to handle events related to the platform health
- Added jicofo starting, xmpp registering and started events - Added jicofo starting, xmpp registering and started events
- Added jvb added, removed and lost events
### Changed ### Changed

30
jilo
View File

@ -381,6 +381,36 @@ jitsi_log_parse() {
db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "" "jicofo started" "") db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "" "jicofo started" "")
db_query "$db_insert" db_query "$db_insert"
# bridge added
elif [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\BridgeSelector\.addJvbAddress.*:\ Added\ new\ videobridge:\ Bridge\[jid=.*@.*\/(.*),\ version=(.*),.*region=(.*), ]]; then
event_time="${BASH_REMATCH[1]}"
loglevel="${BASH_REMATCH[2]}"
jvb_id="${BASH_REMATCH[3]}"
jvb_version="${BASH_REMATCH[4]}"
jvb_region="${BASH_REMATCH[5]}"
db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "$jvb_id" "jvb added" "")
db_query "$db_insert"
db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "$jvb_id" "jvb version" "$jvb_version")
db_query "$db_insert"
db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "$jvb_id" "jvb region" "$jvb_region")
db_query "$db_insert"
# bridge removed
elif [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\BridgeSelector\.removeJvbAddress.*:\ Removing\ JVB:\ .*@.*\/(.*) ]]; then
event_time="${BASH_REMATCH[1]}"
loglevel="${BASH_REMATCH[2]}"
jvb_id="${BASH_REMATCH[3]}"
db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "$jvb_id" "jvb removed" "")
db_query "$db_insert"
# bridge lost (just in case the removal was not detected)
elif [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\BridgeSelector\.removeJvbAddress.*:\ Lost\ a\ bridge:\ .*@.*\/(.*) ]]; then
event_time="${BASH_REMATCH[1]}"
loglevel="${BASH_REMATCH[2]}"
jvb_id="${BASH_REMATCH[3]}"
db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "$jvb_id" "jvb lost" "")
db_query "$db_insert"
# locate conference starting event # locate conference starting event
elif [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[room=([^ ]+)@(.*)\]\ JitsiMeetConferenceImpl\.joinTheRoom ]]; then elif [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[room=([^ ]+)@(.*)\]\ JitsiMeetConferenceImpl\.joinTheRoom ]]; then
event_time="${BASH_REMATCH[1]}" event_time="${BASH_REMATCH[1]}"