diff --git a/jilo b/jilo index 08a6ab1..782ff99 100755 --- a/jilo +++ b/jilo @@ -294,6 +294,21 @@ jitsi_log_parse() { db_insert=$(printf "$db_insert_conference_event_template" "$jitsi_component" "$loglevel" "$event_time" "$conference_id" "conference created" "") db_query "$db_insert" + # 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 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 event_time="${BASH_REMATCH[1]}" @@ -339,21 +354,6 @@ jitsi_log_parse() { # 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" - fi ;; diff --git a/log-regexps.md b/log-regexps.md index 483b5c1..19b205f 100644 --- a/log-regexps.md +++ b/log-regexps.md @@ -2,7 +2,19 @@ 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.24 +``` + + +needed: data being searched for in the log line +usage: + example Jilo command lines related to the event +log + example log line with the data about the event +regex + the regular expression for searching the event +``` + +Work in progress: 2024.06.25 ---- @@ -11,6 +23,12 @@ Work in progress: 2024.06.24 ### conference start needed: *timestamp, loglevel, conferenceID, conferenceName, conferenceDomain* +usage: + +**```jilo-cli -c conferenceID```** + +**```jilo-cli -c conferenceName```** + 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``` @@ -22,13 +40,37 @@ regex ### conference end needed: *timestamp, loglevel, conferenceID* (optionally in case we don't have the starting event: *conferenceName, conferenceDomain*) +usage: + +**```jilo-cli -c conferenceID```** + +**```jilo-cli -c conferenceName```** + 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``` +```JVB 2024-04-01 03:52:39.116 INFO: [19031] [confId=8c116568f5201f28 conf_name=someroom123@conference.meex.example.com meeting_id=a5449477] Conference.expire#595: Expiring.``` + +regex + +```JVB\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[confId=([a-zA-Z0-9]+)\ .*\ Conference\.expire``` ## participant joining needed: *timestamp, loglevel, conferenceID, endpointID, statsID* +usage: + +**```jilo-cli -c conferenceID```** + +**```jilo-cli -c conferenceName```** + +**```jilo-cli -p endpointID```** + +**```jilo-cli -p statsID```** + +log + +```JVB 2024-04-01 03:02:53.411 INFO: [18968] [confId=4c14584fce9a5970 conf_name=someroom123@conference.meet.example.com meeting_id=177c43a3 epId=660d9565 stats_id=Elva-jQ6 local_ufrag=9eici1hqbpo5dq] IceTransport.startConnectivityEstablishment#205: Starting the Agent without remote candidates.``` + regex ```JVB ([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``` @@ -36,6 +78,22 @@ regex ### pair selection needed: *timestamp, loglevel, conferenceID, endpointID, statsID, participant IP address* +usage: + +**```jilo-cli -c conferenceID```** + +**```jilo-cli -c conferenceName```** + +**```jilo-cli -p endpointID```** + +**```jilo-cli -p statsID```** + +**```jilo-cli -p participant_IP_address```** + +log + +```JVB 2024-04-01 03:02:53.907 INFO: [18971] [confId=4c14584fce9a5970 conf_name=someroom123@conference.meet.example.com meeting_id=177c43a3 epId=660d9565 stats_id=Elva-jQ6 local_ufrag=9eici1hqbpo5dq ufrag=9eici1hqbpo5dq name=stream-660d9565] CheckList.handleNominationConfirmed#406: Selected pair for stream stream-660d9565.RTP: SERVER_IP:10000/udp/srflx -> PARTICIPANT_IP:61542/udp/prflx (stream-660d9565.RTP)``` + regex ```JVB ([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``` @@ -43,6 +101,18 @@ regex ### participant leaving needed: *timestamp, loglevel, conferenceID, endpointID, statsID* +usage: + +**```jilo-cli -c conferenceID```** + +**```jilo-cli -c conferenceName```** + +**```jilo-cli -p endpointID```** + +log + +```JVB 2024-04-01 03:03:04.440 INFO: [18967] [confId=4c14584fce9a5970 conf_name=someroom123@conference.meet.example.com meeting_id=177c43a3 epId=ef00c95e stats_id=Joseph-kU4] Endpoint.expire#1155: Expired.``` + regex ```JVB ([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[confId=${conference_id}\ .*epId=${participant_endpoint_id}\ stats_id=${participant_stats_id}\]\ Endpoint\.expire.*:\ Expired\.```