Compare commits
No commits in common. "7bd5b9a253f2240e96f3cf0779d4462753cbf91e" and "fa5a7d821c8fc1ac459a1c157e64217c0ef6eb1b" have entirely different histories.
7bd5b9a253
...
fa5a7d821c
54
jilo
54
jilo
|
@ -192,53 +192,53 @@ jitsi_log_parse() {
|
|||
# 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"
|
||||
conferenceId="${BASH_REMATCH[2]}"
|
||||
start_times["$conferenceId"]="$timestamp"
|
||||
|
||||
# locate participant joining event
|
||||
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]}"
|
||||
elif [[ "$line" =~ ([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[confId=${conferenceId}\ .*epId=([a-zA-Z0-9-]+)\ stats_id=([a-zA-Z0-9-]+)\ .*Starting\ the\ Agent\ without\ remote\ candidates ]]; then
|
||||
participant_join_time="${BASH_REMATCH[1]}"
|
||||
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" "$conference_id" "$event_time" "$event_type" "$participant_endpoint_id" "$participant_stats_id" "")
|
||||
if [[ -n "$conferenceId" ]]; then
|
||||
db_insert=$(printf "$db_insert_participant_template" "$conferenceId" "$participant_join_time" "$event_type" "$participant_endpoint_id" "$participant_stats_id" "")
|
||||
db_query "$db_insert"
|
||||
fi
|
||||
|
||||
# locate participant pair selection event
|
||||
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]}"
|
||||
elif [[ "$line" =~ ([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[confId=${conferenceId}\ .*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
|
||||
participant_join_time="${BASH_REMATCH[1]}"
|
||||
event_type='pair selected'
|
||||
participant_IP="${BASH_REMATCH[3]}"
|
||||
if [[ -n "$conference_id" ]]; then
|
||||
db_insert=$(printf "$db_insert_participant_template" "$conference_id" "$event_time" "$event_type" "$participant_endpoint_id" "$participant_stats_id" "$participant_IP")
|
||||
if [[ -n "$conferenceId" ]]; then
|
||||
db_insert=$(printf "$db_insert_participant_template" "$conferenceId" "$participant_join_time" "$event_type" "$participant_endpoint_id" "$participant_stats_id" "$participant_IP")
|
||||
db_query "$db_insert"
|
||||
fi
|
||||
|
||||
# locate participant leaving event
|
||||
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]}"
|
||||
elif [[ "$line" =~ ([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[confId=${conferenceId}\ .*epId=${participant_endpoint_id}\ stats_id=${participant_stats_id}\]\ Endpoint\.expire.*:\ Expired\. ]]; then
|
||||
participant_join_time="${BASH_REMATCH[1]}"
|
||||
event_type='participant leaving'
|
||||
if [[ -n "$conference_id" ]]; then
|
||||
db_insert=$(printf "$db_insert_participant_template" "$conference_id" "$event_time" "$event_type" "$participant_endpoint_id" "$participant_stats_id" "$participant_IP")
|
||||
if [[ -n "$conferenceId" ]]; then
|
||||
db_insert=$(printf "$db_insert_participant_template" "$conferenceId" "$participant_join_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
|
||||
unset $participant_join_time $event_type $participant_endpoint_id $participant_stats_id $participant_IP
|
||||
fi
|
||||
|
||||
# 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"]}"
|
||||
conferenceId="${BASH_REMATCH[2]}"
|
||||
conferenceName="${BASH_REMATCH[3]}"
|
||||
start_time="${start_times["$conferenceId"]}"
|
||||
|
||||
if [[ -n "$start_time" ]]; then
|
||||
db_insert=$(printf "$db_insert_conference_template" "$jitsi_component" "$conference_name" "$conference_id" "$start_time" "$end_time")
|
||||
db_insert=$(printf "$db_insert_conference_template" "$jitsi_component" "$conferenceName" "$conferenceId" "$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
|
||||
unset "start_times[$conferenceId]" $statr_time $end_time $conferenceId $conferenceName
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
@ -247,20 +247,20 @@ jitsi_log_parse() {
|
|||
# locate conference starting event
|
||||
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"
|
||||
conferenceName="${BASH_REMATCH[2]}"
|
||||
start_times["$conferenceName"]="$timestamp"
|
||||
|
||||
# locate the corresponding conference ending event
|
||||
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"]}"
|
||||
conferenceName="${BASH_REMATCH[2]}"
|
||||
conferenceId="${BASH_REMATCH[3]}"
|
||||
start_time="${start_times["$conferenceName"]}"
|
||||
|
||||
if [[ -n "$start_time" ]]; then
|
||||
db_insert=$(printf "$db_insert_conference_template" "$jitsi_component" "$conference_name" "$conference_id" "$start_time" "$end_time")
|
||||
db_insert=$(printf "$db_insert_conference_template" "$jitsi_component" "$conferenceName" "$conferenceId" "$start_time" "$end_time")
|
||||
db_query "$db_insert"
|
||||
unset "start_times[$conference_name]"
|
||||
unset "start_times[$conferenceName]"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
|
Loading…
Reference in New Issue