Compare commits
No commits in common. "73a13bf82856d39713ef00112cefa71ca3da953b" and "b08a43fac3fc55e9a70a815949c9ae6a05d2b2a8" have entirely different histories.
73a13bf828
...
b08a43fac3
7
TODO.md
7
TODO.md
|
@ -11,10 +11,7 @@
|
|||
- ~~participants (join/leave time and details)~~
|
||||
- issues
|
||||
- errors
|
||||
- ~~info about JVBs used~~
|
||||
- info about JVBs used
|
||||
---
|
||||
* FIXMEs:
|
||||
- ~~long commandline options work ok in jilo-cli, but not in jilo - update them as in cli~~
|
||||
- ~~finish SQL refactoring, move to separate tables for conferences and participants, linked by id~~
|
||||
- update jilo-cli to work with new SQL
|
||||
- fix sqlite and mysql schemas differences with the new SQL
|
||||
- long commandline options work ok in jilo-cli, but not in jilo - update them as in cli
|
303
jilo
303
jilo
|
@ -50,60 +50,33 @@ MYSQL_DB=${MYSQL_DB:-$DEFAULT_MYSQL_DB}
|
|||
# DB queries
|
||||
db_get_state_template="SELECT filename, filetime, filesize, position, inode FROM state WHERE jitsi_component = '%s';"
|
||||
db_set_state_template="UPDATE state SET time=datetime('now'), filename='%s', filetime='%s', filesize='%s', position='%s', inode='%s' WHERE jitsi_component = '%s';"
|
||||
|
||||
db_get_conference="SELECT * FROM conferences WHERE conference_id = '%s';"
|
||||
db_insert_conferences_template="INSERT INTO conferences (jitsi_component, conference_id, conference_name, conference_host) VALUES ('%s', '%s', '%s', '%s');"
|
||||
db_insert_conference_event_template="INSERT INTO conference_events (jitsi_component, loglevel, time, conference_id, conference_event, conference_param) VALUES ('%s', '%s', '%s', '%s', '%s', '%s');"
|
||||
db_update_conference_id_template="UPDATE conferences SET conference_id='%s' WHERE conference_name = '%s' AND jitsi_component = '%s';"
|
||||
## FIXME need a way to update conference_id in Jicofo room creation; conference_name is not unique, need a better way
|
||||
db_update_conference_events_id_template="UPDATE conference_events SET conference_id='%s' WHERE conference_name = '%s' AND jitsi_component = '%s';"
|
||||
|
||||
db_get_participant="SELECT * FROM participants WHERE endpoint_id = '%s';"
|
||||
db_insert_participants_template="INSERT INTO participants (jitsi_component, endpoint_id, conference_id) VALUES ('%s', '%s', '%s');"
|
||||
db_insert_participant_event_template="INSERT INTO participant_events (jitsi_component, loglevel, time, participant_id, event_type, event_param) VALUES ('%s', '%s', '%s', '%s', '%s', '%s');"
|
||||
db_insert_conference_template="INSERT INTO conferences (jitsi_component, conference_name, conference_id, start, end) VALUES ('%s', '%s', '%s', '%s', '%s');"
|
||||
db_insert_participant_template="INSERT INTO participants (jitsi_component, conference_id, event_time, event_type, endpoint_id, stats_id, participant_ip) VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s');"
|
||||
|
||||
db_drop="
|
||||
DROP TABLE IF EXISTS conferences;
|
||||
DROP TABLE IF EXISTS conference_events;
|
||||
DROP TABLE IF EXISTS participants;
|
||||
DROP TABLE IF EXISTS participant_events;
|
||||
DROP TABLE IF EXISTS state;"
|
||||
db_create="CREATE TABLE conferences (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
jitsi_component TEXT NOT NULL,
|
||||
conference_id TEXT NOT NULL,
|
||||
conference_name TEXT NOT NULL,
|
||||
conference_host TEXT NOT NULL
|
||||
);
|
||||
CREATE TABLE conference_events (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
jitsi_component TEXT NOT NULL,
|
||||
loglevel TEXT,
|
||||
time TEXT NOT NULL,
|
||||
conference_id INTEGER NOT NULL,
|
||||
conference_event TEXT NOT NULL,
|
||||
conference_param TEXT,
|
||||
FOREIGN KEY (conference_id) REFERENCES conferences(id)
|
||||
id INTEGER PRIMARY_KEY,
|
||||
jitsi_component TEXT,
|
||||
conference_name TEXT,
|
||||
conference_id TEXT,
|
||||
start TEXT,
|
||||
end TEXT
|
||||
);
|
||||
CREATE TABLE participants (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
jitsi_component TEXT NOT NULL,
|
||||
endpoint_id TEXT NOT NULL,
|
||||
conference_id INTEGER NOT NULL,
|
||||
FOREIGN KEY (conference_id) REFERENCES conferences(id)
|
||||
);
|
||||
CREATE TABLE participant_events (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
jitsi_component TEXT NOT NULL,
|
||||
loglevel TEXT,
|
||||
time TEXT NOT NULL,
|
||||
participant_id INTEGER NOT NULL,
|
||||
event_type TEXT NOT NULL,
|
||||
event_param TEXT,
|
||||
FOREIGN KEY (participant_id) REFERENCES participants(id)
|
||||
id INTEGER PRIMARY_KEY,
|
||||
jitsi_component TEXT,
|
||||
conference_id INTEGER,
|
||||
event_time TEXT,
|
||||
event_type TEXT,
|
||||
endpoint_id TEXT,
|
||||
stats_id TEXT,
|
||||
participant_ip TEXT
|
||||
);
|
||||
CREATE TABLE state (
|
||||
id INTEGER PRIMARY KEY,
|
||||
id INTEGER PRIMARY_KEY,
|
||||
jitsi_component TEXT,
|
||||
time TEXT,
|
||||
filename TEXT,
|
||||
|
@ -117,9 +90,7 @@ INSERT OR REPLACE INTO state (id, jitsi_component, time, filename, filetime, fil
|
|||
INSERT OR REPLACE INTO state (id, jitsi_component, time, filename, filetime, filesize, position, inode) VALUES (2, 'JICOFO', '1970-01-01 00:00:00.000', '', 0, 0, 0, 0);"
|
||||
db_flush="
|
||||
DELETE FROM conferences;
|
||||
DELETE FROM conference_events;
|
||||
DELETE FROM participants;
|
||||
DELETE FROM participant_events;
|
||||
DELETE FROM state;"
|
||||
|
||||
help="Usage:
|
||||
|
@ -191,32 +162,6 @@ set_state() {
|
|||
db_query "$db_set_state"
|
||||
}
|
||||
|
||||
# Check for a conference and add it if needed
|
||||
# input - jitsi_component, conference_id, conference_name, conference_host
|
||||
db_conference_check() {
|
||||
db_get=$(printf "$db_get_conference" "$2")
|
||||
existing_conference=$(db_query "$db_get")
|
||||
if [ -z "$existing_conference" ]; then
|
||||
# add new conference
|
||||
db_insert=$(printf "$db_insert_conferences_template" "$1" "$2" "$3" "$4")
|
||||
db_query "$db_insert"
|
||||
fi
|
||||
}
|
||||
|
||||
# Check for a participant and add it if needed
|
||||
# input - jitsi_component, endpoint_id, conference_id
|
||||
db_participant_check() {
|
||||
db_get=$(printf "$db_get_participant" "$2")
|
||||
existing_participant=$(db_query "$db_get")
|
||||
if [ -z "$existing_participant" ]; then
|
||||
# add new participant
|
||||
db_insert=$(printf "$db_insert_participants_template" "$1" "$2" "$3")
|
||||
db_query "$db_insert"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
###
|
||||
|
||||
# Main parsing funstion
|
||||
|
@ -226,6 +171,9 @@ jitsi_log_parse() {
|
|||
local start_pos=$2
|
||||
new_last_pos="$start_pos"
|
||||
|
||||
# Local assoc array for conference events tracking
|
||||
declare -A start_times
|
||||
|
||||
# Get size and position for progress tracking
|
||||
local total_size
|
||||
total_size=$(stat -c '%s' "$file")
|
||||
|
@ -250,171 +198,104 @@ jitsi_log_parse() {
|
|||
|
||||
case $jitsi_component in
|
||||
|
||||
# We always check if a conference or participant exists, because
|
||||
# incomplete old logs may lead to corrupted stats otherwise
|
||||
|
||||
JVB)
|
||||
# conference starting event
|
||||
if [[ "$line" =~ ${jitsi_component}\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[confId=([a-zA-Z0-9]+)\ conf_name=(.*)@(.*)\ meeting_id=.*\]\ EndpointConnectionStatusMonitor\.start.*:\ Starting\ connection\ status\ monitor ]]; then
|
||||
|
||||
event_time="${BASH_REMATCH[1]}"
|
||||
loglevel="${BASH_REMATCH[2]}"
|
||||
conference_id="${BASH_REMATCH[3]}"
|
||||
conference_name="${BASH_REMATCH[4]}"
|
||||
conference_host="${BASH_REMATCH[5]}"
|
||||
|
||||
# always check or add the conference
|
||||
db_conference_check "$jitsi_component" "$conference_id" "$conference_name" "$conference_host"
|
||||
|
||||
# add the event details
|
||||
db_insert=$(printf "$db_insert_conference_event_template" "$jitsi_component" "$loglevel" "$event_time" "$conference_id" "conference created" "")
|
||||
db_query "$db_insert"
|
||||
# locate conference starting event
|
||||
if [[ "$line" =~ ([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\ Videobridge\.createConference#[0-9]+:\ create_conf,\ id=([a-zA-Z0-9]+) ]]; then
|
||||
timestamp="${BASH_REMATCH[1]}"
|
||||
conference_id="${BASH_REMATCH[2]}"
|
||||
start_times["$conference_id"]="$timestamp"
|
||||
|
||||
# locate participant joining event
|
||||
elif [[ "$line" =~ ${jitsi_component}\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[confId=([a-zA-Z0-9]+)\ .*epId=([a-zA-Z0-9-]+)\ stats_id=([a-zA-Z0-9-]+)\ .*Starting\ the\ Agent\ without\ remote\ candidates ]]; then
|
||||
elif [[ "$line" =~ ([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[confId=${conference_id}\ .*epId=([a-zA-Z0-9-]+)\ stats_id=([a-zA-Z0-9-]+)\ .*Starting\ the\ Agent\ without\ remote\ candidates ]]; then
|
||||
event_time="${BASH_REMATCH[1]}"
|
||||
loglevel="${BASH_REMATCH[2]}"
|
||||
conference_id="${BASH_REMATCH[3]}"
|
||||
participant_endpoint_id="${BASH_REMATCH[4]}"
|
||||
participant_stats_id="${BASH_REMATCH[5]}"
|
||||
|
||||
# always check or add the participant
|
||||
db_participant_check "$jitsi_component" "$participant_endpoint_id" "$conference_id"
|
||||
|
||||
# add the event details
|
||||
db_insert=$(printf "$db_insert_participant_event_template" "$jitsi_component" "$loglevel" "$event_time" "$participant_endpoint_id" "participant joining" "$conference_id")
|
||||
db_query "$db_insert"
|
||||
db_insert=$(printf "$db_insert_participant_event_template" "$jitsi_component" "$loglevel" "$event_time" "$participant_endpoint_id" "stats_id" "$participant_stats_id")
|
||||
db_query "$db_insert"
|
||||
event_type='participant joining'
|
||||
participant_endpoint_id="${BASH_REMATCH[2]}"
|
||||
participant_stats_id="${BASH_REMATCH[3]}"
|
||||
if [[ -n "$conference_id" ]]; then
|
||||
db_insert=$(printf "$db_insert_participant_template" "$jitsi_component" "$conference_id" "$event_time" "$event_type" "$participant_endpoint_id" "$participant_stats_id" "")
|
||||
db_query "$db_insert"
|
||||
fi
|
||||
|
||||
# locate participant pair selection event
|
||||
elif [[ "$line" =~ ${jitsi_component}\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[confId=${conference_id}\ .*epId=${participant_endpoint_id}\ stats_id=${participant_stats_id}\ .*Selected\ pair\ for\ stream\ .*([0-9.]+):10000/udp/srflx\ \-\>\ ([0-9.]+):[0-9]+/udp/prflx ]]; then
|
||||
elif [[ "$line" =~ ([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[confId=${conference_id}\ .*epId=${participant_endpoint_id}\ stats_id=${participant_stats_id}\ .*Selected\ pair\ for\ stream\ .*([0-9.]+):10000/udp/srflx\ \-\>\ ([0-9.]+):[0-9]+/udp/prflx ]]; then
|
||||
event_time="${BASH_REMATCH[1]}"
|
||||
loglevel="${BASH_REMATCH[2]}"
|
||||
participant_IP="${BASH_REMATCH[4]}"
|
||||
|
||||
# always check or add the participant
|
||||
db_participant_check "$jitsi_component" "$participant_endpoint_id" "$conference_id"
|
||||
|
||||
# add the event details
|
||||
db_insert=$(printf "$db_insert_participant_event_template" "$jitsi_component" "$loglevel" "$event_time" "$participant_endpoint_id" "pair selected" "$participant_IP")
|
||||
db_query "$db_insert"
|
||||
event_type='pair selected'
|
||||
participant_IP="${BASH_REMATCH[3]}"
|
||||
if [[ -n "$conference_id" ]]; then
|
||||
db_insert=$(printf "$db_insert_participant_template" "$jitsi_component" "$conference_id" "$event_time" "$event_type" "$participant_endpoint_id" "$participant_stats_id" "$participant_IP")
|
||||
db_query "$db_insert"
|
||||
fi
|
||||
|
||||
# locate participant leaving event
|
||||
elif [[ "$line" =~ ${jitsi_component}\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[confId=${conference_id}\ .*epId=${participant_endpoint_id}\ stats_id=${participant_stats_id}\]\ Endpoint\.expire.*:\ Expired\. ]]; then
|
||||
elif [[ "$line" =~ ([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[confId=${conference_id}\ .*epId=${participant_endpoint_id}\ stats_id=${participant_stats_id}\]\ Endpoint\.expire.*:\ Expired\. ]]; then
|
||||
event_time="${BASH_REMATCH[1]}"
|
||||
loglevel="${BASH_REMATCH[2]}"
|
||||
event_type='participant leaving'
|
||||
if [[ -n "$conference_id" ]]; then
|
||||
db_insert=$(printf "$db_insert_participant_template" "$jitsi_component" "$conference_id" "$event_time" "$event_type" "$participant_endpoint_id" "$participant_stats_id" "$participant_IP")
|
||||
db_query "$db_insert"
|
||||
# the participant left, forget about him
|
||||
unset "$event_time" "$event_type" "$participant_endpoint_id" "$participant_stats_id" "$participant_IP"
|
||||
fi
|
||||
|
||||
# always check or add the participant
|
||||
db_participant_check "$jitsi_component" "$participant_endpoint_id" "$conference_id"
|
||||
|
||||
# add the event details
|
||||
db_insert=$(printf "$db_insert_participant_event_template" "$jitsi_component" "$loglevel" "$event_time" "$participant_endpoint_id" "participant leaving" "$conference_id")
|
||||
db_query "$db_insert"
|
||||
|
||||
# the participant left, forget about him
|
||||
unset "$participant_endpoint_id" "$participant_stats_id" "$participant_IP"
|
||||
|
||||
# locate the conference ending event
|
||||
elif [[ "$line" =~ ${jitsi_component}\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[confId=([a-zA-Z0-9]+)\ .*\ Conference\.expire ]]; then
|
||||
event_time="${BASH_REMATCH[1]}"
|
||||
loglevel="${BASH_REMATCH[2]}"
|
||||
conference_id="${BASH_REMATCH[3]}"
|
||||
|
||||
# always check or add the conference
|
||||
db_conference_check "$jitsi_component" "$conference_id" "$conference_name" "$conference_host"
|
||||
|
||||
db_insert=$(printf "$db_insert_conference_event_template" "$jitsi_component" "$loglevel" "$event_time" "$conference_id" "conference expired" "")
|
||||
db_query "$db_insert"
|
||||
|
||||
# the conference ended, forget about it
|
||||
unset "$conference_id" "$conference_name"
|
||||
# locate the corresponding conference ending event
|
||||
elif [[ "$line" =~ ([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[confId=([a-zA-Z0-9]+)\ .*conf_name=([^ ]+)@.*\]\ Conference\.expire ]]; then
|
||||
end_time="${BASH_REMATCH[1]}"
|
||||
conference_id="${BASH_REMATCH[2]}"
|
||||
conference_name="${BASH_REMATCH[3]}"
|
||||
start_time="${start_times["$conference_id"]}"
|
||||
|
||||
if [[ -n "$start_time" ]]; then
|
||||
db_insert=$(printf "$db_insert_conference_template" "$jitsi_component" "$conference_name" "$conference_id" "$start_time" "$end_time")
|
||||
db_query "$db_insert"
|
||||
# the conference ended, forget about it
|
||||
unset "start_times[$conference_id]" "$start_time" "$end_time" "$conference_id" "$conference_name"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
JICOFO)
|
||||
# locate conference starting event
|
||||
if [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[room=([^ ]+)@(.*)\]\ JitsiMeetConferenceImpl\.joinTheRoom ]]; then
|
||||
event_time="${BASH_REMATCH[1]}"
|
||||
loglevel="${BASH_REMATCH[2]}"
|
||||
conference_id="0" # FIXME here we still don't have the jicofo room ID
|
||||
conference_name="${BASH_REMATCH[3]}"
|
||||
conference_host="${BASH_REMATCH[4]}"
|
||||
|
||||
# always check or add the conference
|
||||
db_conference_check "$jitsi_component" "$conference_id" "$conference_name" "$conference_host"
|
||||
|
||||
# add the event details
|
||||
db_insert=$(printf "$db_insert_conference_event_template" "$jitsi_component" "$loglevel" "$event_time" "$conference_id" "conference created" "")
|
||||
db_query "$db_insert"
|
||||
if [[ "$line" =~ ([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[room=([^ ]+)@.*\]\ JitsiMeetConferenceImpl\.joinTheRoom ]]; then
|
||||
timestamp="${BASH_REMATCH[1]}"
|
||||
conference_name="${BASH_REMATCH[2]}"
|
||||
start_times["$conference_name"]="$timestamp"
|
||||
|
||||
# locate participant joining event
|
||||
elif [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[room=([^ ]+)@.*\ meeting_id=([a-zA-Z0-9-]+)\]\ .*\.onMemberJoined.*:\ Member\ joined:([a-zA-Z0-9]+)\ stats-id=([a-zA-Z0-9-]+) ]]; then
|
||||
elif [[ "$line" =~ ([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[room=([^ ]+)@.*\ meeting_id=([a-zA-Z0-9-]+)\]\ .*\.onMemberJoined.*:\ Member\ joined:([a-zA-Z0-9]+)\ stats-id=([a-zA-Z0-9-]+) ]]; then
|
||||
event_time="${BASH_REMATCH[1]}"
|
||||
loglevel="${BASH_REMATCH[2]}"
|
||||
conference_name="${BASH_REMATCH[3]}"
|
||||
conference_id="${BASH_REMATCH[4]}"
|
||||
participant_endpoint_id="${BASH_REMATCH[5]}"
|
||||
participant_stats_id="${BASH_REMATCH[6]}"
|
||||
|
||||
# now we have conf ID update conference
|
||||
db_update=$(printf "$db_update_conference_id_template" "$conference_id" "$conference_name" "$jitsi_component")
|
||||
db_query "$db_update"
|
||||
## FIXME no way to match conference_id here to update it
|
||||
# db_update=$(printf "$db_update_conference_events_id_template" "$conference_id" "$conference_name" "$jitsi_component")
|
||||
# db_query "$db_update"
|
||||
|
||||
# always check or add the participant
|
||||
db_participant_check "$jitsi_component" "$participant_endpoint_id" "$conference_id"
|
||||
|
||||
# add the event details
|
||||
db_insert=$(printf "$db_insert_participant_event_template" "$jitsi_component" "$loglevel" "$event_time" "$participant_endpoint_id" "participant joining" "$conference_id")
|
||||
db_query "$db_insert"
|
||||
db_insert=$(printf "$db_insert_participant_event_template" "$jitsi_component" "$loglevel" "$event_time" "$participant_endpoint_id" "stats_id" "$participant_stats_id")
|
||||
db_query "$db_insert"
|
||||
|
||||
# locate the bridge selection event(s)
|
||||
elif [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[room=([^ ]+)@.*\ meeting_id=([a-zA-Z0-9-]+)\]\ ColibriV2SessionManager.allocate.*:\ Selected\ (.*),\ session\ exists:\ true ]]; then
|
||||
event_time="${BASH_REMATCH[1]}"
|
||||
loglevel="${BASH_REMATCH[2]}"
|
||||
# conference_name="${BASH_REMATCH[3]}"
|
||||
conference_id="${BASH_REMATCH[4]}"
|
||||
bridge_selected="${BASH_REMATCH[5]}"
|
||||
|
||||
# add the event details
|
||||
db_insert=$(printf "$db_insert_conference_event_template" "$jitsi_component" "$loglevel" "$event_time" "$conference_id" "bridge selected" "$bridge_selected")
|
||||
db_query "$db_insert"
|
||||
event_type='participant joining'
|
||||
conference_name="${BASH_REMATCH[2]}"
|
||||
conference_id="${BASH_REMATCH[3]}"
|
||||
participant_endpoint_id="${BASH_REMATCH[4]}"
|
||||
participant_stats_id="${BASH_REMATCH[5]}"
|
||||
if [[ -n "$conference_id" ]]; then
|
||||
db_insert=$(printf "$db_insert_participant_template" "$jitsi_component" "$conference_id" "$event_time" "$event_type" "$participant_endpoint_id" "$participant_stats_id" "")
|
||||
db_query "$db_insert"
|
||||
fi
|
||||
|
||||
# locate participant leaving event
|
||||
elif [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[room=([^ ]+)@.*\ meeting_id=([a-zA-Z0-9-]+)\]\ .*\.removeParticipant#.*:\ Removing\ ([a-zA-Z0-9]+) ]]; then
|
||||
elif [[ "$line" =~ ([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[room=${conference_name}@.*\ meeting_id=${conference_id}\]\ .*\.removeParticipant#.*:\ Removing\ ([a-zA-Z0-9]+) ]]; then
|
||||
event_time="${BASH_REMATCH[1]}"
|
||||
loglevel="${BASH_REMATCH[2]}"
|
||||
# conference_name="${BASH_REMATCH[3]}"
|
||||
conference_id="${BASH_REMATCH[4]}"
|
||||
participant_endpoint_id="${BASH_REMATCH[5]}"
|
||||
|
||||
# always check or add the participant
|
||||
db_participant_check "$jitsi_component" "$participant_endpoint_id" "$conference_id"
|
||||
|
||||
# add the event details
|
||||
db_insert=$(printf "$db_insert_participant_event_template" "$jitsi_component" "$loglevel" "$event_time" "$participant_endpoint_id" "participant leaving" "$conference_id")
|
||||
db_query "$db_insert"
|
||||
event_type='participant leaving'
|
||||
participant_endpoint_id="${BASH_REMATCH[2]}"
|
||||
participant_stats_id="" # FIXME
|
||||
if [[ -n "$conference_id" ]]; then
|
||||
db_insert=$(printf "$db_insert_participant_template" "$jitsi_component" "$conference_id" "$event_time" "$event_type" "$participant_endpoint_id" "$participant_stats_id" "")
|
||||
db_query "$db_insert"
|
||||
fi
|
||||
|
||||
# locate the corresponding conference ending event
|
||||
elif [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[room=([^ ]+)@.*\ meeting_id=([a-zA-Z0-9-]+)\]\ JitsiMeetConferenceImpl\.stop ]]; then
|
||||
event_time="${BASH_REMATCH[1]}"
|
||||
loglevel="${BASH_REMATCH[2]}"
|
||||
# conference_name="${BASH_REMATCH[3]}"
|
||||
conference_id="${BASH_REMATCH[4]}"
|
||||
|
||||
# always check or add the conference
|
||||
db_conference_check "$jitsi_component" "$conference_id" "$conference_name" "$conference_host"
|
||||
|
||||
# add the event details
|
||||
db_insert=$(printf "$db_insert_conference_event_template" "$jitsi_component" "$loglevel" "$event_time" "$conference_id" "conference stopped" "")
|
||||
db_query "$db_insert"
|
||||
elif [[ "$line" =~ ([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[room=([^ ]+)@.*\ meeting_id=([a-zA-Z0-9-]+)\]\ JitsiMeetConferenceImpl\.stop ]]; then
|
||||
end_time="${BASH_REMATCH[1]}"
|
||||
conference_name="${BASH_REMATCH[2]}"
|
||||
conference_id="${BASH_REMATCH[3]}"
|
||||
start_time="${start_times["$conference_name"]}"
|
||||
|
||||
if [[ -n "$start_time" ]]; then
|
||||
db_insert=$(printf "$db_insert_conference_template" "$jitsi_component" "$conference_name" "$conference_id" "$start_time" "$end_time")
|
||||
db_query "$db_insert"
|
||||
unset "start_times[$conference_name]"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
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.10
|
||||
|
||||
|
||||
JVB:
|
||||
|
||||
conference start:
|
||||
log
|
||||
JVB 2024-04-01 04:08:55.124 INFO: [19046] [confId=4c14584fce9a5970 conf_name=someroom123@conference.meet.example.com meeting_id=177c43a3] EndpointConnectionStatusMonitor.start#58: Starting connection status monitor
|
||||
regex
|
||||
JVB\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[confId=([a-zA-Z]+)\ conf_name=(.*)@([a-zA-Z0-9-_.]+)\ meeting_id=.*\]\ EndpointConnectionStatusMonitor\.start.*:\ Starting\ connection\ status\ monitor
|
||||
|
||||
conference end:
|
||||
log
|
||||
JVB 2024-04-01 03:04:24.339 INFO: [18981] [confId=4c14584fce9a5970 conf_name=someroom123@conference.meet.example.com meeting_id=177c43a3] EndpointConnectionStatusMonitor.stop#66: Stopped
|
||||
regex
|
||||
|
||||
participant joining
|
||||
([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[confId=${conference_id}\ .*epId=([a-zA-Z0-9-]+)\ stats_id=([a-zA-Z0-9-]+)\ .*Starting\ the\ Agent\ without\ remote\ candidates
|
||||
|
||||
pair selection
|
||||
([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[confId=${conference_id}\ .*epId=${participant_endpoint_id}\ stats_id=${participant_stats_id}\ .*Selected\ pair\ for\ stream\ .*([0-9.]+):10000/udp/srflx\ \-\>\ ([0-9.]+):[0-9]+/udp/prflx
|
||||
|
||||
participant leaving
|
||||
([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[confId=${conference_id}\ .*epId=${participant_endpoint_id}\ stats_id=${participant_stats_id}\]\ Endpoint\.expire.*:\ Expired\.
|
||||
|
||||
|
||||
## OLD
|
||||
# was used to insert start & end in one db record,
|
||||
# retired because in "start" regex there was no conference name, only id
|
||||
##
|
||||
|
||||
conference start:
|
||||
log
|
||||
JVB 2024-04-01 03:02:52.593 INFO: [18962] Videobridge.createConference#255: create_conf, id=4c14584fce9a5970 meeting_id=177c43a3-1780-4258-aa23-ca3d7dd29aa5
|
||||
regex
|
||||
([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\ Videobridge\.createConference#[0-9]+:\ create_conf,\ id=([a-zA-Z0-9]+)
|
||||
|
||||
conference end:
|
||||
log
|
||||
JVB 2024-04-01 03:04:24.339 INFO: [18981] [confId=4c14584fce9a5970 conf_name=someroom123@conference.meet.example.com meeting_id=177c43a3] Conference.expire#595: Expiring.
|
||||
regex
|
||||
([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[confId=([a-zA-Z0-9]+)\ .*conf_name=([^ ]+)@.*\]\ Conference\.expire
|
||||
|
||||
|
||||
|
||||
JICOFO:
|
||||
|
||||
conference start
|
||||
([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[room=([^ ]+)@.*\]\ JitsiMeetConferenceImpl\.joinTheRoom
|
||||
|
||||
participant joining
|
||||
([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[room=([^ ]+)@.*\ meeting_id=([a-zA-Z0-9-]+)\]\ .*\.onMemberJoined.*:\ Member\ joined:([a-zA-Z0-9]+)\ stats-id=([a-zA-Z0-9-]+)
|
||||
|
||||
bridge selection
|
||||
([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*BridgeSelectionStrategy.select#.*:\ Selected.*\[jid=[a-z]@.*\/(.*),\
|
||||
|
||||
participant leaving
|
||||
([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[room=${conference_name}@.*\ meeting_id=${conference_id}\]\ .*\.removeParticipant#.*:\ Removing\ ([a-zA-Z0-9]+)
|
||||
|
||||
conference end
|
||||
([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[room=([^ ]+)@.*\ meeting_id=([a-zA-Z0-9-]+)\]\ JitsiMeetConferenceImpl\.stop
|
||||
|
Loading…
Reference in New Issue