Compare commits

...

21 Commits
v0.1.1 ... main

Author SHA1 Message Date
Yasen Pramatarov 0763818348 SQL fix 2024-07-04 18:26:33 +03:00
Yasen Pramatarov 34640b07cc Adds reference to "jilo-web" 2024-06-28 19:57:05 +03:00
Yasen Pramatarov 73b67c9069 Adds reference to "jilo-web" 2024-06-28 19:56:13 +03:00
Yasen Pramatarov 5ebba9021c Moves "jilo-web" to its own repo. 2024-06-28 19:50:51 +03:00
Yasen Pramatarov 548d05e59e Fixes registration and login 2024-06-28 14:50:34 +03:00
Yasen Pramatarov a0c826ed97 php fixes 2024-06-28 14:36:20 +03:00
Yasen Pramatarov 544d2973dd Updates CHANGELOG 2024-06-28 14:04:42 +03:00
Yasen Pramatarov 766cacd40f Initial version of jilo-web, web interface to Jilo. 2024-06-27 14:03:30 +03:00
Yasen Pramatarov b0667fa73a Updates CHANGELOG 2024-06-26 14:55:15 +03:00
Yasen Pramatarov 3f8a78db71 Adds "jitsi-component" service level events search in jilo-cli 2024-06-26 14:53:28 +03:00
Yasen Pramatarov 596028e5c2 Fixes formatting 2024-06-25 12:14:33 +03:00
Yasen Pramatarov c434c331c4 Fixes formatting 2024-06-25 12:13:21 +03:00
Yasen Pramatarov e0b4184628 Adds bridge availability events 2024-06-24 11:41:53 +03:00
Yasen Pramatarov 1bda0854d5 Updates docs and changelog 2024-06-23 20:18:18 +03:00
Yasen Pramatarov 4f7d23b98c Adds jvb health-check scheduled and stopped events 2024-06-23 20:12:45 +03:00
Yasen Pramatarov 8b8d2600b5 formatting fix 2024-06-22 12:37:31 +03:00
Yasen Pramatarov 43cb19dc3e Adds jvb added, removed, and lost events 2024-06-22 12:35:30 +03:00
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
Yasen Pramatarov eee70f73dc Adds jicofo events regexps. 2024-06-20 10:06:21 +03:00
Yasen Pramatarov a36de4b684 Adds jitsi components events 2024-06-19 10:02:24 +03:00
5 changed files with 406 additions and 40 deletions

View File

@ -13,6 +13,13 @@ All notable changes to this project will be documented in this file.
- gitlab: https://gitlab.com/lindeas/jilo/-/compare/v0.1.1...HEAD
### Added
- Added 'jitsi_components' table to handle events related to the platform health
- 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
- Added "jitsi-component" service level events search in jilo-cli
- Added initial version of jilo-web, PHP web interface to jilo (then moved to own repo)
### Changed

View File

@ -4,6 +4,8 @@
Bash scripts for collecting and displaying information about conference events from Jitsi Meet logs.
This is the command line tools repository. For a web interface to query Jilo, go to the **"jilo-web"** repository.
The webpage for this project is https://lindeas.com/jilo. The main git repo is:
- https://code.lindeas.com/lindeas/jilo

145
jilo
View File

@ -65,11 +65,14 @@ 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_jitsi_component_event_template="INSERT INTO jitsi_components (jitsi_component, loglevel, time, component_id, event_type, event_param) VALUES ('%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 jitsi_components;
DROP TABLE IF EXISTS state;"
db_create="CREATE TABLE conferences (
id INTEGER PRIMARY KEY AUTOINCREMENT,
@ -105,6 +108,15 @@ CREATE TABLE participant_events (
event_param TEXT,
FOREIGN KEY (participant_id) REFERENCES participants(id)
);
CREATE TABLE jitsi_components (
id INTEGER PRIMARY KEY AUTOINCREMENT,
jitsi_component TEXT NOT NULL,
loglevel TEXT,
time TEXT NOT NULL,
component_id TEXT,
event_type TEXT,
event_param TEXT
);
CREATE TABLE state (
id INTEGER PRIMARY KEY,
jitsi_component TEXT,
@ -123,6 +135,7 @@ DELETE FROM conferences;
DELETE FROM conference_events;
DELETE FROM participants;
DELETE FROM participant_events;
DELETE FROM jitsi_components;
DELETE FROM state;"
help="Usage:
@ -281,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]}"
@ -326,27 +354,112 @@ 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
;;
JICOFO)
# jicofo starting
if [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*Main\.main.*:\ Starting\ Jicofo\. ]]; then
event_time="${BASH_REMATCH[1]}"
loglevel="${BASH_REMATCH[2]}"
## FIXME a way to add some jicofo id and/or parameter
db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "" "jicofo starting" "")
db_query "$db_insert"
# jicofo registered to xmpp
elif [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[xmpp_connection=client\]\ XmppProvider\$connectionListener\$1\.authenticated.*:\ Registered\. ]]; then
event_time="${BASH_REMATCH[1]}"
loglevel="${BASH_REMATCH[2]}"
db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "" "jicofo xmpp registered" "")
db_query "$db_insert"
# jicofo started
elif [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\JicofoServices\.\<init\>.*\ Registering\ GlobalMetrics\ periodic\ updates\. ]]; then
event_time="${BASH_REMATCH[1]}"
loglevel="${BASH_REMATCH[2]}"
db_insert=$(printf "$db_insert_jitsi_component_event_template" "$jitsi_component" "$loglevel" "$event_time" "" "jicofo started" "")
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"
# bridge healthcheck scheduled
elif [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\JvbDoctor\.bridgeAdded.*:\ Scheduled\ health-check\ task\ for:\ 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 health-check scheduled" "")
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 healthcheck stopped
elif [[ "$line" =~ Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\JvbDoctor\.bridgeRemoved.*:\ Stopping\ health-check\ task\ for:\ 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 health-check stopped" "")
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"
# 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
if [[ "$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]}"
loglevel="${BASH_REMATCH[2]}"
conference_id="0" # FIXME here we still don't have the jicofo room ID

118
jilo-cli
View File

@ -69,12 +69,13 @@ SELECT DISTINCT
AS end,
c.conference_id,
c.conference_name,
(SELECT COUNT(pe.participant_id) AS participants
(SELECT COUNT(pe.participant_id)
FROM participant_events pe
WHERE
pe.event_type = 'participant joining'
AND
pe.event_param = c.conference_id),
pe.event_param = c.conference_id)
AS participants,
name_counts.name_count,
c.conference_host
FROM
@ -90,7 +91,7 @@ JOIN (
) AS name_counts ON c.conference_name = name_counts.conference_name
JOIN
conference_events ce ON c.conference_id = ce.conference_id
WHERE (ce.time >= '%s' AND ce.time <= '%s')
WHERE (ce.time >= '%s 00:00:00' AND ce.time <= '%s 23:59:59')
ORDER BY
c.id;"
@ -114,7 +115,7 @@ LEFT JOIN
participant_events pe ON p.endpoint_id = pe.participant_id
WHERE
c.conference_id = '%s'
AND (pe.time >= '%s' AND pe.time <= '%s')
AND (pe.time >= '%s 00:00:00' AND pe.time <= '%s 23:59:59')
UNION
@ -133,7 +134,7 @@ LEFT JOIN
conference_events ce ON c.conference_id = ce.conference_id
WHERE
c.conference_id = '%s'
AND (event_time >= '%s' AND event_time <= '%s')
AND (event_time >= '%s 00:00:00' AND event_time <= '%s 23:59:59')
ORDER BY
pe.time;"
@ -158,7 +159,7 @@ LEFT JOIN
participant_events pe ON p.endpoint_id = pe.participant_id
WHERE
c.conference_name = '%s'
AND (pe.time >= '%s' AND pe.time <= '%s')
AND (pe.time >= '%s 00:00:00' AND pe.time <= '%s 23:59:59')
UNION
@ -177,7 +178,7 @@ LEFT JOIN
conference_events ce ON c.conference_id = ce.conference_id
WHERE
c.conference_name = '%s'
AND (event_time >= '%s' AND event_time <= '%s')
AND (event_time >= '%s 00:00:00' AND event_time <= '%s 23:59:59')
ORDER BY
pe.time;"
@ -192,7 +193,7 @@ FROM
JOIN
participant_events pe ON p.endpoint_id = pe.participant_id
WHERE
pe.time >= '%s' AND pe.time <= '%s'
pe.time >= '%s 00:00:00' AND pe.time <= '%s 23:59:59'
ORDER BY p.id;"
db_conference_by_participant_id_template="
@ -215,7 +216,7 @@ LEFT JOIN
participant_events pe ON p.endpoint_id = pe.participant_id
WHERE
p.endpoint_id = '%s'
AND (pe.time >= '%s' AND pe.time <= '%s')
AND (pe.time >= '%s 00:00:00' AND pe.time <= '%s 23:59:59')
UNION
@ -234,7 +235,7 @@ LEFT JOIN
conference_events ce ON c.conference_id = ce.conference_id
WHERE
participant_id = '%s'
AND (event_time >= '%s' AND event_time <= '%s')
AND (event_time >= '%s 00:00:00' AND event_time <= '%s 23:59:59')
ORDER BY
pe.time;"
@ -259,7 +260,7 @@ LEFT JOIN
participant_events pe ON p.endpoint_id = pe.participant_id
WHERE
c.conference_id = '%s'
AND (pe.time >= '%s' AND pe.time <= '%s')
AND (pe.time >= '%s 00:00:00' AND pe.time <= '%s 23:59:59')
UNION
@ -278,7 +279,7 @@ LEFT JOIN
conference_events ce ON c.conference_id = ce.conference_id
WHERE
ce.conference_id = '%s'
AND (event_time >= '%s' AND event_time <= '%s')
AND (event_time >= '%s 00:00:00' AND event_time <= '%s 23:59:59')
ORDER BY
pe.time;"
@ -303,7 +304,7 @@ LEFT JOIN
participant_events pe ON p.endpoint_id = pe.participant_id
WHERE
c.conference_name LIKE '%%%s%%'
AND (pe.time >= '%s' AND pe.time <= '%s')
AND (pe.time >= '%s 00:00:00' AND pe.time <= '%s 23:59:59')
UNION
@ -321,7 +322,7 @@ FROM
LEFT JOIN
conference_events ce ON c.conference_id = ce.conference_id
WHERE c.conference_name LIKE '%%%s%%'
AND (event_time >= '%s' AND event_time <= '%s')
AND (event_time >= '%s 00:00:00' AND event_time <= '%s 23:59:59')
ORDER BY
pe.time;"
@ -346,7 +347,7 @@ LEFT JOIN
participant_events pe ON p.endpoint_id = pe.participant_id
WHERE
pe.event_type = 'stats_id' AND pe.event_param LIKE '%%%s%%'
AND (pe.time >= '%s' AND pe.time <= '%s')
AND (pe.time >= '%s 00:00:00' AND pe.time <= '%s 23:59:59')
UNION
@ -365,7 +366,7 @@ LEFT JOIN
conference_events ce ON c.conference_id = ce.conference_id
WHERE
event_type = 'stats_id' AND event_param LIKE '%%%s%%'
AND (event_time >= '%s' AND event_time <= '%s')
AND (event_time >= '%s 00:00:00' AND event_time <= '%s 23:59:59')
ORDER BY
pe.time;"
@ -390,7 +391,7 @@ LEFT JOIN
participant_events pe ON p.endpoint_id = pe.participant_id
WHERE
pe.event_type = 'pair selected' AND pe.event_param = '%s'
AND (pe.time >= '%s' AND pe.time <= '%s')
AND (pe.time >= '%s 00:00:00' AND pe.time <= '%s 23:59:59')
UNION
@ -409,11 +410,27 @@ LEFT JOIN
conference_events ce ON c.conference_id = ce.conference_id
WHERE
event_type = 'pair selected' AND event_param = '%s'
AND (event_time >= '%s' AND event_time <= '%s')
AND (event_time >= '%s 00:00:00' AND event_time <= '%s 23:59:59')
ORDER BY
pe.time;"
## jitsi component related
# we use "jitsi_component = %s" (without quotes)
# to re-use the query for all components ("jitsi_component = jitsi_component")
# for specific component the single quotes are added upon loading the template
db_jitsi_components_template="
SELECT jitsi_component, loglevel, time, component_id, event_type, event_param
FROM
jitsi_components
WHERE
jitsi_component = %s
AND
(time >= '%s 00:00:00' AND time <= '%s 23:59:59')
ORDER BY
time;"
## time period related
db_events_by_period_template="
@ -435,7 +452,7 @@ LEFT JOIN
LEFT JOIN
participant_events pe ON p.endpoint_id = pe.participant_id
WHERE
pe.time >= '%s' AND pe.time <= '%s'
pe.time >= '%s 00:00:00' AND pe.time <= '%s 23:59:59'
UNION
@ -453,7 +470,7 @@ FROM
LEFT JOIN
conference_events ce ON c.conference_id = ce.conference_id
WHERE
event_time >= '%s' AND event_time <= '%s'
event_time >= '%s 00:00:00' AND event_time <= '%s 23:59:59'
ORDER BY
pe.time;"
@ -464,7 +481,8 @@ help="Usage:
Options:
--conference|-c [conference ID or name] - show specific conference(s), all of empty
--participant|-p [participant endpoint ID, conference ID, conference name, participant IP, or participant stats ID] - show specific participant(s), all if empty
--time|-t - show stats for a time interval; can be use separately ot together with -c or -p
--jitsi-component|-j [jvb|jicofo] - show service level events
--time|-t - show stats for a time interval; can be use separately ot together with -c, -p, or -j
--verbose|-v - show more details, when available
--silent|-s - show less details, more suitable for scripting
--help|-h - show this help message
@ -616,6 +634,8 @@ conference_arg=""
conference_option=false
participant_arg=""
participant_option=false
component_arg=""
component_option=false
from_time="0000-00-00"
until_time="9999-12-31"
time_option=false
@ -648,6 +668,15 @@ while [[ $# -gt 0 ]]; do
shift
fi
;;
-j | --jitsi-component)
component_option=true
if [[ -n "$2" && "$2" != -* ]]; then
component_arg="$2"
shift 2
else
shift
fi
;;
-t | --time)
time_option=true
if [[ -n "$2" && "$2" != -* ]]; then
@ -965,6 +994,53 @@ elif [[ "$participant_option" == true ]]; then
exit 0
fi
elif [[ "$component_option" == true ]]; then
# argument for "--jitsi-component | -j" can be "jvb", "jicofo"
if [[ -n "$component_arg" ]]; then
case "$component_arg" in
jvb)
jitsi_component="'JVB'"
;;
jicofo)
jitsi_component="'JICOFO'"
;;
*)
# we have a component events search, but an unknown component string
# exiting with error, it's not a recognized option argument
echo "Invalid option: $component_arg" >&2
echo -e "$help"
exit 1
;;
esac
header="\nJitsi components events for \"$IMPORTANT_TEXT$jitsi_component$NORMAL_TEXT\""
else
jitsi_component="jitsi_component"
header="\nJitsi components events for \"$IMPORTANT_TEXT all components$NORMAL_TEXT\""
fi
db_jitsi_components=$(printf "$db_jitsi_components_template" "$jitsi_component" "$from_time" "$until_time")
mapfile -t jitsi_components < <(db_query "$db_jitsi_components")
output=""
# prepare the header
if [[ "$silent" != true ]]; then
if [[ "$time_range_specified" == true ]]; then
header+=" for the time period \"$from_time - $until_time\""
fi
header+="\n"
echo -e "$header"
output+="jitsi_component\tloglevel\ttime\tcomponent ID\tevent\tparameter\n"
fi
# prepare the formatted rows
for row in "${jitsi_components[@]}"; do
IFS='|' read -r jitsi_component loglevel time component_id event_type event_param <<< "$row"
output+="$jitsi_component\t$loglevel\t$time\t$component_id\t$event_type\t$event_param\n"
done
# output
echo -e "$output" | column -t -s $'\t'
elif [[ "$time_option" == true ]]; then
if [[ "$time_range_specified" == true ]]; then

View File

@ -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.16
```
<COMPONENT>
<event>
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.16
### 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.```
## participant joining
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\.```
@ -51,6 +121,104 @@ regex
## JICOFO
### jicofo starting
needed: *timestamp, loglevel* (it's good to find a way to diferentiate the jicofo by some id (IP, hostname, etc.)
regex
```Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*Main\.main.*:\ Starting\ Jicofo\.```
### jicofo registered to xmpp
needed: *timestamp, loglevel*
regex
```Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\[xmpp_connection=client\]\ XmppProvider\$connectionListener\$1\.authenticated.*:\ Registered\.```
### jicofo started
needed: *timestamp, loglevel*
regex
```Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\JicofoServices\.\<init\>.*\ Registering\ GlobalMetrics\ periodic\ updates\.```
### jvb added
needed: *timestamp, loglevel, jvbID, jvb version, jvb region*
log
```Jicofo 2024-06-18 18:38:07.378 INFO: [33] BridgeSelector.addJvbAddress#96: Added new videobridge: Bridge[jid=jvbbrewery@internal.auth.meet.example.com/87531df0-4018-420a-bfb3-cb2f8d48ba08, version=2.3.105-ge155b81e, relayId=null, region=null, stress=0.00]```
regex
```Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\BridgeSelector\.addJvbAddress.*:\ Added\ new\ videobridge:\ Bridge\[jid=.*@.*\/(.*),\ version=(.*),.*region=(.*),```
### jvb removed
needed: *timestamp, loglevel, jvbID*
log
```Jicofo 2024-06-22 12:20:38.713 INFO: [1401] BridgeSelector.removeJvbAddress#109: Removing JVB: jvbbrewery@internal.auth.meet.example.com/87531df0-4018-420a-bfb3-cb2f8d48ba08```
regex
```Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\BridgeSelector\.removeJvbAddress.*:\ Removing\ JVB:\ .*@.*\/(.*)```
### jvb lost (just in case the removal was not detected)
needed: *timestamp, loglevel, jvbID*
log
```Jicofo 2024-06-22 12:20:38.713 WARNING: [1401] BridgeSelector.removeJvbAddress#112: Lost a bridge: jvbbrewery@internal.auth.meet.example.com/87531df0-4018-420a-bfb3-cb2f8d48ba08```
regex
```Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\BridgeSelector\.removeJvbAddress.*:\ Lost\ a\ bridge:\ .*@.*\/(.*)```
### jvb health-check scheduled
needed: *timestamp, loglevel, jvbID, jvb version, jvb region*
log
```Jicofo 2024-06-22 12:22:03.707 INFO: [40] JvbDoctor.bridgeAdded#128: Scheduled health-check task for: Bridge[jid=jvbbrewery@internal.auth.meet.example.com/87531df0-4018-420a-bfb3-cb2f8d48ba08, version=2.3.105-ge155b81e, relayId=null, region=null, stress=0.00]```
regex
```Jicofo\ ([0-9-]+\ [0-9:.]+)\ ([A-Z]+):.*\JvbDoctor\.bridgeAdded.*:\ Scheduled\ health-check\ task\ for:\ Bridge\[jid=.*@.*\/(.*),\ version=(.*),\ .*\ region=(.*),```
### jvb health-check stopped
needed: *timestamp, loglevel, jvbID, jvb version, jvb region*
log
```Jicofo 2024-06-22 12:20:38.733 INFO: [40] JvbDoctor.bridgeRemoved#105: Stopping health-check task for: Bridge[jid=jvbbrewery@internal.auth.meet.example.com/87531df0-4018-420a-bfb3-cb2f8d48ba08, version=2.3.105-ge155b81e, relayId=null, region=null, stress=0.00]```
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)